
    '	                     n    d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ  G d dej                        Z
y	)
z)'logging cmek-settings describe' command.    )absolute_import)division)unicode_literals)util)basec                   &    e Zd ZdZed        Zd Zy)Describea  Display the CMEK settings for the Cloud Logging Logs Router.

  If *kmsKeyName* is present in the output, then CMEK is enabled for your
  project, folder, organization or billing-account. You can also find the Logs
  Router service account using this command.

  ## EXAMPLE

  To describe the Logs Router CMEK settings for a project, run:

    $ {command} --project=[PROJECT_ID]

  To describe the Logs Router CMEK settings for an organization, run:

    $ {command} --organization=[ORGANIZATION_ID]

    kmsKeyName:
    'projects/my-project/locations/my-location/keyRings/my-keyring/cryptoKeys/key'
    name: 'organizations/[ORGANIZATION_ID]/cmekSettings'
    serviceAccountId:
    '[SERVICE_ACCOUNT_ID]@gcp-sa-logging.iam.gserviceaccount.com'
  c                 0    t        j                  | d       y)z Register flags for this command.zCMEK settings to describeN)r   AddParentArgs)parsers    -lib/surface/logging/cmek_settings/describe.pyArgszDescribe.Args4   s     	v:;    c                     t        j                  |      }t        j                         j                  j	                  t        j
                         j                  |            S )a&  This is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      The CMEK settings for the specified project, folder, organizations
      or billing-account.
    )name)r   GetParentFromArgs	GetClientv2GetCmekSettingsGetMessagesLoggingGetCmekSettingsRequest)selfargsparent_names      r   RunzDescribe.Run9   sP     ((.K>>..88k8JL Lr   N)__name__
__module____qualname____doc__staticmethodr   r    r   r   r	   r	      s!    . < <Lr   r	   N)r   
__future__r   r   r   googlecloudsdk.api_lib.loggingr   googlecloudsdk.callioper   DescribeCommandr	   r!   r   r   <module>r&      s/     0 '  ' / (+Lt## +Lr   