
    y                         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 describe an Apigee API deployment.    )absolute_import)division)unicode_literals)apigee)base)defaults)errors)resource_argsc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Describe   z(Describe an Apigee API proxy deployment.z  {description}

  `{command}` retrieves the status of a specific API proxy's deployment to a
  specific environment.
          a>    To get the status of a deployment in the active Cloud Platform project, which
  deploys ``my-proxy'' into the ``prod'' environment, run:

      $ {command} --api=my-proxy --environment=prod

  To get the status of that deployment as a JSON object, run:

      $ {command} --api=my-proxy --environment=prod --format=json

  To get the status of a deployment in an organization called ``my-org'', which
  deploys version 3 of the proxy ``my-proxy'' into the ``test'' environment,
  run:

      $ {command} 3 --organization=my-org --environment=test --api=my-proxy
          )DESCRIPTIONEXAMPLESc                     SSSS.n[         R                  " 5       [         R                  " SS5      /n[        R                  " U SSUUS	9  g )
NzDeployed API proxy.z,Environment in which the proxy was deployed.zApigee Organization of the proxy and environment. If unspecified, the Cloud Platform project's associated organization will be used.)apienvironmentorganizationrevisionautoz%organization.environment.api.revisiona  API proxy revision and environment of the deployment to be described.


To get a list of deployed proxies and their environments, run:

    $ {parent_command} list

REVISION can either be a positive revision number, or the special value
``auto'', which will choose whichever revision of API is currently deployed in
ENVIRONMENT, or return an error if more than one revision is deployed.


If REVISION is unspecified, the default is ``auto''.

)fallthroughs
help_texts)r   !GCPProductOrganizationFallthroughStaticFallthroughr
   AddSingleResourceArgument)parser	help_textr   s      *lib/surface/apigee/deployments/describe.pyArgsDescribe.Args9   s^     %E6I 	224"":v6L ++/	  ")    c                 0   UR                   R                  R                  5       R                  5       nUS   S:X  a  US	 [        R
                  " U5        [        R                  R                  U5      nU(       d  [        R                  " SUS5      eUS   $ )zRun the describe command.revisionsIdr   
deploymentGETr   )CONCEPTSr   ParseAsDictr   FallBackToDeployedProxyRevisionr   DeploymentsClientListr	   EntityNotFoundError)selfargsidentifiersdeploymentss       r   RunDescribe.Run\   s    --((..0779K=!V+
m
$..{; **//<K&&|[%HHq>r     N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r0   __static_attributes__r2   r    r   r   r      s0    0-6    Dr    r   N)r7   
__future__r   r   r   googlecloudsdk.api_libr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.apigeer   r	   r
   DescribeCommandr   r2   r    r   <module>r@      s6    4 &  ' ) ( 6 4 ;Mt## Mr    