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

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

Specs

create_database_opts() :: [km_key_id: pos_integer(), tags: tags()]

Specs

create_table_opts() :: [
  tags: tags(),
  retention_properties: retention_properties()
]

Specs

database_name() :: binary()

Specs

list_databases_opts() :: [max_results: pos_integer(), next_token: binary()]

Specs

list_tables_opts() :: [
  database_name: database_name(),
  max_results: pos_integer(),
  next_token: binary()
]

Specs

record() :: %ExAws.Timestream.Write.Record{
  dimensions: term(),
  measure_name: term(),
  measure_value: term(),
  measure_value_type: term(),
  time: term(),
  time_unit: term()
}

Specs

resource_arn() :: binary()
Link to this type

retention_properties()

View Source

Specs

retention_properties() :: %{
  magnetic_retention: pos_integer(),
  memory_retention: pos_integer()
}

Specs

table_name() :: binary()

Specs

Specs

tags() :: [tag()]

Specs

write_records_opts() :: [{:common_attributes, record()}]

Link to this section Functions

Link to this function

create_database(database_name, opts \\ [])

View Source

Specs

create_database(
  database_name :: database_name(),
  opts :: create_database_opts()
) :: ExAws.Operation.JSON.t()

Creates a new Timestream database.

Options

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

Examples - create_database/1

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

Examples - create_database/2

iex> tag = ExAws.Timestream.Write.Tag.new("tag_key", "tag_value")
iex> 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

Specs

create_table(
  database_name :: database_name(),
  table_name :: table_name(),
  create_table_opts :: create_table_opts()
) :: ExAws.Operation.JSON.t()

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

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

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

Examples - create_table/3

iex> tag = ExAws.Timestream.Write.Tag.new("tag_key", "tag_value")
iex> retention_properties = %{ magnetic_retention: 1, memory_retention: 1 }
iex> 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

Specs

delete_database(database_name :: database_name()) :: ExAws.Operation.JSON.t()

Deletes a given Timestream database.

Link to this function

delete_table(database_name, table_name)

View Source

Specs

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

Specs

describe_database(database_name :: database_name()) :: ExAws.Operation.JSON.t()

Returns information about the database.

Specs

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

Specs

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

Specs

list_databases(list_databases_opts :: list_databases_opts()) ::
  ExAws.Operation.JSON.t()

Returns a list of your Timestream databases.

Specs

Returns a list of your Timestream tables.

Link to this function

list_tags_for_resource(resource_arn)

View Source

Specs

list_tags_for_resource(resource_arn :: resource_arn()) ::
  ExAws.Operation.JSON.t()

List all tags on a Timestream resource.

Link to this function

tag_resource(resource_arn, tags)

View Source

Specs

tag_resource(resource_arn :: resource_arn(), tags :: tags()) ::
  ExAws.Operation.JSON.t()

Associate a set of tags with a Timestream resource.

Examples

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

untag_resource(resource_arn, tag_keys)

View Source

Specs

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

Specs

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

Specs

update_table(
  database_name :: database_name(),
  km_key_id :: table_name(),
  retention_properties :: retention_properties()
) :: ExAws.Operation.JSON.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

Specs

write_records(
  records :: [record()],
  database_name :: database_name(),
  table_name :: table_name(),
  write_records :: write_records_opts()
) :: ExAws.Operation.JSON.t()

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