update_database

TimestreamWrite.Client.update_database(**kwargs)

Modifies the KMS key for an existing database. While updating the database, you must specify the database name and the identifier of the new KMS key to be used ( KmsKeyId ). If there are any concurrent UpdateDatabase requests, first writer wins.

See code sample for details.

See also: AWS API Documentation

Request Syntax

response = client.update_database(
    DatabaseName='string',
    KmsKeyId='string'
)
Parameters
  • DatabaseName (string) --

    [REQUIRED]

    The name of the database.

  • KmsKeyId (string) --

    [REQUIRED]

    The identifier of the new KMS key ( KmsKeyId ) to be used to encrypt the data stored in the database. If the KmsKeyId currently registered with the database is the same as the KmsKeyId in the request, there will not be any update.

    You can specify the KmsKeyId using any of the following:

    • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
    • Key ARN: arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
    • Alias name: alias/ExampleAlias
    • Alias ARN: arn:aws:kms:us-east-1:111122223333:alias/ExampleAlias
Return type

dict

Returns

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) --

      A top-level container for a table. Databases and tables are the fundamental management concepts in Amazon Timestream. All tables in a database are encrypted with the same KMS key.

      • 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.ValidationException
  • TimestreamWrite.Client.exceptions.AccessDeniedException
  • TimestreamWrite.Client.exceptions.ResourceNotFoundException
  • TimestreamWrite.Client.exceptions.ServiceQuotaExceededException
  • TimestreamWrite.Client.exceptions.ThrottlingException
  • TimestreamWrite.Client.exceptions.InternalServerException
  • TimestreamWrite.Client.exceptions.InvalidEndpointException