
    	                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddlm
Z
 ddlmZ ddlmZ  e
j                  e
j                  j                         G d	 d
ej                   e
j"                               Zy)zresources describe command.    )absolute_import)division)unicode_literals)
exceptions)dm_api_util)dm_base)basec                   .    e Zd ZdZddiZed        Zd Zy)DescribezkProvide information about a resource.

  This command prints out all available details about a resource.
  EXAMPLESzj
To display information about a resource, run:

  $ {command} --deployment=my-deployment my-resource-name
c                 *    | j                  dd       y)zArgs is called by calliope to gather arguments for this command.

    Args:
      parser: An argparse parser that you can use to add arguments that go
          on the command line after this command. Positional arguments are
          allowed.
    resourcezResource name.)helpN)add_argument)parsers    4lib/surface/deployment_manager/resources/describe.pyArgszDescribe.Args-   s     
)9:    c                 P   	 | j                   j                  j                  | j                  j	                  t        j                         |j                  |j                              S # t        j                  $ r)}t        j                  |t        j                        d}~ww xY w)a  Run 'resources describe'.

    Args:
      args: argparse.Namespace, The arguments that this command was invoked
          with.

    Returns:
      The requested resource.

    Raises:
      HttpException: An http error response was received while executing api
          request.
    )project
deploymentr   N)client	resourcesGetmessages$DeploymentmanagerResourcesGetRequestr   
GetProjectr   r   apitools_exceptions	HttpErrorr   HttpExceptionr   HTTP_ERROR_FORMAT)selfargserrors      r   RunzDescribe.Run8   s    	K[[""&&
--
<
<((*}} =   (( K$$UK,I,IJJKs   A&A) )B%<$B  B%N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r%    r   r   r   r      s2      - ; ;Kr   r   N)r)   
__future__r   r   r   apitools.base.pyr   r   )googlecloudsdk.api_lib.deployment_managerr   r   googlecloudsdk.callioper	   UseDmApiDmApiVersionV2DescribeCommand	DmCommandr   r,   r   r   <module>r6      sg     " &  ' > A = ( . '&&))*0Kt##W%6%6 0K +0Kr   