- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetParametersCommand
Get information about one or more parameters by specifying multiple parameter names.
To get information about a single parameter, you can use the GetParameter operation instead.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { SSMClient, GetParametersCommand } from "@aws-sdk/client-ssm"; // ES Modules import
// const { SSMClient, GetParametersCommand } = require("@aws-sdk/client-ssm"); // CommonJS import
const client = new SSMClient(config);
const input = { // GetParametersRequest
Names: [ // ParameterNameList // required
"STRING_VALUE",
],
WithDecryption: true || false,
};
const command = new GetParametersCommand(input);
const response = await client.send(command);
// { // GetParametersResult
// Parameters: [ // ParameterList
// { // Parameter
// Name: "STRING_VALUE",
// Type: "String" || "StringList" || "SecureString",
// Value: "STRING_VALUE",
// Version: Number("long"),
// Selector: "STRING_VALUE",
// SourceResult: "STRING_VALUE",
// LastModifiedDate: new Date("TIMESTAMP"),
// ARN: "STRING_VALUE",
// DataType: "STRING_VALUE",
// },
// ],
// InvalidParameters: [ // ParameterNameList
// "STRING_VALUE",
// ],
// };
GetParametersCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Names Required | string[] | undefined | The names or Amazon Resource Names (ARNs) of the parameters that you want to query. For parameters shared with you from another account, you must use the full ARNs. To query by parameter label, use The results for For information about shared parameters, see Working with shared parameters in the Amazon Web Services Systems Manager User Guide. |
WithDecryption | boolean | undefined | Return decrypted secure string value. Return decrypted values for secure string parameters. This flag is ignored for |
GetParametersCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
InvalidParameters | string[] | undefined | A list of parameters that aren't formatted correctly or don't run during an execution. |
Parameters | Parameter[] | undefined | A list of details for a parameter. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerError | server | An error occurred on the server side. |
InvalidKeyId | client | The query key ID isn't valid. |
SSMServiceException | Base exception class for all service exceptions from SSM service. |