startActivityStream method
Starts a database activity stream to monitor activity on the database. For more information, see Monitoring Amazon Aurora with Database Activity Streams in the Amazon Aurora User Guide or Monitoring Amazon RDS with Database Activity Streams in the Amazon RDS User Guide.
May throw DBClusterNotFoundFault.
May throw DBInstanceNotFoundFault.
May throw InvalidDBClusterStateFault.
May throw InvalidDBInstanceStateFault.
May throw KMSKeyNotAccessibleFault.
May throw ResourceNotFoundFault.
Parameter kmsKeyId :
The Amazon Web Services KMS key identifier for encrypting messages in the
database activity stream. The Amazon Web Services KMS key identifier is
the key ARN, key ID, alias ARN, or alias name for the KMS key.
Parameter mode :
Specifies the mode of the database activity stream. Database events such
as a change or access generate an activity stream event. The database
session can handle these events either synchronously or asynchronously.
Parameter resourceArn :
The Amazon Resource Name (ARN) of the DB cluster, for example,
arn:aws:rds:us-east-1:12345667890:cluster:das-cluster.
Parameter applyImmediately :
Specifies whether or not the database activity stream is to start as soon
as possible, regardless of the maintenance window for the database.
Parameter engineNativeAuditFieldsIncluded :
Specifies whether the database activity stream includes engine-native
audit fields. This option applies to an Oracle or Microsoft SQL Server DB
instance. By default, no engine-native audit fields are included.
Implementation
Future<StartActivityStreamResponse> startActivityStream({
required String kmsKeyId,
required ActivityStreamMode mode,
required String resourceArn,
bool? applyImmediately,
bool? engineNativeAuditFieldsIncluded,
}) async {
final $request = <String, String>{
'KmsKeyId': kmsKeyId,
'Mode': mode.value,
'ResourceArn': resourceArn,
if (applyImmediately != null)
'ApplyImmediately': applyImmediately.toString(),
if (engineNativeAuditFieldsIncluded != null)
'EngineNativeAuditFieldsIncluded':
engineNativeAuditFieldsIncluded.toString(),
};
final $result = await _protocol.send(
$request,
action: 'StartActivityStream',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'StartActivityStreamResult',
);
return StartActivityStreamResponse.fromXml($result);
}