- release_tracks: [ALPHA, BETA, GA]

  help_text:
    brief: Create a DNS Authorization
    description: |
      Create a new DNS Authorization.
    examples: |
      To create a DNS authorization called `my-authorization`, run:

        $ {command} my-authorization --domain=host.example.com

  request:
    collection: certificatemanager.projects.locations.dnsAuthorizations
    api_version: v1

  async:
    collection: certificatemanager.projects.locations.operations

  arguments:
    resource:
      help_text: The name of the DNS Authorization to create.
      spec: !REF googlecloudsdk.command_lib.certificate_manager.resources:dnsAuthorization

    params:
    - arg_name: description
      api_field: dnsAuthorization.description
      help_text: |
        Human-readable description of the resource.
    - arg_name: domain
      api_field: dnsAuthorization.domain
      required: true
      help_text: |
        Public domain name to create an authorization for.
    - arg_name: type
      api_field: dnsAuthorization.type
      help_text: |
        Type of the DNS authorization.
    - arg_name: tags
      hidden: true
      api_field: dnsAuthorization.tags.additionalProperties
      metavar: KEY=VALUE
      help_text: |
        List of tag KEY=VALUE pairs to add.
      type:
        arg_dict:
          flatten: true
          spec:
          - api_field: key
          - api_field: value
    labels:
      api_field: dnsAuthorization.labels
