
                             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)z5Set the IAM policy for a Binary Authorization policy.    )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   ah  Set the IAM policy for a Binary Authorization policy.

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 current project's Binary Authorization
policy:

  $ {command} iam_policy.json
c                 $    UR                  SSS9  g )Npolicy_filez0The JSON or YAML file containing the IAM policy.)help)add_argument)clsparsers     7lib/surface/container/binauthz/policy/set_iam_policy.pyArgsSetIamPolicy.Args-   s    
0  2    c                 ~   [         R                  " U R                  5       5      n[        R                  " U5      n[
        R                  " 5       n[        R                  " UR                  UR                  R                  5      u  pVUR                  XE5      n[        R                  " UR                  5       S5        U$ )Npolicy)r   GetApiVersionReleaseTrackr   Clientr   GetPolicyRefr
   ParseYamlOrJsonPolicyFiler   messages	IamPolicySetLogSetIamPolicyName)selfargsapi_versionclient
policy_refr   _results           r   RunSetIamPolicy.Run4   s    $$T%6%6%89KZZ$F""$J2243C3C39??3L3LNIF ZZ
+FZ__.9Mr    N)	__name__
__module____qualname____firstlineno____doc__classmethodr   r+   __static_attributes__r-   r   r   r   r      s      2 2
r   r   N)r2   
__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   