
    
                         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
  \R                  " SSS9\R                  " \R                  R                  5       " S	 S
\R                  5      5       5       rSSS.\l        g)z>Command for setting the security policy for a backend service.    )base_classes)client)base)flagsFzvThis command is deprecated and will not be promoted to beta. Please use "gcloud beta backend-services update" instead.)
is_removedwarningc                   2    \ rS rSrSrSr\S 5       rS rSr	g)SetSecurityPolicy   z.Set the security policy for a backend service.Nc                     [         R                  R                  U5        [        R                  " SSS9U l        U R
                  R                  U5        g )Nzbackend serviceT)resourcerequired)r   #GLOBAL_REGIONAL_BACKEND_SERVICE_ARGAddArgumentsecurity_policy_flags'SecurityPolicyArgumentForTargetResourceSECURITY_POLICY_ARG)clsparsers     ;lib/surface/compute/backend_services/set_security_policy.pyArgsSetSecurityPolicy.Args$   sG    	--99&AEE&	7  ''/    c                    [         R                  " U R                  5       5      n[        R                  R                  XR                  5      nUR                  (       d  S nO3U R                  R                  XR                  5      R                  5       n[        R                  " X2R                  S9nUR                  US9$ )N)compute_client)security_policy)r   ComputeApiHolderReleaseTrackr   r   ResolveAsResource	resourcesr   r   SelfLinkr   BackendServicer
   )selfargsholderrefsecurity_policy_refbackend_services         r   RunSetSecurityPolicy.Run,   s    **4+<+<+>?F

3
3
E
E C   44FF
  ""*(*  ++CNO,,+ - - -r    )
__name__
__module____qualname____firstlineno____doc__r   classmethodr   r)   __static_attributes__r+   r   r   r
   r
      s$     70 0-r   r
   z-Set the security policy for a backend servicez
        *{command}* is used to set the security policy for a backend service.
        Setting an empty string will clear the existing security policy.  )briefDESCRIPTIONN)r0   googlecloudsdk.api_lib.computer   /googlecloudsdk.api_lib.compute.backend_servicesr   googlecloudsdk.callioper   3googlecloudsdk.command_lib.compute.backend_servicesr   4googlecloudsdk.command_lib.compute.security_policiesr   	DeprecateReleaseTracksr   ALPHASilentCommandr
   detailed_helpr+   r   r   <module>r?      s    E 8 B ( E$ IK D%%++,-** - -	K
-@ 	8	N	#  r   