Method: Aws::SSM::Client#get_parameter

Defined in:
lib/aws-sdk-ssm/client.rb

#get_parameter(params = {}) ⇒ Types::GetParameterResult

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 markdown=“1”> To get information about more than one parameter at a time, use the GetParameters operation.

</note>

Examples:

Request syntax with placeholder values


resp = client.get_parameter({
  name: "PSParameterName", # required
  with_decryption: false,
})

Response structure


resp.parameter.name #=> String
resp.parameter.type #=> String, one of "String", "StringList", "SecureString"
resp.parameter.value #=> String
resp.parameter.version #=> Integer
resp.parameter.selector #=> String
resp.parameter.source_result #=> String
resp.parameter.last_modified_date #=> Time
resp.parameter.arn #=> String
resp.parameter.data_type #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    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] in the *Amazon Web Services Systems Manager User Guide*.

    [1]: docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html

  • :with_decryption (Boolean)

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

Returns:

See Also:



7269
7270
7271
7272
# File 'lib/aws-sdk-ssm/client.rb', line 7269

def get_parameter(params = {}, options = {})
  req = build_request(:get_parameter, params)
  req.send_request(options)
end