create_database
(**kwargs)¶Creates a new Timestream database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. For more information, see Amazon Web Services managed keys. Service quotas apply. For details, see code sample.
See also: AWS API Documentation
Request Syntax
response = client.create_database(
DatabaseName='string',
KmsKeyId='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The name of the Timestream database.
A list of key-value pairs to label the table.
A tag is a label that you assign to a Timestream database and/or table. Each tag consists of a key and an optional value, both of which you define. With tags, you can categorize databases and/or tables, for example, by purpose, owner, or environment.
The key of the tag. Tag keys are case sensitive.
The value of the tag. Tag values are case-sensitive and can be null.
dict
Response Syntax
{
'Database': {
'Arn': 'string',
'DatabaseName': 'string',
'TableCount': 123,
'KmsKeyId': 'string',
'CreationTime': datetime(2015, 1, 1),
'LastUpdatedTime': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
Database (dict) --
The newly created Timestream database.
Arn (string) --
The Amazon Resource Name that uniquely identifies this database.
DatabaseName (string) --
The name of the Timestream database.
TableCount (integer) --
The total number of tables found within a Timestream database.
KmsKeyId (string) --
The identifier of the KMS key used to encrypt the data stored in the database.
CreationTime (datetime) --
The time when the database was created, calculated from the Unix epoch time.
LastUpdatedTime (datetime) --
The last time that this database was updated.
Exceptions
TimestreamWrite.Client.exceptions.ConflictException
TimestreamWrite.Client.exceptions.ValidationException
TimestreamWrite.Client.exceptions.AccessDeniedException
TimestreamWrite.Client.exceptions.ServiceQuotaExceededException
TimestreamWrite.Client.exceptions.ThrottlingException
TimestreamWrite.Client.exceptions.InvalidEndpointException
TimestreamWrite.Client.exceptions.InternalServerException
TimestreamWrite.Client.exceptions.InvalidEndpointException