
    	                         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   " S	 S
\	R                  5      rg)z*Command to get Shielded instance identity.    )absolute_import)division)unicode_literals)base_classes)utils)base)flagsc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	GetShieldedIdentity   zGet the Shielded identity for a Compute Engine instance.

*{command}* displays the Shielded identity associated with a
Compute Engine instance in a project.
EXAMPLESzo
  To get the shielded identity for an instance, run:

    $ {command} example-instance --zone=us-central1-b
  c                 ~    [         R                  R                  U SS9  [        R                  R                  U 5        g )Nz!describe the Shielded identity of)operation_type)r	   INSTANCE_ARGAddArgumentr   URI_FLAGRemoveFromParser)parsers    6lib/surface/compute/instances/get_shielded_identity.pyArgsGetShieldedIdentity.Args*   s4    	""B # DMM""6*    c                    [         R                  " U R                  5       5      nUR                  n[        R
                  R                  UUR                  [        R                  " U5      S9nUR                  R                  SUR                  R                  UR                  UR                  UR                   S94n/ nUR#                  U/US9nU(       a  [$        R&                  " USS9  US   nU$ )N)scope_listerGetShieldedInstanceIdentity)instancezoneproject)requestserrors_to_collectz Could not get Shielded identity:)error_messager   )r   ComputeApiHolderReleaseTrackclientr	   r   ResolveAsResource	resourcescompute_flagsGetDefaultScopeListerapitools_client	instancesmessages2ComputeInstancesGetShieldedInstanceIdentityRequestr   r   r   MakeRequestsr   RaiseToolException)	selfargsholderr$   instance_refrequesterrorsobjectsresponses	            r   RunGetShieldedIdentity.Run0   s    **4+<+<+>?F]]F%%77"88@ 8 BL 	((*GJJ!**"" (( 	K 	*+G F!!G9!OG
 BDqzHOr    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r7   __static_attributes__r9   r   r   r   r      s1      - + +
r   r   N)r>   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer	   r'   ,googlecloudsdk.command_lib.compute.instancesDescribeCommandr   r9   r   r   <module>rH      s4    1 &  ' 7 0 ( E >*$.. *r   