Skip to content

remove_role_from_db_cluster

remove_role_from_db_cluster(
    *,
    config_overrides: Optional[NeptuneClientConfig] = None,
    db_cluster_identifier: Optional[String] = None,
    role_arn: Optional[String] = None,
    feature_name: Optional[String] = None,
) -> None

Disassociates an Identity and Access Management (IAM) role from a DB cluster.

Parameters:

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

    The name of the DB cluster to disassociate the IAM role from.

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

    The Amazon Resource Name (ARN) of the IAM role to disassociate from the DB cluster, for example arn:aws:iam::123456789012:role/NeptuneAccessRole.

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

    The name of the feature for the DB cluster that the IAM role is to be disassociated from. For the list of supported feature names, see DescribeDBEngineVersions.

Raises:

Source code in docs_src/capo_neptune/_services/neptune.py
def remove_role_from_db_cluster(
    self,
    *,
    config_overrides: Optional[NeptuneClientConfig] = None,
    db_cluster_identifier: Optional["capo_neptune.types.string.String"] = None,
    role_arn: Optional["capo_neptune.types.string.String"] = None,
    feature_name: Optional["capo_neptune.types.string.String"] = None,
) -> None:
    """<p>Disassociates an Identity and Access Management (IAM) role from a DB cluster.</p>

    Args:
        db_cluster_identifier: <p>The name of the DB cluster to disassociate the IAM role from.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of the IAM role to disassociate from the DB cluster, for example <code>arn:aws:iam::123456789012:role/NeptuneAccessRole</code>.</p>
        feature_name: <p>The name of the feature for the DB cluster that the IAM role is to be disassociated from. For the list of supported feature names, see <a>DescribeDBEngineVersions</a>.</p>

    Raises:
        capo_neptune.errors.db_cluster_not_found_fault.DBClusterNotFoundFault: <p> <i>DBClusterIdentifier</i> does not refer to an existing DB cluster.</p>
        capo_neptune.errors.db_cluster_role_not_found_fault.DBClusterRoleNotFoundFault: <p>The specified IAM role Amazon Resource Name (ARN) is not associated with the specified DB cluster.</p>
        capo_neptune.errors.invalid_db_cluster_state_fault.InvalidDBClusterStateFault: <p>The DB cluster is not in a valid state.</p>
        capo_neptune.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_neptune.types.remove_role_from_db_cluster_message.RemoveRoleFromDBClusterMessage]",
    ) -> OperationResponse[None]:
        import capo_neptune._operations.amazon_rd_sv19.remove_role_from_db_cluster

        output, http_response = (
            capo_neptune._operations.amazon_rd_sv19.remove_role_from_db_cluster.remove_role_from_db_cluster(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RemoveRoleFromDBCluster")
    )
    input_: capo_neptune.types.remove_role_from_db_cluster_message.RemoveRoleFromDBClusterMessage = {}
    if db_cluster_identifier is not None:
        input_["db_cluster_identifier"] = db_cluster_identifier
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if feature_name is not None:
        input_["feature_name"] = feature_name

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