IoTAnalytics / Client / update_datastore

update_datastore#

IoTAnalytics.Client.update_datastore(**kwargs)#

Used to update the settings of a data store.

See also: AWS API Documentation

Request Syntax

response = client.update_datastore(
    datastoreName='string',
    retentionPeriod={
        'unlimited': True|False,
        'numberOfDays': 123
    },
    datastoreStorage={
        'serviceManagedS3': {}
        ,
        'customerManagedS3': {
            'bucket': 'string',
            'keyPrefix': 'string',
            'roleArn': 'string'
        },
        'iotSiteWiseMultiLayerStorage': {
            'customerManagedS3Storage': {
                'bucket': 'string',
                'keyPrefix': 'string'
            }
        }
    },
    fileFormatConfiguration={
        'jsonConfiguration': {}
        ,
        'parquetConfiguration': {
            'schemaDefinition': {
                'columns': [
                    {
                        'name': 'string',
                        'type': 'string'
                    },
                ]
            }
        }
    }
)
Parameters:
  • datastoreName (string) –

    [REQUIRED]

    The name of the data store to be updated.

  • retentionPeriod (dict) –

    How long, in days, message data is kept for the data store. The retention period can’t be updated if the data store’s Amazon S3 storage is customer-managed.

    • unlimited (boolean) –

      If true, message data is kept indefinitely.

    • numberOfDays (integer) –

      The number of days that message data is kept. The unlimited parameter must be false.

  • datastoreStorage (dict) –

    Where data in a data store is stored.. You can choose serviceManagedS3 storage, customerManagedS3 storage, or iotSiteWiseMultiLayerStorage storage. The default is serviceManagedS3. You can’t change the choice of Amazon S3 storage after your data store is created.

    • serviceManagedS3 (dict) –

      Used to store data in an Amazon S3 bucket managed by IoT Analytics. You can’t change the choice of Amazon S3 storage after your data store is created.

    • customerManagedS3 (dict) –

      S3-customer-managed; When you choose customer-managed storage, the retentionPeriod parameter is ignored. You can’t change the choice of Amazon S3 storage after your data store is created.

      • bucket (string) – [REQUIRED]

        The name of the Amazon S3 bucket where your data is stored.

      • keyPrefix (string) –

        (Optional) The prefix used to create the keys of the data store data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

      • roleArn (string) – [REQUIRED]

        The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 resources.

    • iotSiteWiseMultiLayerStorage (dict) –

      Used to store data used by IoT SiteWise in an Amazon S3 bucket that you manage. You can’t change the choice of Amazon S3 storage after your data store is created.

      • customerManagedS3Storage (dict) – [REQUIRED]

        Used to store data used by IoT SiteWise in an Amazon S3 bucket that you manage.

        • bucket (string) – [REQUIRED]

          The name of the Amazon S3 bucket where your data is stored.

        • keyPrefix (string) –

          (Optional) The prefix used to create the keys of the data store data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

  • fileFormatConfiguration (dict) –

    Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.

    The default file format is JSON. You can specify only one format.

    You can’t change the file format after you create the data store.

    • jsonConfiguration (dict) –

      Contains the configuration information of the JSON format.

    • parquetConfiguration (dict) –

      Contains the configuration information of the Parquet format.

      • schemaDefinition (dict) –

        Information needed to define a schema.

        • columns (list) –

          Specifies one or more columns that store your data.

          Each schema can have up to 100 columns. Each column can have up to 100 nested types.

          • (dict) –

            Contains information about a column that stores your data.

            • name (string) – [REQUIRED]

              The name of the column.

            • type (string) – [REQUIRED]

              The type of data. For more information about the supported data types, see Common data types in the Glue Developer Guide.

Returns:

None

Exceptions

  • IoTAnalytics.Client.exceptions.InvalidRequestException

  • IoTAnalytics.Client.exceptions.ResourceNotFoundException

  • IoTAnalytics.Client.exceptions.InternalFailureException

  • IoTAnalytics.Client.exceptions.ServiceUnavailableException

  • IoTAnalytics.Client.exceptions.ThrottlingException