
                             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 ddl	m
Z
 ddl	mZ dd	lmZ  G d
 dej                        Zy)z.Command for bigtable instances set-iam-policy.    )absolute_import)division)unicode_literals)util)base)	arguments)iam)iam_utilc                   P    e Zd ZdZ ej
                  ddd      Zed        Zd Z	y)	SetIamPolicyz1Set the IAM policy for a Cloud Bigtable instance.instancezmy-instance-idT)
example_iduse_anc                 ^    t        j                  | dd       t        j                  |        y)z Register flags for this command.zto set the IAM policy forT)
positionalN)r   AddInstanceResourceArgr
   AddArgForPolicyFile)parsers    0lib/surface/bigtable/instances/set_iam_policy.pyArgszSetIamPolicy.Args"   s(     $$+>  (    c                     t        j                  |j                        }t        j                  ||j
                        }t        j                  |j                         d       |S )zThis 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:
      A IAM policy message.
    r   )	r   GetInstanceRefr   r	   SetInstanceIamPolicypolicy_filer
   LogSetIamPolicyName)selfargsinstance_refresults       r   RunzSetIamPolicy.Run)   sN     &&t}}5L%%lD4D4DEF\..0*=Mr   N)
__name__
__module____qualname____doc__r
   GetDetailedHelpForSetIamPolicydetailed_helpstaticmethodr   r"    r   r   r   r      s8    99(99-d<- ) )r   r   N)r&   
__future__r   r   r   googlecloudsdk.api_lib.bigtabler   googlecloudsdk.callioper   #googlecloudsdk.command_lib.bigtabler   r	   googlecloudsdk.command_lib.iamr
   Commandr   r*   r   r   <module>r1      s2    5 &  ' 0 ( 9 3 34<< r   