- 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.
DescribeMaintenanceWindowsCommand
Retrieves the maintenance windows in an Amazon Web Services account.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { SSMClient, DescribeMaintenanceWindowsCommand } from "@aws-sdk/client-ssm"; // ES Modules import
// const { SSMClient, DescribeMaintenanceWindowsCommand } = require("@aws-sdk/client-ssm"); // CommonJS import
const client = new SSMClient(config);
const input = { // DescribeMaintenanceWindowsRequest
Filters: [ // MaintenanceWindowFilterList
{ // MaintenanceWindowFilter
Key: "STRING_VALUE",
Values: [ // MaintenanceWindowFilterValues
"STRING_VALUE",
],
},
],
MaxResults: Number("int"),
NextToken: "STRING_VALUE",
};
const command = new DescribeMaintenanceWindowsCommand(input);
const response = await client.send(command);
// { // DescribeMaintenanceWindowsResult
// WindowIdentities: [ // MaintenanceWindowIdentityList
// { // MaintenanceWindowIdentity
// WindowId: "STRING_VALUE",
// Name: "STRING_VALUE",
// Description: "STRING_VALUE",
// Enabled: true || false,
// Duration: Number("int"),
// Cutoff: Number("int"),
// Schedule: "STRING_VALUE",
// ScheduleTimezone: "STRING_VALUE",
// ScheduleOffset: Number("int"),
// EndDate: "STRING_VALUE",
// StartDate: "STRING_VALUE",
// NextExecutionTime: "STRING_VALUE",
// },
// ],
// NextToken: "STRING_VALUE",
// };
DescribeMaintenanceWindowsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Filters | MaintenanceWindowFilter[] | undefined | Optional filters used to narrow down the scope of the returned maintenance windows. Supported filter keys are |
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.) |
DescribeMaintenanceWindowsCommand 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. If there are no additional items to return, the string is empty. |
WindowIdentities | MaintenanceWindowIdentity[] | undefined | Information about the maintenance windows. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerError | server | An error occurred on the server side. |
SSMServiceException | Base exception class for all service exceptions from SSM service. |