Skip to content

apply_pending_maintenance_action async

apply_pending_maintenance_action(
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    resource_identifier: Optional[String] = None,
    apply_action: Optional[String] = None,
    opt_in_type: Optional[String] = None,
) -> ApplyPendingMaintenanceActionResult

Applies a pending maintenance action to a resource (for example, to a DB instance).

Parameters:

  • resource_identifier (Optional[String], default: None ) –

    The Amazon Resource Name (ARN) of the resource that the pending maintenance action applies to. For information about creating an ARN, see Constructing an Amazon Resource Name (ARN).

  • apply_action (Optional[String], default: None ) –

    The pending maintenance action to apply to this resource.

    Valid values: system-update, db-upgrade

  • opt_in_type (Optional[String], default: None ) –

    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.

    Valid values:

    • immediate - Apply the maintenance action immediately.

    • next-maintenance - Apply the maintenance action during the next maintenance window for the resource.

    • undo-opt-in - Cancel any existing next-maintenance opt-in requests.

Raises:

Source code in docs_src/capo_neptune/_services/async_neptune.py
async def apply_pending_maintenance_action(
    self,
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    resource_identifier: Optional["capo_neptune.types.string.String"] = None,
    apply_action: Optional["capo_neptune.types.string.String"] = None,
    opt_in_type: Optional["capo_neptune.types.string.String"] = None,
) -> "capo_neptune.types.apply_pending_maintenance_action_result.ApplyPendingMaintenanceActionResult":
    """<p>Applies a pending maintenance action to a resource (for example, to a DB instance).</p>

    Args:
        resource_identifier: <p>The Amazon Resource Name (ARN) of the resource that the pending maintenance action applies to. For information about creating an ARN, see <a href="https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing"> Constructing an Amazon Resource Name (ARN)</a>.</p>
        apply_action: <p>The pending maintenance action to apply to this resource.</p> <p>Valid values: <code>system-update</code>, <code>db-upgrade</code> </p>
        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> <p>Valid values:</p> <ul> <li> <p> <code>immediate</code> - Apply the maintenance action immediately.</p> </li> <li> <p> <code>next-maintenance</code> - Apply the maintenance action during the next maintenance window for the resource.</p> </li> <li> <p> <code>undo-opt-in</code> - Cancel any existing <code>next-maintenance</code> opt-in requests.</p> </li> </ul>

    Raises:
        capo_neptune.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The specified resource ID was not found.</p>
        capo_neptune.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_neptune.types.apply_pending_maintenance_action_message.ApplyPendingMaintenanceActionMessage]",
    ) -> AsyncOperationResponse[
        "capo_neptune.types.apply_pending_maintenance_action_result.ApplyPendingMaintenanceActionResult"
    ]:
        import capo_neptune._operations.amazon_rd_sv19.apply_pending_maintenance_action

        (
            output,
            http_response,
        ) = await capo_neptune._operations.amazon_rd_sv19.apply_pending_maintenance_action.async_apply_pending_maintenance_action(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ApplyPendingMaintenanceAction")
    )
    input_: capo_neptune.types.apply_pending_maintenance_action_message.ApplyPendingMaintenanceActionMessage = {}
    if resource_identifier is not None:
        input_["resource_identifier"] = resource_identifier
    if apply_action is not None:
        input_["apply_action"] = apply_action
    if opt_in_type is not None:
        input_["opt_in_type"] = opt_in_type

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output