# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
  - ALPHA
  auto_generated: true
  hidden: true
  help_text:
    brief: Create a ManagedOrganization resource.
    description: Create a ManagedOrganization resource and a corresponding Cloud Resource
      Manager organization resource.
    examples: |-
      To create the managed organiztion named `foo` in location `global` and organization `my-org` run:

      $ {command} /locations/global/organizations/my-org/foo --display-name=MyManagedOrg --admins=member="user:myadmin1@myorg.com" --admins=member="group:admins@myorg.com"
  arguments:
    params:
    - help_text: |-
        Identifier. The resource name of the managed organization.
        Format:
        organizations/{organization_id}/locations/{location}/managedOrganizations/{managed_organization_id}
      is_positional: true
      request_id_field: managedOrganizationId
      resource_spec: !REF googlecloudsdk.command_lib.orglifecycle.v1_resources:organization_location_managed_organization
      required: true
    - arg_name: organization-display-name
      api_field: managedOrganization.organizationDisplayName
      required: true
      repeated: false
      help_text: |-
        The display name of the
        cloudresourcemanager.googleapis.com/Organization created on behalf
        of the customer.
    - arg_name: admins
      api_field: managedOrganization.admins
      required: false
      repeated: true
      help_text: |-
        List of organization admins.
      spec:
      - api_field: member
        help_text: |-
          Valid IAM principles. See member field under
          https://cloud.google.com/iam/docs/reference/sts/rest/v1/Binding
  request:
    api_version: v1
    collection:
    - orglifecycle.organizations.locations.managedOrganizations
  async:
    collection:
    - orglifecycle.organizations.locations.operations
