Skip to content

apply_pending_maintenance_action

apply_pending_maintenance_action(
    resource_arn: InputString,
    apply_action: InputString,
    opt_in_type: OptInType,
    *,
    config_overrides: Optional[DocDBElasticClientConfig] = None,
    apply_on: Optional[InputString] = None,
) -> ApplyPendingMaintenanceActionOutput

The type of pending maintenance action to be applied to the resource.

Parameters:

  • resource_arn (InputString) –

    The Amazon DocumentDB Amazon Resource Name (ARN) of the resource to which the pending maintenance action applies.

  • apply_action (InputString) –

    The pending maintenance action to apply to the resource.

    Valid actions are:

    • ENGINE_UPDATE

    • ENGINE_UPGRADE

    • SECURITY_UPDATE

    • OS_UPDATE

    • MASTER_USER_PASSWORD_UPDATE

  • opt_in_type (OptInType) –

    A value that specifies the type of opt-in request, or undoes an opt-in request. An opt-in request of type IMMEDIATE can't be undone.

  • apply_on (Optional[InputString], default: None ) –

    A specific date to apply the pending maintenance action. Required if opt-in-type is APPLY_ON. Format: yyyy/MM/dd HH:mm-yyyy/MM/dd HH:mm

Raises:

Source code in docs_src/capo_docdb_elastic/_services/doc_db_elastic.py
def apply_pending_maintenance_action(
    self,
    resource_arn: "capo_docdb_elastic.types.input_string.InputString",
    apply_action: "capo_docdb_elastic.types.input_string.InputString",
    opt_in_type: "capo_docdb_elastic.types.opt_in_type.OptInType",
    *,
    config_overrides: Optional[DocDBElasticClientConfig] = None,
    apply_on: Optional["capo_docdb_elastic.types.input_string.InputString"] = None,
) -> "capo_docdb_elastic.types.apply_pending_maintenance_action_output.ApplyPendingMaintenanceActionOutput":
    """<p>The type of pending maintenance action to be applied to the resource.</p>

    Args:
        resource_arn: <p>The Amazon DocumentDB Amazon Resource Name (ARN) of the resource to which the pending maintenance action applies.</p>
        apply_action: <p>The pending maintenance action to apply to the resource.</p> <p>Valid actions are:</p> <ul> <li> <p> <code>ENGINE_UPDATE<i/> </code> </p> </li> <li> <p> <code>ENGINE_UPGRADE</code> </p> </li> <li> <p> <code>SECURITY_UPDATE</code> </p> </li> <li> <p> <code>OS_UPDATE</code> </p> </li> <li> <p> <code>MASTER_USER_PASSWORD_UPDATE</code> </p> </li> </ul>
        opt_in_type: <p>A value that specifies the type of opt-in request, or undoes an opt-in request. An opt-in request of type <code>IMMEDIATE</code> can't be undone.</p>
        apply_on: <p>A specific date to apply the pending maintenance action. Required if opt-in-type is <code>APPLY_ON</code>. Format: <code>yyyy/MM/dd HH:mm-yyyy/MM/dd HH:mm</code> </p>

    Raises:
        capo_docdb_elastic.errors.access_denied_exception.AccessDeniedException: <p>An exception that occurs when there are not sufficient permissions to perform an action.</p>
        capo_docdb_elastic.errors.conflict_exception.ConflictException: <p>There was an access conflict.</p>
        capo_docdb_elastic.errors.internal_server_exception.InternalServerException: <p>There was an internal server error.</p>
        capo_docdb_elastic.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be located.</p>
        capo_docdb_elastic.errors.throttling_exception.ThrottlingException: <p>ThrottlingException will be thrown when request was denied due to request throttling.</p>
        capo_docdb_elastic.errors.validation_exception.ValidationException: <p>A structure defining a validation exception.</p>
        capo_docdb_elastic.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_docdb_elastic.types.apply_pending_maintenance_action_input.ApplyPendingMaintenanceActionInput]",
    ) -> OperationResponse[
        "capo_docdb_elastic.types.apply_pending_maintenance_action_output.ApplyPendingMaintenanceActionOutput"
    ]:
        import capo_docdb_elastic._operations.chimera_db_lionfish_service_lambda.apply_pending_maintenance_action

        output, http_response = (
            capo_docdb_elastic._operations.chimera_db_lionfish_service_lambda.apply_pending_maintenance_action.apply_pending_maintenance_action(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ApplyPendingMaintenanceAction")
    )
    input_: capo_docdb_elastic.types.apply_pending_maintenance_action_input.ApplyPendingMaintenanceActionInput = {
        "resource_arn": resource_arn,
        "apply_action": apply_action,
        "opt_in_type": opt_in_type,
    }
    if apply_on is not None:
        input_["apply_on"] = apply_on

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