Lists the executions of a maintenance window. This includes information about when the maintenance window was scheduled to be active, and information about tasks registered and run with the maintenance window.
Parameters:
-
window_id
(MaintenanceWindowId)
–
The ID of the maintenance window whose executions should be retrieved.
-
filters
(Optional[MaintenanceWindowFilterList], default:
None
)
–
Each entry in the array is a structure containing:
-
Key. A string between 1 and 128 characters. Supported keys include ExecutedBefore and ExecutedAfter.
-
Values. An array of strings, each between 1 and 256 characters. Supported values are date/time strings in a valid ISO 8601 date/time format, such as 2024-11-04T05:00:00Z.
-
max_results
(Optional[MaintenanceWindowMaxResults], default:
None
)
–
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.
-
next_token
(Optional[NextToken], default:
None
)
–
The token for the next set of items to return. (You received this token from a previous call.)
Raises:
Source code in docs_src/capo_ssm/_services/ssm.py
| def describe_maintenance_window_executions(
self,
window_id: "capo_ssm.types.maintenance_window_id.MaintenanceWindowId",
*,
config_overrides: Optional[SSMClientConfig] = None,
filters: Optional[
"capo_ssm.types.maintenance_window_filter_list.MaintenanceWindowFilterList"
] = None,
max_results: Optional[
"capo_ssm.types.maintenance_window_max_results.MaintenanceWindowMaxResults"
] = None,
next_token: Optional["capo_ssm.types.next_token.NextToken"] = None,
) -> "capo_ssm.types.describe_maintenance_window_executions_result.DescribeMaintenanceWindowExecutionsResult":
"""<p>Lists the executions of a maintenance window. This includes information about when the maintenance window was scheduled to be active, and information about tasks registered and run with the maintenance window.</p>
Args:
window_id: <p>The ID of the maintenance window whose executions should be retrieved.</p>
filters: <p>Each entry in the array is a structure containing:</p> <ul> <li> <p>Key. A string between 1 and 128 characters. Supported keys include <code>ExecutedBefore</code> and <code>ExecutedAfter</code>.</p> </li> <li> <p>Values. An array of strings, each between 1 and 256 characters. Supported values are date/time strings in a valid ISO 8601 date/time format, such as <code>2024-11-04T05:00:00Z</code>.</p> </li> </ul>
max_results: <p>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.</p>
next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
Raises:
capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_ssm.types.describe_maintenance_window_executions_request.DescribeMaintenanceWindowExecutionsRequest]",
) -> OperationResponse[
"capo_ssm.types.describe_maintenance_window_executions_result.DescribeMaintenanceWindowExecutionsResult"
]:
import capo_ssm._operations.amazon_ssm.describe_maintenance_window_executions
output, http_response = (
capo_ssm._operations.amazon_ssm.describe_maintenance_window_executions.describe_maintenance_window_executions(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeMaintenanceWindowExecutions")
)
input_: capo_ssm.types.describe_maintenance_window_executions_request.DescribeMaintenanceWindowExecutionsRequest = {
"window_id": window_id
}
if filters is not None:
input_["filters"] = filters
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|