
    >                         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\R                  5      rg)z-Command to list Apigee API proxy deployments.    )absolute_import)division)unicode_literals)apigee)base)
exceptions)defaults)resource_argsc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
List   z"List Apigee API proxy deployments.z          {description}

          `{command}` lists deployments of API proxies, optionally filtered by
          environment, proxy name, proxy revision, or a combination of these.
          aS  
          To list all deployments for the active Cloud Platform project, run:

              $ {command}

          To list all deployments in an Apigee organization called ``my-org'',
          run:

              $ {command} --organization=my-org

          To list all deployments of an API proxy called ``my-proxy'' in the
          active Cloud Platform project, run:

              $ {command} --api=my-proxy

          To list all deployments to the ``test'' environment of the active
          Cloud Platform project, formatted as a JSON array, run:

              $ {command} --environment=test --format=json

          To list all deployments of ``my-proxy'' to the ``test'' environment in
          an Apigee organization called ``my-org'', run:

              $ {command} --organization=my-org --api=my-proxy --environment=test
          )DESCRIPTIONEXAMPLESc           
      :   SSSS.n[         R                  " 5       [         R                  " SS5      [         R                  " S[        5      [         R                  " S[        5      /n[        R
                  " U S	S
SSUUS9  U R                  R                  S5        g )NzThe API proxy whose deployments should be listed. If not provided, all proxies will be listed. To get a list of existing API proxies, run `{{grandparent_command}} apis list`.zThe environment whose deployments should be listed. If not provided, all environments will be listed. To get a list of available environments, run `{{grandparent_command}} environments list`.zThe organization whose deployments should be listed.If unspecified, the Cloud Platform project's associated organization will be used.)apienvironmentorganizationrevisionallr   r   z%organization.environment.api.revisionzAPI proxy revision and environment whose deployments should be listed. Providing a REVISION is only valid if API is also specified. If no REVISION is provided, all deployed revisions that match the other arguments will be included.FT)
positionalrequiredfallthroughs
help_textsz$table(environment,apiProxy,revision))r	   !GCPProductOrganizationFallthroughStaticFallthroughr   r
   AddSingleResourceArgumentdisplay_info	AddFormat)parser	help_textr   s      &lib/surface/apigee/deployments/list.pyArgs	List.ArgsB   s    7GAI6 	224
 	"":u5
 	""=#6""5#.L ++/	, !
 !!"HI    c                 8   UR                   R                  R                  5       R                  5       nUS   [        L a#  US   S:w  a  [
        R                  " SS5      eUS	 US   [        L a  US	 US   S:X  a  US	 [        R                  R                  U5      $ )zRun the list command.apisIdrevisionsIdr   z--apiz2Filtering by revision requires specifying its API.environmentsId)
CONCEPTSr   ParseAsDictr   r   RequiredArgumentExceptionr   DeploymentsClientr   )selfargsidentifierss      r!   RunList.Runy   s    --((..0779K8#	]	#u	,22IK 	K
h
#$+
&
'=!U*
m
$##((55r$    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr"   r1   __static_attributes__r3   r$   r!   r   r      s3    *"-H 4J 4Jl6r$   r   N)r8   
__future__r   r   r   googlecloudsdk.api_libr   googlecloudsdk.callioper   r   !googlecloudsdk.command_lib.apigeer	   r
   ListCommandr   r3   r$   r!   <module>rA      s6    4 &  ' ) ( . 6 ;k64 k6r$   