addRoleToDBCluster method
Associates an Identity and Access Management (IAM) role with a DB cluster.
May throw DBClusterNotFoundFault.
May throw DBClusterRoleAlreadyExistsFault.
May throw DBClusterRoleQuotaExceededFault.
May throw InvalidDBClusterStateFault.
Parameter dBClusterIdentifier :
The name of the DB cluster to associate the IAM role with.
Parameter roleArn :
The Amazon Resource Name (ARN) of the IAM role to associate with 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
associated with. For information about supported feature names, see
DBEngineVersion.
Implementation
Future<void> addRoleToDBCluster({
required String dBClusterIdentifier,
required String roleArn,
String? featureName,
}) async {
final $request = <String, String>{
'DBClusterIdentifier': dBClusterIdentifier,
'RoleArn': roleArn,
if (featureName != null) 'FeatureName': featureName,
};
await _protocol.send(
$request,
action: 'AddRoleToDBCluster',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
);
}