
                            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  \
R                  " \
R                  R                   \
R                  R"                  5       " S
 S\
R$                  5      5       r\
R                  " \
R                  R(                  5       " S S\5      5       rSSSS.r\\l        \\l        g)zD`gcloud access-context-manager perimeters dry-run describe` command.    )absolute_import)division)print_function)unicode_literals)zones)base)
perimeters)policiesc                   2    \ rS rSrSrSr\S 5       rS rSr	g)DescribePerimeterDryRun   @Displays the dry-run mode configuration for a Service Perimeter.v1c                 2    [         R                  " U S5        g )Nzto describe)r	   AddResourceArg)parsers    Alib/surface/access_context_manager/perimeters/dry_run/describe.pyArgsDescribePerimeterDryRun.Args!   s    fm4    c                    [         R                  " U R                  S9nUR                  R                  R                  5       n[        R                  " X15        UR                  U5      n[        R                  " X@R                  5        g )N)version)	zones_apiClient_API_VERSIONCONCEPTS	perimeterParser
   ValidateAccessPolicyArgGetr	   GenerateDryRunConfigDiff)selfargsclientperimeter_refr   s        r   RunDescribePerimeterDryRun.Run%   s`    d&7&78FMM++113M$$]9

=)I''	3D3DEr    N)
__name__
__module____qualname____firstlineno____doc__r   staticmethodr   r&   __static_attributes__r(   r   r   r   r      s"    H,5 5Fr   r   c                       \ rS rSrSrSrSrg)DescribePerimeterDryRunAlpha-   r   v1alphar(   N)r)   r*   r+   r,   r-   r   r/   r(   r   r   r1   r1   -   s
    H,r   r1   z?Display the dry-run mode configuration for a Service Perimeter.a  The dry-run mode configuration is presented as a diff against the enforcement mode configuration. '+' indicates additions in `spec`,'-' indicates removals from `status` and entries without either of those indicate that they are the same across the dry-run and the enforcement mode configurations. When a particular field is completely empty, it will not be displayed.

Note: When this command is executed on a Service Perimeter with no explicit dry-run mode configuration, the effective dry-run mode configuration is inherited from the enforcement mode configuration, and thus, the enforcement mode configuration is displayed in such cases.a  To display the dry-run mode configuration for a Service Perimeter:

  $ {command} my-perimeter

Sample output:

 ===
   name: my_perimeter
   title: My Perimeter
   type: PERIMETER_TYPE_REGULAR
   resources:
 +   projects/123
 -   projects/456
     projects/789
   restrictedServices:
 +   bigquery.googleapis.com
 -   storage.googleapis.com
     bigtable.googleapis.com
   vpcAccessibleServices:
 +   allowedServices:
 +     bigquery.googleapis.com
 -     storage.googleapis.com
 +   enableRestriction: true
)briefDESCRIPTIONEXAMPLESN)r-   
__future__r   r   r   r   +googlecloudsdk.api_lib.accesscontextmanagerr   r   googlecloudsdk.callioper   /googlecloudsdk.command_lib.accesscontextmanagerr	   r
   ReleaseTracksReleaseTrackBETAGADescribeCommandr   ALPHAr1   detailed_helpr(   r   r   <module>rB      s    K &  % ' J ( F D D%%**D,=,=,@,@AFd22 F BF  D%%++,#:  - 	J	
F'R .;  *(5  %r   