
    	                         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  SSK	J
r
  SS	KJr  \
R                   " S
 S\
R                  5      5       rg)z#Set the IAM policy for an attestor.    )absolute_import)division)unicode_literals)apis)iam)util)base)iam_utilc                   .    \ rS rSrSr\S 5       rS rSrg)SetIamPolicy   aK  Set the IAM policy for an attestor.

See https://cloud.google.com/iam/docs/managing-policies for details of
the policy file format and contents.

## EXAMPLES
The following command will read an IAM policy defined in a JSON file
'iam_policy.json' and set it for the attestor `my_attestor`:

  $ {command} my_attestor iam_policy.json
c                 D    UR                  SSS9  UR                  SSS9  g )Nattestor_namez:The name of the attestor whose IAM policy will be updated.)helppolicy_filez0The JSON or YAML file containing the IAM policy.)add_argument)clsparsers     :lib/surface/container/binauthz/attestors/set_iam_policy.pyArgsSetIamPolicy.Args,   s:    
  
 0  2    c                    [         R                  " U R                  5       5      n[        R                  " U5      n[
        R                  " UR                  5      n[        R                  " UR                  UR                  R                  5      u  pVUR                  XE5      n[        R                  " UR                  5       S5        U$ )Nattestor)r   GetApiVersionReleaseTrackr   Clientr   GetAttestorRefr   r
   ParseYamlOrJsonPolicyFiler   messages	IamPolicySetLogSetIamPolicyName)selfargsapi_versionclientattestor_refpolicy_results           r   RunSetIamPolicy.Run8   s    $$T%6%6%89KZZ$F&&t'9'9:L2243C3C39??3L3LNIF ZZ-F\..0*=Mr    N)	__name__
__module____qualname____firstlineno____doc__classmethodr   r-   __static_attributes__r/   r   r   r   r      s     
 	2 	2
r   r   N)r4   
__future__r   r   r   )googlecloudsdk.api_lib.container.binauthzr   r   r   googlecloudsdk.callioper	   googlecloudsdk.command_lib.iamr
   DefaultUniverseOnlyCommandr   r/   r   r   <module>r=      sG    * &  ' : 9 : ( 3 %4<< % %r   