Struct aws_sdk_timestreaminfluxdb::Client
source · pub struct Client { /* private fields */ }
Expand description
Client for Timestream InfluxDB
Client for invoking operations on Timestream InfluxDB. Each operation on Timestream InfluxDB is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_timestreaminfluxdb::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Config
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_timestreaminfluxdb::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the ListTagsForResource
operation has
a Client::list_tags_for_resource
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.list_tags_for_resource()
.resource_arn("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
source§impl Client
impl Client
sourcepub fn create_db_instance(&self) -> CreateDbInstanceFluentBuilder
pub fn create_db_instance(&self) -> CreateDbInstanceFluentBuilder
Constructs a fluent builder for the CreateDbInstance
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name that uniquely identifies the DB instance when interacting with the Amazon Timestream for InfluxDB API and CLI commands. This name will also be a prefix included in the endpoint. DB instance names must be unique per customer and per region.
username(impl Into<String>)
/set_username(Option<String>)
:
required: falseThe username of the initial admin user created in InfluxDB. Must start with a letter and can’t end with a hyphen or contain two consecutive hyphens. For example, my-user1. This username will allow you to access the InfluxDB UI to perform various administrative tasks and also use the InfluxDB CLI to create an operator token. These attributes will be stored in a Secret created in Amazon Secrets Manager in your account.
password(impl Into<String>)
/set_password(Option<String>)
:
required: trueThe password of the initial admin user created in InfluxDB. This password will allow you to access the InfluxDB UI to perform various administrative tasks and also use the InfluxDB CLI to create an operator token. These attributes will be stored in a Secret created in AWS SecretManager in your account.
organization(impl Into<String>)
/set_organization(Option<String>)
:
required: falseThe name of the initial organization for the initial admin user in InfluxDB. An InfluxDB organization is a workspace for a group of users.
bucket(impl Into<String>)
/set_bucket(Option<String>)
:
required: falseThe name of the initial InfluxDB bucket. All InfluxDB data is stored in a bucket. A bucket combines the concept of a database and a retention period (the duration of time that each data point persists). A bucket belongs to an organization.
db_instance_type(DbInstanceType)
/set_db_instance_type(Option<DbInstanceType>)
:
required: trueThe Timestream for InfluxDB DB instance type to run InfluxDB on.
vpc_subnet_ids(impl Into<String>)
/set_vpc_subnet_ids(Option<Vec::<String>>)
:
required: trueA list of VPC subnet IDs to associate with the DB instance. Provide at least two VPC subnet IDs in different availability zones when deploying with a Multi-AZ standby.
vpc_security_group_ids(impl Into<String>)
/set_vpc_security_group_ids(Option<Vec::<String>>)
:
required: trueA list of VPC security group IDs to associate with the DB instance.
publicly_accessible(bool)
/set_publicly_accessible(Option<bool>)
:
required: falseConfigures the DB instance with a public IP to facilitate access.
db_storage_type(DbStorageType)
/set_db_storage_type(Option<DbStorageType>)
:
required: falseThe Timestream for InfluxDB DB storage type to read and write InfluxDB data.
You can choose between 3 different types of provisioned Influx IOPS included storage according to your workloads requirements:
-
Influx IO Included 3000 IOPS
-
Influx IO Included 12000 IOPS
-
Influx IO Included 16000 IOPS
-
allocated_storage(i32)
/set_allocated_storage(Option<i32>)
:
required: trueThe amount of storage to allocate for your DB storage type in GiB (gibibytes).
db_parameter_group_identifier(impl Into<String>)
/set_db_parameter_group_identifier(Option<String>)
:
required: falseThe id of the DB parameter group to assign to your DB instance. DB parameter groups specify how the database is configured. For example, DB parameter groups can specify the limit for query concurrency.
deployment_type(DeploymentType)
/set_deployment_type(Option<DeploymentType>)
:
required: falseSpecifies whether the DB instance will be deployed as a standalone instance or with a Multi-AZ standby for high availability.
log_delivery_configuration(LogDeliveryConfiguration)
/set_log_delivery_configuration(Option<LogDeliveryConfiguration>)
:
required: falseConfiguration for sending InfluxDB engine logs to a specified S3 bucket.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseA list of key-value pairs to associate with the DB instance.
- On success, responds with
CreateDbInstanceOutput
with field(s):id(String)
:A service-generated unique identifier.
name(String)
:The customer-supplied name that uniquely identifies the DB instance when interacting with the Amazon Timestream for InfluxDB API and CLI commands.
arn(String)
:The Amazon Resource Name (ARN) of the DB instance.
status(Option<Status>)
:The status of the DB instance.
endpoint(Option<String>)
:The endpoint used to connect to InfluxDB. The default InfluxDB port is 8086.
db_instance_type(Option<DbInstanceType>)
:The Timestream for InfluxDB instance type that InfluxDB runs on.
db_storage_type(Option<DbStorageType>)
:The Timestream for InfluxDB DB storage type that InfluxDB stores data on.
allocated_storage(Option<i32>)
:The amount of storage allocated for your DB storage type (in gibibytes).
deployment_type(Option<DeploymentType>)
:Specifies whether the Timestream for InfluxDB is deployed as Single-AZ or with a MultiAZ Standby for High availability.
vpc_subnet_ids(Vec::<String>)
:A list of VPC subnet IDs associated with the DB instance.
publicly_accessible(Option<bool>)
:Indicates if the DB instance has a public IP to facilitate access.
vpc_security_group_ids(Option<Vec::<String>>)
:A list of VPC security group IDs associated with the DB instance.
db_parameter_group_identifier(Option<String>)
:The id of the DB parameter group assigned to your DB instance.
availability_zone(Option<String>)
:The Availability Zone in which the DB instance resides.
secondary_availability_zone(Option<String>)
:The Availability Zone in which the standby instance is located when deploying with a MultiAZ standby instance.
log_delivery_configuration(Option<LogDeliveryConfiguration>)
:Configuration for sending InfluxDB engine logs to send to specified S3 bucket.
influx_auth_parameters_secret_arn(Option<String>)
:The Amazon Resource Name (ARN) of the AWS Secrets Manager secret containing the initial InfluxDB authorization parameters. The secret value is a JSON formatted key-value pair holding InfluxDB authorization values: organization, bucket, username, and password.
- On failure, responds with
SdkError<CreateDbInstanceError>
source§impl Client
impl Client
sourcepub fn create_db_parameter_group(&self) -> CreateDbParameterGroupFluentBuilder
pub fn create_db_parameter_group(&self) -> CreateDbParameterGroupFluentBuilder
Constructs a fluent builder for the CreateDbParameterGroup
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the DB parameter group. The name must be unique per customer and per region.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description of the DB parameter group.
parameters(Parameters)
/set_parameters(Option<Parameters>)
:
required: falseA list of the parameters that comprise the DB parameter group.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseA list of key-value pairs to associate with the DB parameter group.
- On success, responds with
CreateDbParameterGroupOutput
with field(s):id(String)
:A service-generated unique identifier.
name(String)
:The customer-supplied name that uniquely identifies the DB parameter group when interacting with the Amazon Timestream for InfluxDB API and CLI commands.
arn(String)
:The Amazon Resource Name (ARM) of the DB parameter group.
description(Option<String>)
:The description of the DB parameter group.
parameters(Option<Parameters>)
:A list of the parameters that comprise the DB parameter group.
- On failure, responds with
SdkError<CreateDbParameterGroupError>
source§impl Client
impl Client
sourcepub fn delete_db_instance(&self) -> DeleteDbInstanceFluentBuilder
pub fn delete_db_instance(&self) -> DeleteDbInstanceFluentBuilder
Constructs a fluent builder for the DeleteDbInstance
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:
required: trueThe id of the DB instance.
- On success, responds with
DeleteDbInstanceOutput
with field(s):id(String)
:A service-generated unique identifier.
name(String)
:The customer-supplied name that uniquely identifies the DB instance when interacting with the Amazon Timestream for InfluxDB API and CLI commands.
arn(String)
:The Amazon Resource Name (ARN) of the DB instance.
status(Option<Status>)
:The status of the DB instance.
endpoint(Option<String>)
:The endpoint used to connect to InfluxDB. The default InfluxDB port is 8086.
db_instance_type(Option<DbInstanceType>)
:The Timestream for InfluxDB instance type that InfluxDB runs on.
db_storage_type(Option<DbStorageType>)
:The Timestream for InfluxDB DB storage type that InfluxDB stores data on.
allocated_storage(Option<i32>)
:The amount of storage allocated for your DB storage type (in gibibytes).
deployment_type(Option<DeploymentType>)
:Specifies whether the Timestream for InfluxDB is deployed as Single-AZ or with a MultiAZ Standby for High availability.
vpc_subnet_ids(Vec::<String>)
:A list of VPC subnet IDs associated with the DB instance.
publicly_accessible(Option<bool>)
:Indicates if the DB instance has a public IP to facilitate access.
vpc_security_group_ids(Option<Vec::<String>>)
:A list of VPC security group IDs associated with the DB instance.
db_parameter_group_identifier(Option<String>)
:The id of the DB parameter group assigned to your DB instance.
availability_zone(Option<String>)
:The Availability Zone in which the DB instance resides.
secondary_availability_zone(Option<String>)
:The Availability Zone in which the standby instance is located when deploying with a MultiAZ standby instance.
log_delivery_configuration(Option<LogDeliveryConfiguration>)
:Configuration for sending InfluxDB engine logs to send to specified S3 bucket.
influx_auth_parameters_secret_arn(Option<String>)
:The Amazon Resource Name (ARN) of the AWS Secrets Manager secret containing the initial InfluxDB authorization parameters. The secret value is a JSON formatted key-value pair holding InfluxDB authorization values: organization, bucket, username, and password.
- On failure, responds with
SdkError<DeleteDbInstanceError>
source§impl Client
impl Client
sourcepub fn get_db_instance(&self) -> GetDbInstanceFluentBuilder
pub fn get_db_instance(&self) -> GetDbInstanceFluentBuilder
Constructs a fluent builder for the GetDbInstance
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:
required: trueThe id of the DB instance.
- On success, responds with
GetDbInstanceOutput
with field(s):id(String)
:A service-generated unique identifier.
name(String)
:The customer-supplied name that uniquely identifies the DB instance when interacting with the Amazon Timestream for InfluxDB API and CLI commands.
arn(String)
:The Amazon Resource Name (ARN) of the DB instance.
status(Option<Status>)
:The status of the DB instance.
endpoint(Option<String>)
:The endpoint used to connect to InfluxDB. The default InfluxDB port is 8086.
db_instance_type(Option<DbInstanceType>)
:The Timestream for InfluxDB instance type that InfluxDB runs on.
db_storage_type(Option<DbStorageType>)
:The Timestream for InfluxDB DB storage type that InfluxDB stores data on.
allocated_storage(Option<i32>)
:The amount of storage allocated for your DB storage type (in gibibytes).
deployment_type(Option<DeploymentType>)
:Specifies whether the Timestream for InfluxDB is deployed as Single-AZ or with a MultiAZ Standby for High availability.
vpc_subnet_ids(Vec::<String>)
:A list of VPC subnet IDs associated with the DB instance.
publicly_accessible(Option<bool>)
:Indicates if the DB instance has a public IP to facilitate access.
vpc_security_group_ids(Option<Vec::<String>>)
:A list of VPC security group IDs associated with the DB instance.
db_parameter_group_identifier(Option<String>)
:The id of the DB parameter group assigned to your DB instance.
availability_zone(Option<String>)
:The Availability Zone in which the DB instance resides.
secondary_availability_zone(Option<String>)
:The Availability Zone in which the standby instance is located when deploying with a MultiAZ standby instance.
log_delivery_configuration(Option<LogDeliveryConfiguration>)
:Configuration for sending InfluxDB engine logs to send to specified S3 bucket.
influx_auth_parameters_secret_arn(Option<String>)
:The Amazon Resource Name (ARN) of the AWS Secrets Manager secret containing the initial InfluxDB authorization parameters. The secret value is a JSON formatted key-value pair holding InfluxDB authorization values: organization, bucket, username, and password.
- On failure, responds with
SdkError<GetDbInstanceError>
source§impl Client
impl Client
sourcepub fn get_db_parameter_group(&self) -> GetDbParameterGroupFluentBuilder
pub fn get_db_parameter_group(&self) -> GetDbParameterGroupFluentBuilder
Constructs a fluent builder for the GetDbParameterGroup
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:
required: trueThe id of the DB parameter group.
- On success, responds with
GetDbParameterGroupOutput
with field(s):id(String)
:A service-generated unique identifier.
name(String)
:The customer-supplied name that uniquely identifies the DB parameter group when interacting with the Amazon Timestream for InfluxDB API and CLI commands.
arn(String)
:The Amazon Resource Name (ARN) of the DB parameter group.
description(Option<String>)
:A description of the DB parameter group.
parameters(Option<Parameters>)
:The parameters that comprise the DB parameter group.
- On failure, responds with
SdkError<GetDbParameterGroupError>
source§impl Client
impl Client
sourcepub fn list_db_instances(&self) -> ListDbInstancesFluentBuilder
pub fn list_db_instances(&self) -> ListDbInstancesFluentBuilder
Constructs a fluent builder for the ListDbInstances
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.
- On success, responds with
ListDbInstancesOutput
with field(s):items(Vec::<DbInstanceSummary>)
:A list of Timestream for InfluxDB DB instance summaries.
next_token(Option<String>)
:Token from a previous call of the operation. When this value is provided, the service returns results from where the previous response left off.
- On failure, responds with
SdkError<ListDbInstancesError>
source§impl Client
impl Client
sourcepub fn list_db_parameter_groups(&self) -> ListDbParameterGroupsFluentBuilder
pub fn list_db_parameter_groups(&self) -> ListDbParameterGroupsFluentBuilder
Constructs a fluent builder for the ListDbParameterGroups
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.
- On success, responds with
ListDbParameterGroupsOutput
with field(s):items(Vec::<DbParameterGroupSummary>)
:A list of Timestream for InfluxDB DB parameter group summaries.
next_token(Option<String>)
:Token from a previous call of the operation. When this value is provided, the service returns results from where the previous response left off.
- On failure, responds with
SdkError<ListDbParameterGroupsError>
source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the tagged resource.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, String>>)
:A list of tags used to categorize and track resources.
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the tagged resource.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueA list of tags used to categorize and track resources.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
source§impl Client
impl Client
sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the tagged resource.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe keys used to identify the tags.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
source§impl Client
impl Client
sourcepub fn update_db_instance(&self) -> UpdateDbInstanceFluentBuilder
pub fn update_db_instance(&self) -> UpdateDbInstanceFluentBuilder
Constructs a fluent builder for the UpdateDbInstance
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:
required: trueThe id of the DB instance.
log_delivery_configuration(LogDeliveryConfiguration)
/set_log_delivery_configuration(Option<LogDeliveryConfiguration>)
:
required: falseConfiguration for sending InfluxDB engine logs to send to specified S3 bucket.
db_parameter_group_identifier(impl Into<String>)
/set_db_parameter_group_identifier(Option<String>)
:
required: falseThe id of the DB parameter group to assign to your DB instance. DB parameter groups specify how the database is configured. For example, DB parameter groups can specify the limit for query concurrency.
- On success, responds with
UpdateDbInstanceOutput
with field(s):id(String)
:A service-generated unique identifier.
name(String)
:This customer-supplied name uniquely identifies the DB instance when interacting with the Amazon Timestream for InfluxDB API and AWS CLI commands.
arn(String)
:The Amazon Resource Name (ARN) of the DB instance.
status(Option<Status>)
:The status of the DB instance.
endpoint(Option<String>)
:The endpoint used to connect to InfluxDB. The default InfluxDB port is 8086.
db_instance_type(Option<DbInstanceType>)
:The Timestream for InfluxDB instance type that InfluxDB runs on.
db_storage_type(Option<DbStorageType>)
:The Timestream for InfluxDB DB storage type that InfluxDB stores data on.
allocated_storage(Option<i32>)
:The amount of storage allocated for your DB storage type (in gibibytes).
deployment_type(Option<DeploymentType>)
:Specifies whether the Timestream for InfluxDB is deployed as Single-AZ or with a MultiAZ Standby for High availability.
vpc_subnet_ids(Vec::<String>)
:A list of VPC subnet IDs associated with the DB instance.
publicly_accessible(Option<bool>)
:Indicates if the DB instance has a public IP to facilitate access.
vpc_security_group_ids(Option<Vec::<String>>)
:A list of VPC security group IDs associated with the DB instance.
db_parameter_group_identifier(Option<String>)
:The id of the DB parameter group assigned to your DB instance.
availability_zone(Option<String>)
:The Availability Zone in which the DB instance resides.
secondary_availability_zone(Option<String>)
:The Availability Zone in which the standby instance is located when deploying with a MultiAZ standby instance.
log_delivery_configuration(Option<LogDeliveryConfiguration>)
:Configuration for sending InfluxDB engine logs to send to specified S3 bucket.
influx_auth_parameters_secret_arn(Option<String>)
:The Amazon Resource Name (ARN) of the AWS Secrets Manager secret containing the initial InfluxDB authorization parameters. The secret value is a JSON formatted key-value pair holding InfluxDB authorization values: organization, bucket, username, and password.
- On failure, responds with
SdkError<UpdateDbInstanceError>
source§impl Client
impl Client
sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.