View Source ExAws.Timestream.Write (ExAws.Timestream v0.5.1)

The following actions are supported by Amazon Timestream Write. https://docs.aws.amazon.com/timestream/latest/developerguide/API_Operations_Amazon_Timestream_Write.html

Link to this section Summary

Functions

Creates a new Timestream database.

The CreateTable operation adds a new table to an existing database in your account.

Deletes a given Timestream database.

Deletes a given Timestream table.

Returns information about the database.

DescribeEndpoints returns a list of available endpoints to make Timestream API calls against

Returns information about the table.

Returns a list of your Timestream databases.

Returns a list of your Timestream tables.

List all tags on a Timestream resource.

Associate a set of tags with a Timestream resource.

Removes the association of tags from a Timestream resource.

Modifies the KMS key for an existing database.

Modifies the retention duration of the memory store and magnetic store for your Timestream table.

The WriteRecords operation enables you to write your time series data into Timestream.

Link to this section Types

Link to this type

create_database_opts()

View Source
@type create_database_opts() :: [km_key_id: pos_integer(), tags: tags()]
@type create_table_opts() :: [
  tags: tags(),
  retention_properties: retention_properties()
]
@type database_name() :: binary()
@type list_databases_opts() :: [max_results: pos_integer(), next_token: binary()]
@type list_tables_opts() :: [
  database_name: database_name(),
  max_results: pos_integer(),
  next_token: binary()
]
@type record() :: %ExAws.Timestream.Write.Record{
  dimensions: term(),
  measure_name: term(),
  measure_value: term(),
  measure_value_type: term(),
  measure_values: term(),
  time: term(),
  time_unit: term(),
  version: term()
}
@type resource_arn() :: binary()
Link to this type

retention_properties()

View Source
@type retention_properties() :: %{
  magnetic_retention: pos_integer(),
  memory_retention: pos_integer()
}
@type table_name() :: binary()
@type tag() :: ExAws.Timestream.Write.Tag.t()
@type tags() :: [tag()]
@type write_records_opts() :: [{:common_attributes, record()}]

Link to this section Functions

Link to this function

create_database(database_name, opts \\ [])

View Source
@spec create_database(
  database_name :: database_name(),
  opts :: create_database_opts()
) ::
  ExAws.Operation.JSON.t()

Creates a new Timestream database.

options

Options

  • km_key_id - The KMS key for the database.
  • tags - A list of tags to label the database.

examples-create_database-1

Examples - create_database/1

ExAws.Timestream.Write.create_database("database_name")

examples-create_database-2

Examples - create_database/2

tag = ExAws.Timestream.Write.Tag.new("tag_key", "tag_value")
ExAws.Timestream.Write.create_database("database_name", km_key_id: 1, tags: [tag])
Link to this function

create_table(database_name, table_name, opts \\ [])

View Source
@spec create_table(
  database_name :: database_name(),
  table_name :: table_name(),
  create_table_opts :: create_table_opts()
) :: ExAws.Operation.EndpointDiscovery.t()

The CreateTable operation adds a new table to an existing database in your account.

options

Options

  • retention_properties - The duration for which your time series data must be stored in the memory store and the magnetic store.
  • tags - A list of tags to label the database.

examples-create_table-2

Examples - create_table/2

ExAws.Timestream.Write.create_table("database_name", "table_name")

examples-create_table-3

Examples - create_table/3

tag = ExAws.Timestream.Write.Tag.new("tag_key", "tag_value")
retention_properties = %{ magnetic_retention: 1, memory_retention: 1 }
ExAws.Timestream.Write.create_table("database_name", "table_name",
  retention_properties: retention_properties, tags: [tag])
Link to this function

delete_database(database_name)

View Source
@spec delete_database(database_name :: database_name()) ::
  ExAws.Operation.EndpointDiscovery.t()

Deletes a given Timestream database.

Link to this function

delete_table(database_name, table_name)

View Source
@spec delete_table(database_name :: database_name(), km_key_id :: table_name()) ::
  ExAws.Operation.JSON.t()

Deletes a given Timestream table.

Link to this function

describe_database(database_name)

View Source
@spec describe_database(database_name :: database_name()) ::
  ExAws.Operation.EndpointDiscovery.t()

Returns information about the database.

@spec describe_endpoints() :: ExAws.Operation.JSON.t()

DescribeEndpoints returns a list of available endpoints to make Timestream API calls against

Link to this function

describe_table(database_name, table_name)

View Source
@spec describe_table(database_name :: database_name(), km_key_id :: table_name()) ::
  ExAws.Operation.JSON.t()

Returns information about the table.

Link to this function

list_databases(opts \\ [])

View Source
@spec list_databases(list_databases_opts :: list_databases_opts()) ::
  ExAws.Operation.EndpointDiscovery.t()

Returns a list of your Timestream databases.

@spec list_tables(list_tables_opts()) :: ExAws.Operation.EndpointDiscovery.t()

Returns a list of your Timestream tables.

Link to this function

list_tags_for_resource(resource_arn)

View Source
@spec list_tags_for_resource(resource_arn :: resource_arn()) ::
  ExAws.Operation.EndpointDiscovery.t()

List all tags on a Timestream resource.

Link to this function

tag_resource(resource_arn, tags)

View Source
@spec tag_resource(resource_arn :: resource_arn(), tags :: tags()) ::
  ExAws.Operation.EndpointDiscovery.t()

Associate a set of tags with a Timestream resource.

examples

Examples

tags = [
  ExAws.Timestream.Write.Tag.new("tag_key_1", "tag_value_1"),
  ExAws.Timestream.Write.Tag.new("tag_key_2", "tag_value_2")
]
ExAws.Timestream.Write.tag_resource("resource_arn", tags)
Link to this function

untag_resource(resource_arn, tag_keys)

View Source
@spec untag_resource(resource_arn :: resource_arn(), tag_keys :: [binary()]) ::
  ExAws.Operation.JSON.t()

Removes the association of tags from a Timestream resource.

Link to this function

update_database(database_name, km_key_id)

View Source
@spec update_database(database_name :: database_name(), km_key_id :: pos_integer()) ::
  ExAws.Operation.JSON.t()

Modifies the KMS key for an existing database.

Link to this function

update_table(database_name, table_name, retention_properties)

View Source
@spec update_table(
  database_name :: database_name(),
  km_key_id :: table_name(),
  retention_properties :: retention_properties()
) :: ExAws.Operation.EndpointDiscovery.t()

Modifies the retention duration of the memory store and magnetic store for your Timestream table.

Link to this function

write_records(records, database_name, table_name, opts \\ [])

View Source
@spec write_records(
  records :: [record()],
  database_name :: database_name(),
  table_name :: table_name(),
  write_records :: write_records_opts()
) :: ExAws.Operation.EndpointDiscovery.t()

The WriteRecords operation enables you to write your time series data into Timestream.