addRoleToDBInstance method

Future<void> addRoleToDBInstance({
  1. required String dBInstanceIdentifier,
  2. required String featureName,
  3. required String roleArn,
})

Associates an Amazon Web Services Identity and Access Management (IAM) role with a DB instance. This command doesn't apply to RDS Custom.

May throw DBInstanceNotFoundFault. May throw DBInstanceRoleAlreadyExistsFault. May throw DBInstanceRoleQuotaExceededFault. May throw InvalidDBInstanceStateFault.

Parameter dBInstanceIdentifier : The name of the DB instance to associate the IAM role with.

Parameter featureName : The name of the feature for the DB instance that the IAM role is to be associated with. For information about supported feature names, see DBEngineVersion.

Parameter roleArn : The Amazon Resource Name (ARN) of the IAM role to associate with the DB instance, for example arn:aws:iam::123456789012:role/AccessRole.

Implementation

Future<void> addRoleToDBInstance({
  required String dBInstanceIdentifier,
  required String featureName,
  required String roleArn,
}) async {
  final $request = <String, String>{
    'DBInstanceIdentifier': dBInstanceIdentifier,
    'FeatureName': featureName,
    'RoleArn': roleArn,
  };
  await _protocol.send(
    $request,
    action: 'AddRoleToDBInstance',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
  );
}