- release_tracks: [ALPHA, GA]
  help_text:
    brief: Create a new authorized organizations description.
    description: |
      Create a new authorized organizations description in a given access policy.
    examples: |
        To create a new authorized organizations description:

          $ {command} --orgs=organizations/12345 \
           --policy=9876543

  request:
    api_version: v1
    collection: accesscontextmanager.accessPolicies.authorizedOrgsDescs
    modify_request_hooks:
    - googlecloudsdk.command_lib.accesscontextmanager.policies:ValidateAccessPolicyArg
    - googlecloudsdk.command_lib.util.hooks.request_modifiers:SetFieldFromRelativeName:api_field=authorizedOrgsDesc.name
    ALPHA:
      api_version: v1alpha
      modify_request_hooks:
      - googlecloudsdk.command_lib.accesscontextmanager.policies:ValidateAccessPolicyArg
      - googlecloudsdk.command_lib.util.hooks.request_modifiers:SetFieldFromRelativeName:api_field=authorizedOrgsDesc.name


  async:
    collection: accesscontextmanager.operations

  arguments:
    resource:
      help_text: The authorized organizations description to create.
      spec: !REF googlecloudsdk.command_lib.accesscontextmanager.resources:authorized-orgs-desc
    params:
    - api_field: authorizedOrgsDesc.authorizationType
      arg_name: authorization_type
      required: true
      help_text: The authorization type of the authorized organizations description. For example, trust, troubleshooting or logging.
    - api_field: authorizedOrgsDesc.assetType
      arg_name: asset_type
      required: true
      help_text: The asset type of this authorized organizations description. For example, device, or credential strength.
    - api_field: authorizedOrgsDesc.authorizationDirection
      arg_name: authorization_direction
      required: true
      help_text: Authorization direction of this authorization relationship. Specifies whether to allow specified organizations to evaluate this organization's traffic, or allow specified organizations traffic to be evaluated by this org.
    - api_field: authorizedOrgsDesc.orgs
      arg_name: orgs
      help_text: |
        Comma-separated list of organizations (in the following format: `organizations/<organizationnumber>`).
