Skip to content

start_change_request_execution

start_change_request_execution(
    document_name: DocumentARN,
    runbooks: Runbooks,
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    scheduled_time: Optional[DateTime] = None,
    document_version: Optional[DocumentVersion] = None,
    parameters: Optional[AutomationParameterMap] = None,
    change_request_name: Optional[ChangeRequestName] = None,
    client_token: Optional[IdempotencyToken] = None,
    auto_approve: Optional[Boolean] = None,
    tags: Optional[TagList] = None,
    scheduled_end_time: Optional[DateTime] = None,
    change_details: Optional[ChangeDetailsValue] = None,
) -> StartChangeRequestExecutionResult

Amazon Web Services Systems Manager Change Manager is no longer open to new customers. Existing customers can continue to use the service as normal. For more information, see Amazon Web Services Systems Manager Change Manager availability change.

Creates a change request for Change Manager. The Automation runbooks specified in the change request run only after all required approvals for the change request have been received.

Parameters:

  • scheduled_time (Optional[DateTime], default: None ) –

    The date and time specified in the change request to run the Automation runbooks.

    The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.

  • document_name (DocumentARN) –

    The name of the change template document to run during the runbook workflow.

  • document_version (Optional[DocumentVersion], default: None ) –

    The version of the change template document to run during the runbook workflow.

  • parameters (Optional[AutomationParameterMap], default: None ) –

    A key-value map of parameters that match the declared parameters in the change template document.

  • change_request_name (Optional[ChangeRequestName], default: None ) –

    The name of the change request associated with the runbook workflow to be run.

  • client_token (Optional[IdempotencyToken], default: None ) –

    The user-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.

  • auto_approve (Optional[Boolean], default: None ) –

    Indicates whether the change request can be approved automatically without the need for manual approvals.

    If AutoApprovable is enabled in a change template, then setting AutoApprove to true in StartChangeRequestExecution creates a change request that bypasses approver review.

    Change Calendar restrictions are not bypassed in this scenario. If the state of an associated calendar is CLOSED, change freeze approvers must still grant permission for this change request to run. If they don't, the change won't be processed until the calendar state is again OPEN.

  • runbooks (Runbooks) –

    Information about the Automation runbooks that are run during the runbook workflow.

    The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.

  • tags (Optional[TagList], default: None ) –

    Optional metadata that you assign to a resource. You can specify a maximum of five tags for a change request. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a change request to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:

    • Key=Environment,Value=Production

    • Key=Region,Value=us-east-2

    The Array Members maximum value is reported as 1000. This number includes capacity reserved for internal operations. When calling the StartChangeRequestExecution action, you can specify a maximum of 5 tags. You can, however, use the AddTagsToResource action to add up to a total of 50 tags to an existing change request configuration.

  • scheduled_end_time (Optional[DateTime], default: None ) –

    The time that the requester expects the runbook workflow related to the change request to complete. The time is an estimate only that the requester provides for reviewers.

  • change_details (Optional[ChangeDetailsValue], default: None ) –

    User-provided details about the change. If no details are provided, content specified in the Template information section of the associated change template is added.

Raises:

