AuroraDSQL / Client / create_stream
create_stream¶
- AuroraDSQL.Client.create_stream(**kwargs)¶
Creates a new change data capture (CDC) stream for a cluster. The stream captures database changes and delivers them to the specified target destination.
Required permissions
dsql:CreateStream
Permission to create a new stream.
Resources:
arn:aws:dsql:region:account-id:cluster/cluster-idiam:PassRole
Permission to pass the IAM role specified in the target definition to the service.
Resources: ARN of the IAM role specified in
targetDefinition.kinesis.roleArnkms:Decrypt
Required when the cluster uses a customer managed KMS key (CMK). Permission to decrypt data using the cluster’s CMK.
Resources: ARN of the KMS key used by the cluster
See also: AWS API Documentation
Request Syntax
response = client.create_stream( clusterIdentifier='string', targetDefinition={ 'kinesis': { 'streamArn': 'string', 'roleArn': 'string' } }, ordering='UNORDERED', format='JSON', tags={ 'string': 'string' }, clientToken='string' )
- Parameters:
clusterIdentifier (string) –
[REQUIRED]
The ID of the cluster for which to create the stream.
targetDefinition (dict) –
[REQUIRED]
The target destination configuration for the stream. Contains Kinesis stream configuration including stream ARN and IAM role ARN.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
kinesis.kinesis (dict) –
Kinesis stream target configuration.
streamArn (string) – [REQUIRED]
The ARN of the Kinesis stream.
roleArn (string) – [REQUIRED]
The ARN of the IAM role that grants permission to write to the Kinesis stream. This can be a standard role (
arn:aws:iam::account-id:role/role-name) or a role with a path prefix (arn:aws:iam::account-id:role/service-role/role-name), such as roles auto-created by the console.
ordering (string) –
[REQUIRED]
The ordering mode for the stream. Determines how change events are ordered when delivered to the target.
format (string) –
[REQUIRED]
The format of the stream records.
tags (dict) –
A map of key and value pairs to use to tag your stream.
(string) –
Unique tag key, maximum 128 Unicode characters in UTF-8.
(string) –
Tag value, maximum 256 Unicode characters in UTF-8.
clientToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect.
If you don’t specify a client token, the Amazon Web Services SDK automatically generates one.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'clusterIdentifier': 'string', 'streamIdentifier': 'string', 'arn': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'DELETED'|'FAILED'|'IMPAIRED', 'creationTime': datetime(2015, 1, 1), 'ordering': 'UNORDERED', 'format': 'JSON' }
Response Structure
(dict) –
The output of a created stream.
clusterIdentifier (string) –
The ID of the cluster for the created stream.
streamIdentifier (string) –
The ID of the created stream.
arn (string) –
The ARN of the created stream.
status (string) –
The status of the created stream.
creationTime (datetime) –
The time when created the stream.
ordering (string) –
The ordering mode of the created stream.
format (string) –
The format of the created stream records.
Exceptions
AuroraDSQL.Client.exceptions.ServiceQuotaExceededExceptionAuroraDSQL.Client.exceptions.ThrottlingExceptionAuroraDSQL.Client.exceptions.ValidationExceptionAuroraDSQL.Client.exceptions.AccessDeniedExceptionAuroraDSQL.Client.exceptions.InternalServerExceptionAuroraDSQL.Client.exceptions.ResourceNotFoundExceptionAuroraDSQL.Client.exceptions.ConflictException