:doc:`SSM <../../ssm>` / Client / get_parameter

*************
get_parameter
*************



.. py:method:: SSM.Client.get_parameter(**kwargs)

  

  Get information about a single parameter by specifying the parameter name.

   

  Parameter names can't contain spaces. The service removes any spaces specified for the beginning or end of a parameter name. If the specified name for a parameter contains spaces between characters, the request fails with a ``ValidationException`` error.

   

  .. note::

    

    To get information about more than one parameter at a time, use the  GetParameters operation.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/GetParameter>`_  


  **Request Syntax**
  ::

    response = client.get_parameter(
        Name='string',
        WithDecryption=True|False
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    The name or Amazon Resource Name (ARN) of the parameter that you want to query. For parameters shared with you from another account, you must use the full ARN.

     

    To query by parameter label, use ``"Name": "name:label"``. To query by parameter version, use ``"Name": "name:version"``.

     

    For more information about shared parameters, see `Working with shared parameters <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html>`__ in the *Amazon Web Services Systems Manager User Guide*.

    

  
  :type WithDecryption: boolean
  :param WithDecryption: 

    Return decrypted values for secure string parameters. This flag is ignored for ``String`` and ``StringList`` parameter types.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Parameter': {
              'Name': 'string',
              'Type': 'String'|'StringList'|'SecureString',
              'Value': 'string',
              'Version': 123,
              'Selector': 'string',
              'SourceResult': 'string',
              'LastModifiedDate': datetime(2015, 1, 1),
              'ARN': 'string',
              'DataType': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Parameter** *(dict) --* 

        Information about a parameter.

        
        

        - **Name** *(string) --* 

          The name of the parameter.

          
        

        - **Type** *(string) --* 

          The type of parameter. Valid values include the following: ``String``, ``StringList``, and ``SecureString``.

           

          .. note::

            

            If type is ``StringList``, the system returns a comma-separated string with no spaces between commas in the ``Value`` field.

            

          
        

        - **Value** *(string) --* 

          The parameter value.

           

          .. note::

            

            If type is ``StringList``, the system returns a comma-separated string with no spaces between commas in the ``Value`` field.

            

          
        

        - **Version** *(integer) --* 

          The parameter version.

          
        

        - **Selector** *(string) --* 

          Either the version number or the label used to retrieve the parameter value. Specify selectors by using one of the following formats:

           

          parameter_name:version

           

          parameter_name:label

          
        

        - **SourceResult** *(string) --* 

          Applies to parameters that reference information in other Amazon Web Services services. ``SourceResult`` is the raw result or response from the source.

          
        

        - **LastModifiedDate** *(datetime) --* 

          Date the parameter was last changed or updated and the parameter version was created.

          
        

        - **ARN** *(string) --* 

          The Amazon Resource Name (ARN) of the parameter.

          
        

        - **DataType** *(string) --* 

          The data type of the parameter, such as ``text`` or ``aws:ec2:image``. The default is ``text``.

          
    
  
  **Exceptions**
  
  *   :py:class:`SSM.Client.exceptions.InternalServerError`

  
  *   :py:class:`SSM.Client.exceptions.InvalidKeyId`

  
  *   :py:class:`SSM.Client.exceptions.ParameterNotFound`

  
  *   :py:class:`SSM.Client.exceptions.ParameterVersionNotFound`

  