Amazon Simple Systems Manager (SSM)

2018/07/26 - Amazon Simple Systems Manager (SSM) - 1 new 4 updated api methods

Changes  This release updates AWS Systems Manager APIs to allow customers to attach labels to history parameter records and reference history parameter records via labels. It also adds Parameter Store integration with AWS Secrets Manager to allow referencing and retrieving AWS Secrets Manager's secrets from Parameter Store.

LabelParameterVersion (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.label_parameter_version(
    Name='string',
    ParameterVersion=123,
    Labels=[
        'string',
    ]
)
type Name

string

param Name

[REQUIRED]

type ParameterVersion

integer

param ParameterVersion

type Labels

list

param Labels

[REQUIRED]

  • (string) --

rtype

dict

returns

Response Syntax

{
    'InvalidLabels': [
        'string',
    ]
}

Response Structure

  • (dict) --

    • InvalidLabels (list) --

      • (string) --

GetParameter (updated) Link ¶
Changes (response)
{'Parameter': {'ARN': 'string',
               'LastModifiedDate': 'timestamp',
               'Selector': 'string',
               'SourceResult': 'string'}}

Get information about a parameter by using the parameter name. Don't confuse this API action with the GetParameters API action.

See also: AWS API Documentation

Request Syntax

client.get_parameter(
    Name='string',
    WithDecryption=True|False
)
type Name

string

param Name

[REQUIRED]

The name of the parameter you want to query.

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'
    }
}

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, String list, Secure string.

      • Value (string) --

        The parameter value.

      • 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 AWS 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.

GetParameterHistory (updated) Link ¶
Changes (response)
{'Parameters': {'Labels': ['string']}}

Query a list of all parameters used by the AWS account.

See also: AWS API Documentation

Request Syntax

client.get_parameter_history(
    Name='string',
    WithDecryption=True|False,
    MaxResults=123,
    NextToken='string'
)
type Name

string

param Name

[REQUIRED]

The name of a parameter you want to query.

type WithDecryption

boolean

param WithDecryption

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

type MaxResults

integer

param MaxResults

The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

type NextToken

string

param NextToken

The token for the next set of items to return. (You received this token from a previous call.)

rtype

dict

returns

Response Syntax

