Skip to content

describe_pending_maintenance_actions

describe_pending_maintenance_actions(
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    resource_identifier: Optional[String] = None,
    filters: Optional[FilterList] = None,
    marker: Optional[String] = None,
    max_records: Optional[IntegerOptional] = None,
) -> PendingMaintenanceActionsMessage

Returns a list of resources (for example, DB instances) that have at least one pending maintenance action.

This API follows an eventual consistency model. This means that the result of the DescribePendingMaintenanceActions command might not be immediately visible to all subsequent RDS commands. Keep this in mind when you use DescribePendingMaintenanceActions immediately after using a previous API command such as ApplyPendingMaintenanceActions.

Parameters:

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

    The ARN of a resource to return pending maintenance actions for.

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

    A filter that specifies one or more resources to return pending maintenance actions for.

    Supported filters:

    • db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs). The results list only includes pending maintenance actions for the DB clusters identified by these ARNs.

    • db-instance-id - Accepts DB instance identifiers and DB instance ARNs. The results list only includes pending maintenance actions for the DB instances identified by these ARNs.

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

    An optional pagination token provided by a previous DescribePendingMaintenanceActions request. If this parameter is specified, the response includes only records beyond the marker, up to a number of records specified by MaxRecords.

  • max_records (Optional[IntegerOptional], default: None ) –

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.

    Default: 100

    Constraints: Minimum 20, maximum 100.

Raises:

Examples:

To list resources with at least one pending maintenance action The following example lists the pending maintenace action for a DB instance.

>>> client.describe_pending_maintenance_actions()
Source code in docs_src/capo_rds/_services/rds.py
def describe_pending_maintenance_actions(
    self,
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    resource_identifier: Optional["capo_rds.types.string.String"] = None,
    filters: Optional["capo_rds.types.filter_list.FilterList"] = None,
    marker: Optional["capo_rds.types.string.String"] = None,
    max_records: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
) -> "capo_rds.types.pending_maintenance_actions_message.PendingMaintenanceActionsMessage":
    """<p>Returns a list of resources (for example, DB instances) that have at least one pending maintenance action.</p> <p>This API follows an eventual consistency model. This means that the result of the <code>DescribePendingMaintenanceActions</code> command might not be immediately visible to all subsequent RDS commands. Keep this in mind when you use <code>DescribePendingMaintenanceActions</code> immediately after using a previous API command such as <code>ApplyPendingMaintenanceActions</code>.</p>

    Args:
        resource_identifier: <p>The ARN of a resource to return pending maintenance actions for.</p>
        filters: <p>A filter that specifies one or more resources to return pending maintenance actions for.</p> <p>Supported filters:</p> <ul> <li> <p> <code>db-cluster-id</code> - Accepts DB cluster identifiers and DB cluster Amazon Resource Names (ARNs). The results list only includes pending maintenance actions for the DB clusters identified by these ARNs.</p> </li> <li> <p> <code>db-instance-id</code> - Accepts DB instance identifiers and DB instance ARNs. The results list only includes pending maintenance actions for the DB instances identified by these ARNs.</p> </li> </ul>
        marker: <p>An optional pagination token provided by a previous <code>DescribePendingMaintenanceActions</code> request. If this parameter is specified, the response includes only records beyond the marker, up to a number of records specified by <code>MaxRecords</code>.</p>
        max_records: <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.</p> <p>Default: 100</p> <p>Constraints: Minimum 20, maximum 100.</p>

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

    Examples:
        To list resources with at least one pending maintenance action
        The following example lists the pending maintenace action for a DB instance.

        >>> client.describe_pending_maintenance_actions()
    """

    def _handler(
        req: "OperationRequest[capo_rds.types.describe_pending_maintenance_actions_message.DescribePendingMaintenanceActionsMessage]",
    ) -> OperationResponse[
        "capo_rds.types.pending_maintenance_actions_message.PendingMaintenanceActionsMessage"
    ]:
        import capo_rds._operations.amazon_rd_sv19.describe_pending_maintenance_actions

        output, http_response = (
            capo_rds._operations.amazon_rd_sv19.describe_pending_maintenance_actions.describe_pending_maintenance_actions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribePendingMaintenanceActions")
    )
    input_: capo_rds.types.describe_pending_maintenance_actions_message.DescribePendingMaintenanceActionsMessage = {}
    if resource_identifier is not None:
        input_["resource_identifier"] = resource_identifier
    if filters is not None:
        input_["filters"] = filters
    if marker is not None:
        input_["marker"] = marker
    if max_records is not None:
        input_["max_records"] = max_records

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