Skip to content

describe_maintenance_window_schedule

describe_maintenance_window_schedule(
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    window_id: Optional[MaintenanceWindowId] = None,
    targets: Optional[Targets] = None,
    resource_type: Optional[MaintenanceWindowResourceType] = None,
    filters: Optional[PatchOrchestratorFilterList] = None,
    max_results: Optional[MaintenanceWindowSearchMaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeMaintenanceWindowScheduleResult

Retrieves information about upcoming executions of a maintenance window.

Parameters:

  • window_id (Optional[MaintenanceWindowId], default: None ) –

    The ID of the maintenance window to retrieve information about.

  • targets (Optional[Targets], default: None ) –

    The managed node ID or key-value pair to retrieve information about.

  • resource_type (Optional[MaintenanceWindowResourceType], default: None ) –

    The type of resource you want to retrieve information about. For example, INSTANCE.

  • filters (Optional[PatchOrchestratorFilterList], default: None ) –

    Filters used to limit the range of results. For example, you can limit maintenance window executions to only those scheduled before or after a certain date and time.

  • max_results (Optional[MaintenanceWindowSearchMaxResults], 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:

  • 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 Amazon Web Services Systems Manager, see Systems Manager service quotas in the Amazon Web Services General Reference.

  • InternalServerError –

    An error occurred on the server side.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_ssm/_services/ssm.py
def describe_maintenance_window_schedule(
    self,
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    window_id: Optional[
        "capo_ssm.types.maintenance_window_id.MaintenanceWindowId"
    ] = None,
    targets: Optional["capo_ssm.types.targets.Targets"] = None,
    resource_type: Optional[
        "capo_ssm.types.maintenance_window_resource_type.MaintenanceWindowResourceType"
    ] = None,
    filters: Optional[
        "capo_ssm.types.patch_orchestrator_filter_list.PatchOrchestratorFilterList"
    ] = None,
    max_results: Optional[
        "capo_ssm.types.maintenance_window_search_max_results.MaintenanceWindowSearchMaxResults"
    ] = None,
    next_token: Optional["capo_ssm.types.next_token.NextToken"] = None,
) -> "capo_ssm.types.describe_maintenance_window_schedule_result.DescribeMaintenanceWindowScheduleResult":
    """<p>Retrieves information about upcoming executions of a maintenance window.</p>

    Args:
        window_id: <p>The ID of the maintenance window to retrieve information about.</p>
        targets: <p>The managed node ID or key-value pair to retrieve information about.</p>
        resource_type: <p>The type of resource you want to retrieve information about. For example, <code>INSTANCE</code>.</p>
        filters: <p>Filters used to limit the range of results. For example, you can limit maintenance window executions to only those scheduled before or after a certain date and time.</p>
        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.does_not_exist_exception.DoesNotExistException: <p>Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.</p> <p>For information about resource quotas in Amazon Web Services Systems Manager, see <a href="https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm">Systems Manager service quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
        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_schedule_request.DescribeMaintenanceWindowScheduleRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.describe_maintenance_window_schedule_result.DescribeMaintenanceWindowScheduleResult"
    ]:
        import capo_ssm._operations.amazon_ssm.describe_maintenance_window_schedule

        output, http_response = (
            capo_ssm._operations.amazon_ssm.describe_maintenance_window_schedule.describe_maintenance_window_schedule(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeMaintenanceWindowSchedule")
    )
    input_: capo_ssm.types.describe_maintenance_window_schedule_request.DescribeMaintenanceWindowScheduleRequest = {}
    if window_id is not None:
        input_["window_id"] = window_id
    if targets is not None:
        input_["targets"] = targets
    if resource_type is not None:
        input_["resource_type"] = resource_type
    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