influxdb_instances
Creates, updates, deletes or gets an influxdb_instance resource or lists influxdb_instances in a region
Overview
| Name | influxdb_instances |
| Type | Resource |
| Description | The AWS::Timestream::InfluxDBInstance resource creates an InfluxDB instance. |
| Id | awscc.timestream.influxdb_instances |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
username | string | The username for the InfluxDB instance. |
password | string | The password for the InfluxDB instance. |
organization | string | The organization for the InfluxDB instance. |
bucket | string | The bucket for the InfluxDB instance. |
db_instance_type | string | The compute instance of the InfluxDB instance. |
vpc_subnet_ids | array | A list of EC2 subnet IDs for this InfluxDB instance. |
vpc_security_group_ids | array | A list of Amazon EC2 VPC security groups to associate with this InfluxDB instance. |
publicly_accessible | boolean | Attach a public IP to the customer ENI. |
db_storage_type | string | The storage type of the InfluxDB instance. |
allocated_storage | integer | The allocated storage for the InfluxDB instance. |
db_parameter_group_identifier | string | The name of an existing InfluxDB parameter group. |
port | integer | The port number on which InfluxDB accepts connections. |
network_type | string | Network type of the InfluxDB Instance. |
log_delivery_configuration | object | Configuration for sending logs to customer account from the InfluxDB instance. |
status | string | Status of the InfluxDB Instance. |
arn | string | The Amazon Resource Name (ARN) that is associated with the InfluxDB instance. |
name | string | The unique name that is associated with the InfluxDB instance. |
availability_zone | string | The Availability Zone (AZ) where the InfluxDB instance is created. |
secondary_availability_zone | string | The Secondary Availability Zone (AZ) where the InfluxDB instance is created, if DeploymentType is set as WITH_MULTIAZ_STANDBY. |
endpoint | string | The connection endpoint for the InfluxDB instance. |
influx_auth_parameters_secret_arn | string | The Auth parameters secret Amazon Resource name (ARN) that is associated with the InfluxDB instance. |
id | string | The service generated unique identifier for InfluxDB instance. |
deployment_type | string | Deployment type of the InfluxDB Instance. |
tags | array | An arbitrary set of tags (key-value pairs) for this DB instance. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | The service generated unique identifier for InfluxDB instance. |
region | string | AWS region. |
For more information, see AWS::Timestream::InfluxDBInstance.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | influxdb_instances | INSERT | region |
delete_resource | influxdb_instances | DELETE | Identifier, region |
update_resource | influxdb_instances | UPDATE | Identifier, PatchDocument, region |
list_resources | influxdb_instances_list_only | SELECT | region |
get_resource | influxdb_instances | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual influxdb_instance.
SELECT
region,
username,
password,
organization,
bucket,
db_instance_type,
vpc_subnet_ids,
vpc_security_group_ids,
publicly_accessible,
db_storage_type,
allocated_storage,
db_parameter_group_identifier,
port,
network_type,
log_delivery_configuration,
status,
arn,
name,
availability_zone,
secondary_availability_zone,
endpoint,
influx_auth_parameters_secret_arn,
id,
deployment_type,
tags
FROM awscc.timestream.influxdb_instances
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
Lists all influxdb_instances in a region.
SELECT
region,
id
FROM awscc.timestream.influxdb_instances_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new influxdb_instance resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.timestream.influxdb_instances (
Username,
Password,
Organization,
Bucket,
DbInstanceType,
VpcSubnetIds,
VpcSecurityGroupIds,
PubliclyAccessible,
DbStorageType,
AllocatedStorage,
DbParameterGroupIdentifier,
Port,
NetworkType,
LogDeliveryConfiguration,
Name,
DeploymentType,
Tags,
region
)
SELECT
'{{ username }}',
'{{ password }}',
'{{ organization }}',
'{{ bucket }}',
'{{ db_instance_type }}',
'{{ vpc_subnet_ids }}',
'{{ vpc_security_group_ids }}',
'{{ publicly_accessible }}',
'{{ db_storage_type }}',
'{{ allocated_storage }}',
'{{ db_parameter_group_identifier }}',
'{{ port }}',
'{{ network_type }}',
'{{ log_delivery_configuration }}',
'{{ name }}',
'{{ deployment_type }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.timestream.influxdb_instances (
Username,
Password,
Organization,
Bucket,
DbInstanceType,
VpcSubnetIds,
VpcSecurityGroupIds,
PubliclyAccessible,
DbStorageType,
AllocatedStorage,
DbParameterGroupIdentifier,
Port,
NetworkType,
LogDeliveryConfiguration,
Name,
DeploymentType,
Tags,
region
)
SELECT
'{{ username }}',
'{{ password }}',
'{{ organization }}',
'{{ bucket }}',
'{{ db_instance_type }}',
'{{ vpc_subnet_ids }}',
'{{ vpc_security_group_ids }}',
'{{ publicly_accessible }}',
'{{ db_storage_type }}',
'{{ allocated_storage }}',
'{{ db_parameter_group_identifier }}',
'{{ port }}',
'{{ network_type }}',
'{{ log_delivery_configuration }}',
'{{ name }}',
'{{ deployment_type }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: influxdb_instance
props:
- name: username
value: '{{ username }}'
- name: password
value: '{{ password }}'
- name: organization
value: '{{ organization }}'
- name: bucket
value: '{{ bucket }}'
- name: db_instance_type
value: '{{ db_instance_type }}'
- name: vpc_subnet_ids
value:
- '{{ vpc_subnet_ids[0] }}'
- name: vpc_security_group_ids
value:
- '{{ vpc_security_group_ids[0] }}'
- name: publicly_accessible
value: '{{ publicly_accessible }}'
- name: db_storage_type
value: '{{ db_storage_type }}'
- name: allocated_storage
value: '{{ allocated_storage }}'
- name: db_parameter_group_identifier
value: '{{ db_parameter_group_identifier }}'
- name: port
value: '{{ port }}'
- name: network_type
value: '{{ network_type }}'
- name: log_delivery_configuration
value:
s3_configuration:
bucket_name: '{{ bucket_name }}'
enabled: '{{ enabled }}'
- name: name
value: '{{ name }}'
- name: deployment_type
value: '{{ deployment_type }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a influxdb_instance resource, using stack-deploy.
/*+ update */
UPDATE awscc.timestream.influxdb_instances
SET PatchDocument = string('{{ {
"DbInstanceType": db_instance_type,
"DbStorageType": db_storage_type,
"AllocatedStorage": allocated_storage,
"DbParameterGroupIdentifier": db_parameter_group_identifier,
"Port": port,
"LogDeliveryConfiguration": log_delivery_configuration,
"DeploymentType": deployment_type,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.timestream.influxdb_instances
WHERE
Identifier = '{{ id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the influxdb_instances resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
s3:ListBucket,
s3:GetBucketPolicy,
timestream-influxdb:GetDbInstance,
timestream-influxdb:ListDbInstances,
timestream-influxdb:CreateDbInstance,
timestream-influxdb:TagResource,
timestream-influxdb:ListTagsForResource,
ec2:DescribeSubnets,
ec2:DescribeVpcs,
ec2:DescribeNetworkInterfaces,
ec2:DescribeSecurityGroups,
ec2:CreateNetworkInterface,
iam:CreateServiceLinkedRole
timestream-influxdb:GetDbInstance,
timestream-influxdb:ListTagsForResource
s3:ListBucket,
s3:GetBucketPolicy,
timestream-influxdb:GetDbInstance,
timestream-influxdb:ListDbInstances,
timestream-influxdb:UpdateDbInstance,
timestream-influxdb:TagResource,
timestream-influxdb:UntagResource,
timestream-influxdb:ListTagsForResource,
ec2:DescribeSubnets,
ec2:DescribeVpcs
timestream-influxdb:GetDbInstance,
timestream-influxdb:ListDbInstances,
timestream-influxdb:DeleteDbInstance
timestream-influxdb:ListDbInstances