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/async_neptune.py
| async def remove_role_from_db_cluster(
self,
*,
config_overrides: Optional[AsyncNeptuneClientConfig] = 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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_neptune.types.remove_role_from_db_cluster_message.RemoveRoleFromDBClusterMessage]",
) -> AsyncOperationResponse[None]:
import capo_neptune._operations.amazon_rd_sv19.remove_role_from_db_cluster
(
output,
http_response,
) = await capo_neptune._operations.amazon_rd_sv19.remove_role_from_db_cluster.async_remove_role_from_db_cluster(
req.options, req.input
)
return AsyncOperationResponse(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 = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|