removeRoleFromDBCluster method

Future<void> removeRoleFromDBCluster({
  1. required String dBClusterIdentifier,
  2. required String roleArn,
  3. String? featureName,
})

Disassociates an AWS Identity and Access Management (IAM) role from an Amazon Aurora DB cluster. For more information, see Authorizing Amazon Aurora MySQL to Access Other AWS Services on Your Behalf in the Amazon Aurora User Guide.

May throw DBClusterNotFoundFault. May throw DBClusterRoleNotFoundFault. May throw InvalidDBClusterStateFault.

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

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

Parameter featureName : 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 DBEngineVersion.

Implementation

Future<void> removeRoleFromDBCluster({
  required String dBClusterIdentifier,
  required String roleArn,
  String? featureName,
}) async {
  ArgumentError.checkNotNull(dBClusterIdentifier, 'dBClusterIdentifier');
  ArgumentError.checkNotNull(roleArn, 'roleArn');
  final $request = <String, dynamic>{};
  $request['DBClusterIdentifier'] = dBClusterIdentifier;
  $request['RoleArn'] = roleArn;
  featureName?.also((arg) => $request['FeatureName'] = arg);
  await _protocol.send(
    $request,
    action: 'RemoveRoleFromDBCluster',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['RemoveRoleFromDBClusterMessage'],
    shapes: shapes,
  );
}