
    z                     >   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S	.r	S
 r
S r\R                  " \R                  R                  5       " S S\R                  5      5       r\R                  " \R                  R"                  5       " S S\5      5       rg)z+Command AnalyzeOrgPolicyGovernedAssets API.    )absolute_import)division)unicode_literals)client_util)basezE    Analyze organization policies governed assets under a scope.
    z    To list 10 assets governed by a constraint in an organization, run:

      $ {command} --scope=organizations/YOUR_ORG_ID --constraint=YOUR_CONSTRAINT_NAME --limit=10
    )DESCRIPTIONEXAMPLESc                 (    U R                  SSSSS9  g )Nz--scopeSCOPETa          Scope can only be an organization. The analysis is
        limited to the Cloud organization policies and assets within this scope. The caller must be
        granted the `cloudasset.assets.searchAllResources` and `cloudasset.assets.searchAllIamPolicies` permission on
        the desired scope.

        The allowed values are:

          * ```organizations/{ORGANIZATION_NUMBER}``` (e.g. ``organizations/123456'')
        metavarrequiredhelpadd_argumentparsers    7lib/surface/asset/analyze_org_policy_governed_assets.pyAddScopeArgumentr   (   s#    		      c                 (    U R                  SSSSS9  g )Nz--constraint
CONSTRAINTTa          The name of the constraint to analyze organization policies for. The
        response only contains analyzed organization policies for the provided
        constraint.

        Examples:

        * organizations/{ORGANIZATION_NUMBER}/customConstraints/{CUSTOM_CONSTRAINT_NAME}
          for a user-defined custom constraint.
        * organizations/{ORGANIZATION_NUMBER}/constraints/{CANNED_CONSTRAINT_NAME}
          for a gcp-service-defined canned constraint.
        r   r   r   s    r   AddConstraintArgumentr   9   s#    	  r   c                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)AnalyzeOrgPolicyGovernedAssetsO   <Analyze organization policies governed assets under a scope.c                 n    [        U 5        [        U 5        [        R                  R	                  U 5        g Nr   r   r   URI_FLAGRemoveFromParserr   s    r   Args#AnalyzeOrgPolicyGovernedAssets.ArgsU   $    V&!MM""6*r   c                 N    [         R                  " 5       nUR                  U5      $ r   r   OrgPolicyAnalyzerClientr   selfargsclients      r   Run"AnalyzeOrgPolicyGovernedAssets.Run[   !    002F0066r    N__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr#   r-   __static_attributes__r0   r   r   r   r   O   !    D-+ +
7r   r   c                   2    \ rS rSrSr\r\S 5       rS r	Sr
g) AnalyzeOrgPolicyGovernedAssetsGA`   r   c                 n    [        U 5        [        U 5        [        R                  R	                  U 5        g r   r    r   s    r   r#   %AnalyzeOrgPolicyGovernedAssetsGA.Argsf   r%   r   c                 N    [         R                  " 5       nUR                  U5      $ r   r'   r)   s      r   r-   $AnalyzeOrgPolicyGovernedAssetsGA.Runl   r/   r   r0   Nr1   r0   r   r   r=   r=   `   r;   r   r=   N)r6   
__future__r   r   r   googlecloudsdk.api_lib.assetr   googlecloudsdk.callioper   r7   r   r   ReleaseTracksReleaseTrackBETAListCommandr   GAr=   r0   r   r   <module>rK      s    2 &  ' 4 (		", D%%**+7T%5%5 7 ,7  D%%(()7'E 7 *7r   