HEX
Server: LiteSpeed
System: Linux ip-172-31-76-142.ec2.internal 4.14.158-129.185.amzn2.x86_64 #1 SMP Tue Dec 24 03:15:32 UTC 2019 x86_64
User: 69b4844ae61d4e92bf26ad98af552775 (1065)
PHP: 7.2.27
Disabled: exec,passthru,shell_exec,system,eval
Upload Files
File: //usr/lib/python2.7/site-packages/awscli/examples/ssm/get-parameters.rst
**To list the values for a parameter**

This example lists the values for a parameter.

Command::

  aws ssm get-parameters --names "helloWorld"
  
Output::

  {
    "Parameters": [
        {
            "Name": "helloWorld",
            "Type": "String",
            "Value": "good day sunshine",
            "Version": 1,
            "LastModifiedDate": 1542308384.49,
            "ARN": "arn:aws:ssm:us-east-1:123456789012:parameter/helloWorld"
        }
    ],
    "InvalidParameters": []
  }

To list the name and value of multiple parameters the --query argument can be used with a list of names.

Command::
  
  aws ssm get-parameters --names key1 key2 --query "Parameters[*].{Name:Name,Value:Value}"

Output::
  
  [
    {
        "Name": "key1",
        "Value": "value1"
    },
    {
        "Name": "key2",
        "Value": "value2"
    }
  ]