Source code in docs_src/capo_ssm/_services/ssm.py
def start_change_request_execution(
    self,
    document_name: "capo_ssm.types.document_arn.DocumentARN",
    runbooks: "capo_ssm.types.runbooks.Runbooks",
    *,
    config_overrides: Optional[SSMClientConfig] = None,
    scheduled_time: Optional["capo_ssm.types.date_time.DateTime"] = None,
    document_version: Optional[
        "capo_ssm.types.document_version.DocumentVersion"
    ] = None,
    parameters: Optional[
        "capo_ssm.types.automation_parameter_map.AutomationParameterMap"
    ] = None,
    change_request_name: Optional[
        "capo_ssm.types.change_request_name.ChangeRequestName"
    ] = None,
    client_token: Optional[
        "capo_ssm.types.idempotency_token.IdempotencyToken"
    ] = None,
    auto_approve: Optional["capo_ssm.types.boolean.Boolean"] = None,
    tags: Optional["capo_ssm.types.tag_list.TagList"] = None,
    scheduled_end_time: Optional["capo_ssm.types.date_time.DateTime"] = None,
    change_details: Optional[
        "capo_ssm.types.change_details_value.ChangeDetailsValue"
    ] = None,
) -> "capo_ssm.types.start_change_request_execution_result.StartChangeRequestExecutionResult":
    """<important> <p>Amazon Web Services Systems Manager Change Manager is no longer open to new customers. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html">Amazon Web Services Systems Manager Change Manager availability change</a>.</p> </important> <p>Creates a change request for Change Manager. The Automation runbooks specified in the change request run only after all required approvals for the change request have been received.</p>

    Args:
        scheduled_time: <p>The date and time specified in the change request to run the Automation runbooks.</p> <note> <p>The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.</p> </note>
        document_name: <p>The name of the change template document to run during the runbook workflow.</p>
        document_version: <p>The version of the change template document to run during the runbook workflow.</p>
        parameters: <p>A key-value map of parameters that match the declared parameters in the change template document.</p>
        change_request_name: <p>The name of the change request associated with the runbook workflow to be run.</p>
        client_token: <p>The user-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.</p>
        auto_approve: <p>Indicates whether the change request can be approved automatically without the need for manual approvals.</p> <p>If <code>AutoApprovable</code> is enabled in a change template, then setting <code>AutoApprove</code> to <code>true</code> in <code>StartChangeRequestExecution</code> creates a change request that bypasses approver review.</p> <note> <p>Change Calendar restrictions are not bypassed in this scenario. If the state of an associated calendar is <code>CLOSED</code>, change freeze approvers must still grant permission for this change request to run. If they don't, the change won't be processed until the calendar state is again <code>OPEN</code>. </p> </note>
        runbooks: <p>Information about the Automation runbooks that are run during the runbook workflow.</p> <note> <p>The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.</p> </note>
        tags: <p>Optional metadata that you assign to a resource. You can specify a maximum of five tags for a change request. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a change request to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:</p> <ul> <li> <p> <code>Key=Environment,Value=Production</code> </p> </li> <li> <p> <code>Key=Region,Value=us-east-2</code> </p> </li> </ul> <note> <p>The <code>Array Members</code> maximum value is reported as 1000. This number includes capacity reserved for internal operations. When calling the <code>StartChangeRequestExecution</code> action, you can specify a maximum of 5 tags. You can, however, use the <a>AddTagsToResource</a> action to add up to a total of 50 tags to an existing change request configuration.</p> </note>
        scheduled_end_time: <p>The time that the requester expects the runbook workflow related to the change request to complete. The time is an estimate only that the requester provides for reviewers.</p>
        change_details: <p>User-provided details about the change. If no details are provided, content specified in the <b>Template information</b> section of the associated change template is added.</p>

    Raises:
        capo_ssm.errors.automation_definition_not_approved_exception.AutomationDefinitionNotApprovedException: <p>Indicates that the Change Manager change template used in the change request was rejected or is still in a pending state.</p>
        capo_ssm.errors.automation_definition_not_found_exception.AutomationDefinitionNotFoundException: <p>An Automation runbook with the specified name couldn't be found.</p>
        capo_ssm.errors.automation_definition_version_not_found_exception.AutomationDefinitionVersionNotFoundException: <p>An Automation runbook with the specified name and version couldn't be found.</p>
        capo_ssm.errors.automation_execution_limit_exceeded_exception.AutomationExecutionLimitExceededException: <p>The number of simultaneously running Automation executions exceeded the allowable limit.</p>
        capo_ssm.errors.idempotent_parameter_mismatch.IdempotentParameterMismatch: <p>Error returned when an idempotent operation is retried and the parameters don't match the original call to the API with the same idempotency token. </p>
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.invalid_automation_execution_parameters_exception.InvalidAutomationExecutionParametersException: <p>The supplied parameters for invoking the specified Automation runbook are incorrect. For example, they may not match the set of parameters permitted for the specified Automation document.</p>
        capo_ssm.errors.no_longer_supported_exception.NoLongerSupportedException: <p>The requested operation is no longer supported by Systems Manager.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm.types.start_change_request_execution_request.StartChangeRequestExecutionRequest]",
    ) -> OperationResponse[
        "capo_ssm.types.start_change_request_execution_result.StartChangeRequestExecutionResult"
    ]:
        import capo_ssm._operations.amazon_ssm.start_change_request_execution

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartChangeRequestExecution")
    )
    input_: capo_ssm.types.start_change_request_execution_request.StartChangeRequestExecutionRequest = {
        "document_name": document_name,
        "runbooks": runbooks,
    }
    if scheduled_time is not None:
        input_["scheduled_time"] = scheduled_time
    if document_version is not None:
        input_["document_version"] = document_version
    if parameters is not None:
        input_["parameters"] = parameters
    if change_request_name is not None:
        input_["change_request_name"] = change_request_name
    if client_token is not None:
        input_["client_token"] = client_token
    if auto_approve is not None:
        input_["auto_approve"] = auto_approve
    if tags is not None:
        input_["tags"] = tags
    if scheduled_end_time is not None:
        input_["scheduled_end_time"] = scheduled_end_time
    if change_details is not None:
        input_["change_details"] = change_details

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output