
                         X   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	KJr  \
R                   " \
R"                  R$                  \
R"                  R&                  \
R"                  R(                  5       " S
 S\
R*                  5      5       rSSS.\l        g)z.Command for adding resource policies to disks.    )absolute_import)division)unicode_literals)base_classes)
disks_util)base)flags)utilc                   .    \ rS rSrSr\S 5       rS rSrg)DisksAddResourcePolicies   z/Add resource policies to a Compute Engine disk.c                 v    [         R                  " SS9R                  U SS9  [        R                  " U SSSS9  g )	NFpluralzadd resource policies to)operation_typezadded todiskT)required)disks_flagsMakeDiskArgAddArgumentr	   AddResourcePoliciesArgs)parsers    2lib/surface/compute/disks/add_resource_policies.pyArgsDisksAddResourcePolicies.Args"   s:    5)559 6 ;	!!&*ftL    c                 @   [         R                  " U R                  5       5      nUR                  R                  nUR                  R
                  n[        R                  " SS9R                  XR                  5      n[        R                  " XSU5      nUR                  5       n/ nUR                   HM  n	[        R                  " UR                  U	UR                   US9n
UR#                  U
R%                  5       5        MO     UR'                  UUR                  5      $ )NFr   )projectregion)r   ComputeApiHolderReleaseTrackclientapitools_clientmessagesr   r   ResolveAsResource	resourcesapi_utilGetDiskInfoGetDiskRegionNameresource_policiesr
   ParseResourcePolicyr   appendSelfLinkMakeAddResourcePoliciesRequest)selfargsholderr"   r$   disk_ref	disk_infodisk_regionr*   policyresource_policy_refs              r   RunDisksAddResourcePolicies.Run(   s    **4+<+<+>?F]]**F}}%%H&&''.>.>? $$Xx@I--/K(( 44



""	
 2;;=> ) 334E4:MMC Cr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r7   __static_attributes__r9   r   r   r   r      s!     8M M
Cr   r   aB  Add resource policies to a Compute Engine disk.

*{command}* adds resource policies to a Compute Engine disk. These policies define a schedule for taking snapshots and a retention period for these snapshots.

For information on how to create resource policies, see:
  $ gcloud beta compute resource-policies create --help
zThe following command adds two resource policies to a Compute Engine disk.

  $ {command} my-disk --zone=ZONE --resource-policies=policy-1,policy-2
)DESCRIPTIONEXAMPLESN)r>   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   r'   googlecloudsdk.callioper   (googlecloudsdk.command_lib.compute.disksr	   r   4googlecloudsdk.command_lib.compute.resource_policiesr
   ReleaseTracksr!   ALPHABETAGAUpdateCommandr   detailed_helpr9   r   r   <module>rN      s    5 &  ' 7 A ( I F E D%%++T->->-C-C%%((*Ct11 C*CD		*  &r   