aws ssm get-parameter
Get information about a single parameter by specifying the parameter name. AWS CLI reference
4 examples 2 options Its page in the AWS CLI reference
Examples
Example 1: To display the value of a parameter
The following get-parameter example lists the value for the specified single parameter.
aws ssm get-parameter --name "MyStringParameter"Identify--nameThe name or Amazon Resource Name (ARN) of the parameter that you want to query.Its output
{
"Parameter": {
"Name": "MyStringParameter",
"Type": "String",
"Value": "Veni",
"Version": 1,
"LastModifiedDate": 1530018761.888,
"ARN": "arn:aws:ssm:us-west-2:123456789012:parameter/MyStringParameter",
"DataType": "text"
}
}For more information, see Working with Parameter Store in the AWS Systems Manager User Guide.
Example 2: To decrypt the value of a SecureString parameter
The following get-parameter example decrypts the value of the specified SecureString parameter.
aws ssm get-parameter --name "MySecureStringParameter" --with-decryptionIdentify--nameThe name or Amazon Resource Name (ARN) of the parameter that you want to query.--with-decryptionReturn decrypted values for secure string parameters.Its output
{
"Parameter": {
"Name": "MySecureStringParameter",
"Type": "SecureString",
"Value": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
"Version": 2,
"LastModifiedDate": 1582155479.205,
"ARN": "arn:aws:ssm:us-west-2:123456789012:parameter/MySecureStringParameter",
"DataType": "text"
}
}For more information, see Working with Parameter Store in the AWS Systems Manager User Guide.
Example 3: To display the value of a parameter using labels
The following get-parameter example lists the value for the specified single parameter with a specified label.
aws ssm get-parameter --name "MyParameter:label"Identify--nameThe name or Amazon Resource Name (ARN) of the parameter that you want to query.Its output
{
"Parameter": {
"Name": "MyParameter",
"Type": "String",
"Value": "parameter version 2",
"Version": 2,
"Selector": ":label",
"LastModifiedDate": "2021-07-12T09:49:15.865000-07:00",
"ARN": "arn:aws:ssm:us-west-2:123456789111:parameter/MyParameter",
"DataType": "text"
}
}For more information, see Working with parameter labels in the AWS Systems Manager User Guide.
Example 4: To display the value of a parameter using versions
The following get-parameter example lists the value for the specified single parameter version.
aws ssm get-parameter --name "MyParameter:2"Identify--nameThe name or Amazon Resource Name (ARN) of the parameter that you want to query.Its output
{
"Parameter": {
"Name": "MyParameter",
"Type": "String",
"Value": "parameter version 2",
"Version": 2,
"Selector": ":2",
"LastModifiedDate": "2021-07-12T09:49:15.865000-07:00",
"ARN": "arn:aws:ssm:us-west-2:123456789111:parameter/MyParameter",
"DataType": "text"
}
}For more information, see Working with parameter labels in the AWS Systems Manager User Guide.
Options
--nameThe name or Amazon Resource Name (ARN) of the parameter that you want to query.--with-decryptionReturn decrypted values for secure string parameters.