start_activity_stream
async
¶
start_activity_stream(
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
resource_arn: Optional[String] = None,
mode: Optional[ActivityStreamMode] = None,
kms_key_id: Optional[String] = None,
apply_immediately: Optional[BooleanOptional] = None,
engine_native_audit_fields_included: Optional[BooleanOptional] = None,
) -> StartActivityStreamResponse
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.
Parameters:
-
resource_arn(Optional[String], default:None) –The Amazon Resource Name (ARN) of the DB cluster, for example,
arn:aws:rds:us-east-1:12345667890:cluster:das-cluster. -
mode(Optional[ActivityStreamMode], default:None) –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.
-
kms_key_id(Optional[String], default:None) –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.
-
apply_immediately(Optional[BooleanOptional], default:None) –Specifies whether or not the database activity stream is to start as soon as possible, regardless of the maintenance window for the database.
-
engine_native_audit_fields_included(Optional[BooleanOptional], default:None) –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.
Raises:
-
DBClusterNotFoundFault–DBClusterIdentifierdoesn't refer to an existing DB cluster. -
DBInstanceNotFoundFault–DBInstanceIdentifierdoesn't refer to an existing DB instance. -
InvalidDBClusterStateFault–The requested operation can't be performed while the cluster is in this state.
-
InvalidDBInstanceStateFault–The DB instance isn't in a valid state.
-
KMSKeyNotAccessibleFault–An error occurred accessing an Amazon Web Services KMS key.
-
ResourceNotFoundFault–The specified resource ID was not found.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To start a database activity stream The following example starts an asynchronous activity stream to monitor an Aurora cluster named my-pg-cluster.
>>> await client.start_activity_stream(resource_arn='arn:aws:rds:us-east-1:1234567890123:cluster:my-pg-cluster', mode='async', kms_key_id='arn:aws:kms:us-east-1:1234567890123:key/a12c345d-6ef7-890g-h123-456i789jk0l1', apply_immediately=True)
Source code in docs_src/capo_rds/_services/async_rds.py
15288 15289 15290 15291 15292 15293 15294 15295 15296 15297 15298 15299 15300 15301 15302 15303 15304 15305 15306 15307 15308 15309 15310 15311 15312 15313 15314 15315 15316 15317 15318 15319 15320 15321 15322 15323 15324 15325 15326 15327 15328 15329 15330 15331 15332 15333 15334 15335 15336 15337 15338 15339 15340 15341 15342 15343 15344 15345 15346 15347 15348 15349 15350 15351 15352 15353 15354 15355 15356 15357 15358 15359 15360 15361 15362 15363 15364 15365 | |