- 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.
DescribeParametersCommand
Lists the parameters in your Amazon Web Services account or the parameters shared with you when you enable the Shared option.
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.
If you change the KMS key alias for the KMS key used to encrypt a parameter, then you must also update the key alias the parameter uses to reference KMS. Otherwise, DescribeParameters
retrieves whatever the original key alias was referencing.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { SSMClient, DescribeParametersCommand } from "@aws-sdk/client-ssm"; // ES Modules import
// const { SSMClient, DescribeParametersCommand } = require("@aws-sdk/client-ssm"); // CommonJS import
const client = new SSMClient(config);
const input = { // DescribeParametersRequest
Filters: [ // ParametersFilterList
{ // ParametersFilter
Key: "Name" || "Type" || "KeyId", // required
Values: [ // ParametersFilterValueList // required
"STRING_VALUE",
],
},
],
ParameterFilters: [ // ParameterStringFilterList
{ // ParameterStringFilter
Key: "STRING_VALUE", // required
Option: "STRING_VALUE",
Values: [ // ParameterStringFilterValueList
"STRING_VALUE",
],
},
],
MaxResults: Number("int"),
NextToken: "STRING_VALUE",
Shared: true || false,
};
const command = new DescribeParametersCommand(input);
const response = await client.send(command);
// { // DescribeParametersResult
// Parameters: [ // ParameterMetadataList
// { // ParameterMetadata
// Name: "STRING_VALUE",
// ARN: "STRING_VALUE",
// Type: "String" || "StringList" || "SecureString",
// KeyId: "STRING_VALUE",
// LastModifiedDate: new Date("TIMESTAMP"),
// LastModifiedUser: "STRING_VALUE",
// Description: "STRING_VALUE",
// AllowedPattern: "STRING_VALUE",
// Version: Number("long"),
// Tier: "Standard" || "Advanced" || "Intelligent-Tiering",
// Policies: [ // ParameterPolicyList
// { // ParameterInlinePolicy
// PolicyText: "STRING_VALUE",
// PolicyType: "STRING_VALUE",
// PolicyStatus: "STRING_VALUE",
// },
// ],
// DataType: "STRING_VALUE",
// },
// ],
// NextToken: "STRING_VALUE",
// };
DescribeParametersCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Filters | ParametersFilter[] | undefined | This data type is deprecated. Instead, use |
MaxResults | number | undefined | 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. |
NextToken | string | undefined | The token for the next set of items to return. (You received this token from a previous call.) |
ParameterFilters | ParameterStringFilter[] | undefined | Filters to limit the request results. |
Shared | boolean | undefined | Lists parameters that are shared with you. By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the PutResourcePolicy command to be returned, the associated For more information about sharing parameters, see Working with shared parameters in the Amazon Web Services Systems Manager User Guide. |
DescribeParametersCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
NextToken | string | undefined | The token to use when requesting the next set of items. |
Parameters | ParameterMetadata[] | undefined | Parameters returned by the request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerError | server | An error occurred on the server side. |
InvalidFilterKey | client | The specified key isn't valid. |
InvalidFilterOption | client | The specified filter option isn't valid. Valid options are Equals and BeginsWith. For Path filter, valid options are Recursive and OneLevel. |
InvalidFilterValue | client | The filter value isn't valid. Verify the value and try again. |
InvalidNextToken | client | The specified token isn't valid. |
SSMServiceException | Base exception class for all service exceptions from SSM service. |