
    d
                     p   S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  \	R                  \	R                  " \	R                  R                   5       " S S	\	R"                  5      5       5       r\	R                  \	R                  " \	R                  R&                  5       " S
 S\5      5       5       rg)z"Fetch the IAM policy for a secret.    )absolute_import)division)unicode_literals)api)base)argsc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	GetIamPolicy   ai  Get the IAM policy for the secret.

Displays the IAM policy associated with the secret. If formatted as JSON,
the output can be edited and used as a policy file for set-iam-policy. The
output includes an "etag" field identifying the version emitted and
allowing detection of concurrent policy updates.

Run gcloud secrets set-iam-policy for additional details.
EXAMPLESzp          To print the IAM policy for secret named 'my-secret', run:

          $ {command} my-secret
          c                     [         R                  " U SSSSS9  [         R                  " U SSS9  [        R                  R                  U 5        g )N Tz0Name of the secret from which to get IAM policy.)purpose
positionalrequired	help_textzto get iam policyF)r   hidden)secrets_args	AddSecretAddLocationr   URI_FLAGRemoveFromParser)parsers    %lib/surface/secrets/get_iam_policy.pyArgsGetIamPolicy.Args/   sF    D V-@OMM""6*    c                     [         R                  " U R                  5       5      nUR                  R                  R                  5       n[         R                  " US9R                  X1R                  S9$ )N)api_version)secret_location)	secrets_apiGetApiFromTrackReleaseTrackCONCEPTSsecretParseSecretsr
   location)selfr   r   	multi_refs       r   RunGetIamPolicy.Run;   s^    --d.?.?.ABK$$**,I;7DD== E  r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r+   __static_attributes__r-   r   r   r
   r
      s1      - 	+ 	+r   r
   c                        \ rS rSrSrSS0rSrg)GetIamPolicyBetaC   zGet the IAM policy of a secret.

Gets the IAM policy for the given secret.

Returns an empty policy if the resource does not have a policy
set.
r   z~          To print the IAM policy for secret named 'my-secret', run:

          $ {command} my-secret [--location=]
          r-   N)r.   r/   r0   r1   r2   r3   r5   r-   r   r   r7   r7   C   s      -r   r7   N)r2   
__future__r   r   r   googlecloudsdk.api_lib.secretsr   r!   googlecloudsdk.callioper   "googlecloudsdk.command_lib.secretsr   r   DefaultUniverseOnlyReleaseTracksr#   GAListCommandr
   BETAr7   r-   r   r   <module>rB      s    ) &  ' = ( C D%%(()$4## $ * $N D%%**+|  , r   