addRoleToDBCluster method
Associates an Identity and Access Management (IAM) role from an Neptune DB cluster.
May throw DBClusterNotFoundFault. May throw DBClusterRoleAlreadyExistsFault. May throw InvalidDBClusterStateFault. May throw DBClusterRoleQuotaExceededFault.
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
Neptune DB cluster, for example
arn:aws:iam::123456789012:role/NeptuneAccessRole
.
Parameter featureName
:
The name of the feature for the Neptune DB cluster that the IAM role is to
be associated with. For the list of supported feature names, see
DBEngineVersion.
Implementation
Future<void> addRoleToDBCluster({
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: 'AddRoleToDBCluster',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['AddRoleToDBClusterMessage'],
shapes: shapes,
);
}