{
    'Parameters': [
        {
            'Name': 'string',
            'Type': 'String'|'StringList'|'SecureString',
            'KeyId': 'string',
            'LastModifiedDate': datetime(2015, 1, 1),
            'LastModifiedUser': 'string',
            'Description': 'string',
            'Value': 'string',
            'AllowedPattern': 'string',
            'Version': 123,
            'Labels': [
                'string',
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Parameters (list) --

      A list of parameters returned by the request.

      • (dict) --

        Information about parameter usage.

        • Name (string) --

          The name of the parameter.

        • Type (string) --

          The type of parameter used.

        • KeyId (string) --

          The ID of the query key used for this parameter.

        • LastModifiedDate (datetime) --

          Date the parameter was last changed or updated.

        • LastModifiedUser (string) --

          Amazon Resource Name (ARN) of the AWS user who last changed the parameter.

        • Description (string) --

          Information about the parameter.

        • Value (string) --

          The parameter value.

        • AllowedPattern (string) --

          Parameter names can include the following letters and symbols.

          a-zA-Z0-9_.-

        • Version (integer) --

          The parameter version.

        • Labels (list) --

          Labels assigned to the parameter version.

          • (string) --

    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

GetParameters (updated) Link ¶
Changes (response)
{'Parameters': {'ARN': 'string',
                'LastModifiedDate': 'timestamp',
                'Selector': 'string',
                'SourceResult': 'string'}}

Get details of a parameter. Don't confuse this API action with the GetParameter API action.

See also: AWS API Documentation

Request Syntax

client.get_parameters(
    Names=[
        'string',
    ],
    WithDecryption=True|False
)
type Names

list

param Names

[REQUIRED]

Names of the parameters for which you want to query information.

  • (string) --

type WithDecryption

boolean

param WithDecryption

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

rtype

dict

returns

Response Syntax

{
    'Parameters': [
        {
            'Name': 'string',
            'Type': 'String'|'StringList'|'SecureString',
            'Value': 'string',
            'Version': 123,
            'Selector': 'string',
            'SourceResult': 'string',
            'LastModifiedDate': datetime(2015, 1, 1),
            'ARN': 'string'
        },
    ],
    'InvalidParameters': [
        'string',
    ]
}

Response Structure

  • (dict) --

    • Parameters (list) --

      A list of details for a parameter.

      • (dict) --

        An Amazon EC2 Systems Manager parameter in Parameter Store.

        • Name (string) --

          The name of the parameter.

        • Type (string) --

          The type of parameter. Valid values include the following: String, String list, Secure string.

        • Value (string) --

          The parameter value.

        • 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 AWS 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.

    • InvalidParameters (list) --

      A list of parameters that are not formatted correctly or do not run when executed.

      • (string) --

GetParametersByPath (updated) Link ¶
Changes (response)
{'Parameters': {'ARN': 'string',
                'LastModifiedDate': 'timestamp',
                'Selector': 'string',
                'SourceResult': 'string'}}

Retrieve parameters in a specific hierarchy. For more information, see Working with Systems Manager Parameters in the AWS Systems Manager User Guide .

Request results are returned on a best-effort basis. If you specify MaxResults in the request, the response includes information up to the limit specified. The number of items returned, however, can be between zero and the value of MaxResults . If the service reaches an internal limit while processing the results, it stops the operation and returns the matching values up to that point and a NextToken . You can specify the NextToken in a subsequent call to get the next set of results.

Note

This API action doesn't support filtering by tags.

See also: AWS API Documentation

Request Syntax

client.get_parameters_by_path(
    Path='string',
    Recursive=True|False,
    ParameterFilters=[
        {
            'Key': 'string',
            'Option': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    WithDecryption=True|False,
    MaxResults=123,
    NextToken='string'
)
type Path

string

param Path

[REQUIRED]

The hierarchy for the parameter. Hierarchies start with a forward slash (/) and end with the parameter name. A parameter name hierarchy can have a maximum of 15 levels. Here is an example of a hierarchy: /Finance/Prod/IAD/WinServ2016/license33

type Recursive

boolean

param Recursive

Retrieve all parameters within a hierarchy.

Warning

If a user has access to a path, then the user can access all levels of that path. For example, if a user has permission to access path /a, then the user can also access /a/b. Even if a user has explicitly been denied access in IAM for parameter /a, they can still call the GetParametersByPath API action recursively and view /a/b.

type ParameterFilters

list

param ParameterFilters

Filters to limit the request results.

Note

You can't filter using the parameter name.

  • (dict) --

    One or more filters. Use a filter to return a more specific list of results.

    Note

    The Name field can't be used with the GetParametersByPath API action.

    • Key (string) -- [REQUIRED]

      The name of the filter.

    • Option (string) --

      Valid options are Equals and BeginsWith. For Path filter, valid options are Recursive and OneLevel.

    • Values (list) --

      The value you want to search for.

      • (string) --

type WithDecryption

boolean

param WithDecryption

Retrieve all parameters in a hierarchy with their value decrypted.

type MaxResults

integer

param MaxResults

The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

type NextToken

string

param NextToken

A token to start the list. Use this token to get the next set of results.

rtype

dict

returns

Response Syntax

{
    'Parameters': [
        {
            'Name': 'string',
            'Type': 'String'|'StringList'|'SecureString',
            'Value': 'string',
            'Version': 123,
            'Selector': 'string',
            'SourceResult': 'string',
            'LastModifiedDate': datetime(2015, 1, 1),
            'ARN': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Parameters (list) --

      A list of parameters found in the specified hierarchy.

      • (dict) --

        An Amazon EC2 Systems Manager parameter in Parameter Store.

        • Name (string) --

          The name of the parameter.

        • Type (string) --

          The type of parameter. Valid values include the following: String, String list, Secure string.

        • Value (string) --

          The parameter value.

        • 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 AWS 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.

    • NextToken (string) --

      The token for the next set of items to return. Use this token to get the next set of results.