- release_tracks: [GA]
  help_text:
    brief: |
      Get metadata for a root Certificate Authority.
    description: |
      Returns metadata for the given Certificate Authority.
    examples: |
      To get metadata for the root CA 'prod-root' in location 'us-west1' and CA Pool 'my-pool':

        $ {command} server-tls-1 \
            --location=us-west1 --pool=my-pool

      To download the PEM-encoded CA certificate chain for the 'prod-root'
      CA in location 'us-west1' and CA Pool 'my-pool' to a file
      called 'prod-root.crt':

        $ {command} prod-root \
            --location=us-west1 --pool=my-pool \
            --format="value(pemCaCertificates)" > ./prod-root.crt

  request:
    collection: privateca.projects.locations.caPools.certificateAuthorities
    api_version: v1

  arguments:
    resource:
      help_text: The certificate authority for which to obtain metadata.
      spec: !REF googlecloudsdk.command_lib.privateca.resources:cert_authority

  response:
    modify_response_hooks:
    - googlecloudsdk.command_lib.privateca.hooks:CheckResponseRootTypeHook:version=v1
