Seleziona le tue preferenze relative ai cookie

Utilizziamo cookie essenziali e strumenti simili necessari per fornire il nostro sito e i nostri servizi. Utilizziamo i cookie prestazionali per raccogliere statistiche anonime in modo da poter capire come i clienti utilizzano il nostro sito e apportare miglioramenti. I cookie essenziali non possono essere disattivati, ma puoi fare clic su \"Personalizza\" o \"Rifiuta\" per rifiutare i cookie prestazionali.

Se sei d'accordo, AWS e le terze parti approvate utilizzeranno i cookie anche per fornire utili funzionalità del sito, ricordare le tue preferenze e visualizzare contenuti pertinenti, inclusa la pubblicità pertinente. Per continuare senza accettare questi cookie, fai clic su \"Continua\" o \"Rifiuta\". Per effettuare scelte più dettagliate o saperne di più, fai clic su \"Personalizza\".

GetMaintenanceWindow - AWS Systems Manager
Questa pagina non è tradotta nella tua lingua. Richiedi traduzione

GetMaintenanceWindow

Retrieves a maintenance window.

Request Syntax

{ "WindowId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

WindowId

The ID of the maintenance window for which you want to retrieve information.

Type: String

Length Constraints: Fixed length of 20.

Pattern: ^mw-[0-9a-f]{17}$

Required: Yes

Response Syntax

{ "AllowUnassociatedTargets": boolean, "CreatedDate": number, "Cutoff": number, "Description": "string", "Duration": number, "Enabled": boolean, "EndDate": "string", "ModifiedDate": number, "Name": "string", "NextExecutionTime": "string", "Schedule": "string", "ScheduleOffset": number, "ScheduleTimezone": "string", "StartDate": "string", "WindowId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

AllowUnassociatedTargets

Whether targets must be registered with the maintenance window before tasks can be defined for those targets.

Type: Boolean

CreatedDate

The date the maintenance window was created.

Type: Timestamp

Cutoff

The number of hours before the end of the maintenance window that AWS Systems Manager stops scheduling new tasks for execution.

Type: Integer

Valid Range: Minimum value of 0. Maximum value of 23.

Description

The description of the maintenance window.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Duration

The duration of the maintenance window in hours.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 24.

Enabled

Indicates whether the maintenance window is enabled.

Type: Boolean

EndDate

The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive. The maintenance window won't run after this specified time.

Type: String

ModifiedDate

The date the maintenance window was last modified.

Type: Timestamp

Name

The name of the maintenance window.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 128.

Pattern: ^[a-zA-Z0-9_\-.]{3,128}$

NextExecutionTime

The next time the maintenance window will actually run, taking into account any specified times for the maintenance window to become active or inactive.

Type: String

Schedule

The schedule of the maintenance window in the form of a cron or rate expression.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

ScheduleOffset

The number of days to wait to run a maintenance window after the scheduled cron expression date and time.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 6.

ScheduleTimezone

The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website.

Type: String

StartDate

The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active. The maintenance window won't run before this specified time.

Type: String

WindowId

The ID of the created maintenance window.

Type: String

Length Constraints: Fixed length of 20.

Pattern: ^mw-[0-9a-f]{17}$

Errors

For information about the errors that are common to all actions, see Common Errors.

DoesNotExistException

Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.

For information about resource quotas in AWS Systems Manager, see Systems Manager service quotas in the Amazon Web Services General Reference.

HTTP Status Code: 400

InternalServerError

An error occurred on the server side.

HTTP Status Code: 500

Examples

Example

This example illustrates one usage of GetMaintenanceWindow.

Sample Request

POST / HTTP/1.1 Host: ssm.us-east-2.amazonaws.com Accept-Encoding: identity Content-Length: 36 X-Amz-Target: AmazonSSM.GetMaintenanceWindow X-Amz-Date: 20240312T203140Z User-Agent: aws-cli/1.11.180 Python/2.7.9 Windows/8 botocore/1.7.38 Content-Type: application/x-amz-json-1.1 Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20240312/us-east-2/ssm/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=39c3b3042cd2aEXAMPLE { "WindowId": "mw-0c50858d01EXAMPLE" }

Sample Response

{ "AllowUnassociatedTargets": true, "CreatedDate": 1515006912.957, "Cutoff": 1, "Duration": 6, "Enabled": true, "ModifiedDate": "2024-01-01T10:04:04.099Z", "Name": "My-Maintenance-Window", "Schedule": "rate(3 days)", "WindowId": "mw-0c50858d01EXAMPLE", "NextExecutionTime": "2024-02-25T00:08:15.099Z" }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

PrivacyCondizioni del sitoPreferenze cookie
© 2025, Amazon Web Services, Inc. o società affiliate. Tutti i diritti riservati.