
    
                         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r\
R                   " S
 S\
R                  5      5       rSSS.\l        g	)z4Command for creating organization firewall policies.    )absolute_import)division)unicode_literals)base_classes)client)base)flagsNc                   2    \ rS rSrSrSr\S 5       rS rSr	g)Create   zCreate a Compute Engine organization firewall policy.

*{command}* is used to create organization firewall policies. An organization
firewall policy is a set of rules that controls access to various resources.
Nc                     [         R                  " U5        UR                  R                  [         R                  5        g )N)r	   AddArgFirewallPolicyCreationdisplay_infoAddCacheUpdaterFirewallPoliciesCompleter)clsparsers     /lib/surface/compute/firewall_policies/create.pyArgsCreate.Args&   s*    	&&v.
''(G(GH    c                 &   [         R                  " U R                  5       5      n[        R                  " UR                  UR
                  [        R                  " U R                  5       5      R                  5       S9nUR                  S5      (       a  SUR                  -   nO%UR                  S5      (       a  SUR                  -   nUR                  R                  R                  UR                  UR                  S9nUR!                  UWSS9$ )	N)compute_client	resourcesversionorganizationzorganizations/folderzfolders/)descriptiondisplayNameF)firewall_policy	parent_idonly_generate_request)r   ComputeApiHolderReleaseTrackr   OrgFirewallPolicyr   six	text_typelowerIsSpecifiedr   r   messagesFirewallPolicyr   
short_namer   )selfargsholderorg_firewall_policyr!   r    s         r   Run
Create.Run+   s    **4+<+<+>?F 22}}""d//1288:<
 ''"T%6%66i			(	#	#t{{*imm,,;;$$$// < CO%%'# & % %r    )
__name__
__module____qualname____firstlineno____doc__FIREWALL_POLICY_ARGclassmethodr   r1   __static_attributes__r3   r   r   r   r      s(     I I%r   r   z    To create an organization firewall policy under folder with ID ``123456789",
    run:

      $ {command} --short-name=my-policy --folder=123456789
    a      To create rules to a firewall policy, the user must have the following
    permission: *`compute.firewallPolicies.create`.

    To find predefined roles that contain those permissions, see the [Compute
    Engine IAM roles](https://cloud.google.com/compute/docs/access/iam).
    )EXAMPLESzIAM PERMISSIONS)r8   
__future__r   r   r   googlecloudsdk.api_lib.computer   0googlecloudsdk.api_lib.compute.firewall_policiesr   googlecloudsdk.callioper   4googlecloudsdk.command_lib.compute.firewall_policiesr	   r&   DefaultUniverseOnlyCreateCommandr   detailed_helpr3   r   r   <module>rE      s^    ; &  ' 7 C ( F 
 %T % %F	 r   