Skip to content

create_db_cluster async

create_db_cluster(
    name: DbClusterName,
    db_instance_type: DbInstanceType,
    vpc_subnet_ids: VpcSubnetIdList,
    vpc_security_group_ids: VpcSecurityGroupIdList,
    *,
    config_overrides: Optional[AsyncTimestreamInfluxDBClientConfig] = None,
    username: Optional[Username] = None,
    password: Optional[Password] = None,
    organization: Optional[Organization] = None,
    bucket: Optional[Bucket] = None,
    port: Optional[Port] = None,
    db_parameter_group_identifier: Optional[DbParameterGroupIdentifier] = None,
    db_storage_type: Optional[DbStorageType] = None,
    allocated_storage: Optional[AllocatedStorage] = None,
    network_type: Optional[NetworkType] = None,
    publicly_accessible: Optional[bool] = None,
    deployment_type: Optional[ClusterDeploymentType] = None,
    failover_mode: Optional[FailoverMode] = None,
    log_delivery_configuration: Optional[LogDeliveryConfiguration] = None,
    maintenance_schedule: Optional[MaintenanceSchedule] = None,
    db_backup_configurations: Optional[DbBackupConfigurationInputList] = None,
    kms_key_id: Optional[KmsKeyId] = None,
    tags: Optional[RequestTagMap] = None,
) -> CreateDbClusterOutput

Creates a new Timestream for InfluxDB cluster.

Parameters:

  • name (DbClusterName) –

    The name that uniquely identifies the DB cluster when interacting with the Amazon Timestream for InfluxDB API and CLI commands. This name will also be a prefix included in the endpoint. DB cluster names must be unique per customer and per region.

  • username (Optional[Username], default: None ) –

    The 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 Secrets Manager in your account.

  • password (Optional[Password], default: None ) –

    The 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 Secrets Manager in your account.

  • organization (Optional[Organization], default: None ) –

    The name of the initial organization for the initial admin user in InfluxDB. An InfluxDB organization is a workspace for a group of users.

  • bucket (Optional[Bucket], default: None ) –

    The 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.

  • port (Optional[Port], default: None ) –

    The port number on which InfluxDB accepts connections.

    Valid Values: 1024-65535

    Default: 8086 for InfluxDB v2, 8181 for InfluxDB v3

    Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680

  • db_parameter_group_identifier (Optional[DbParameterGroupIdentifier], default: None ) –

    The ID of the DB parameter group to assign to your DB cluster. DB parameter groups specify how the database is configured. For example, DB parameter groups can specify the limit for query concurrency.

  • db_instance_type (DbInstanceType) –

    The Timestream for InfluxDB DB instance type to run InfluxDB on.

  • db_storage_type (Optional[DbStorageType], default: None ) –

    The Timestream for InfluxDB DB storage type to read and write InfluxDB data.

    You can choose between three different types of provisioned Influx IOPS Included storage according to your workload requirements:

    • Influx I/O Included 3000 IOPS

    • Influx I/O Included 12000 IOPS

    • Influx I/O Included 16000 IOPS

  • allocated_storage (Optional[AllocatedStorage], default: None ) –

    The amount of storage to allocate for your DB storage type in GiB (gibibytes).

  • network_type (Optional[NetworkType], default: None ) –

    Specifies whether the network type of the Timestream for InfluxDB cluster is IPv4, which can communicate over IPv4 protocol only, or DUAL, which can communicate over both IPv4 and IPv6 protocols.

  • publicly_accessible (Optional[bool], default: None ) –

    Configures the Timestream for InfluxDB cluster with a public IP to facilitate access from outside the VPC.

  • vpc_subnet_ids (VpcSubnetIdList) –

    A list of VPC subnet IDs to associate with the DB cluster. Provide at least two VPC subnet IDs in different Availability Zones when deploying with a Multi-AZ standby.

  • vpc_security_group_ids (VpcSecurityGroupIdList) –

    A list of VPC security group IDs to associate with the Timestream for InfluxDB cluster.

  • deployment_type (Optional[ClusterDeploymentType], default: None ) –

    Specifies the type of cluster to create.

  • failover_mode (Optional[FailoverMode], default: None ) –

    Specifies the behavior of failure recovery when the primary node of the cluster fails.

  • log_delivery_configuration (Optional[LogDeliveryConfiguration], default: None ) –

    Configuration for sending InfluxDB engine logs to a specified S3 bucket.

  • maintenance_schedule (Optional[MaintenanceSchedule], default: None ) –

    Specifies the maintenance schedule for the DB cluster, including the preferred maintenance window and timezone.

  • db_backup_configurations (Optional[DbBackupConfigurationInputList], default: None ) –

    A list of backup configurations to enable automated backups for the DB cluster.

  • kms_key_id (Optional[KmsKeyId], default: None ) –

    The Amazon Web Services KMS key identifier to use for encryption of the DB cluster. Can be a key ID, key ARN, alias name, or alias ARN.

  • tags (Optional[RequestTagMap], default: None ) –

    A list of key-value pairs to associate with the DB instance.

Raises:

Source code in docs_src/capo_timestream_influxdb/_services/async_timestream_influx_db.py
async def create_db_cluster(
    self,
    name: "capo_timestream_influxdb.types.db_cluster_name.DbClusterName",
    db_instance_type: "capo_timestream_influxdb.types.db_instance_type.DbInstanceType",
    vpc_subnet_ids: "capo_timestream_influxdb.types.vpc_subnet_id_list.VpcSubnetIdList",
    vpc_security_group_ids: "capo_timestream_influxdb.types.vpc_security_group_id_list.VpcSecurityGroupIdList",
    *,
    config_overrides: Optional[AsyncTimestreamInfluxDBClientConfig] = None,
    username: Optional["capo_timestream_influxdb.types.username.Username"] = None,
    password: Optional["capo_timestream_influxdb.types.password.Password"] = None,
    organization: Optional[
        "capo_timestream_influxdb.types.organization.Organization"
    ] = None,
    bucket: Optional["capo_timestream_influxdb.types.bucket.Bucket"] = None,
    port: Optional["capo_timestream_influxdb.types.port.Port"] = None,
    db_parameter_group_identifier: Optional[
        "capo_timestream_influxdb.types.db_parameter_group_identifier.DbParameterGroupIdentifier"
    ] = None,
    db_storage_type: Optional[
        "capo_timestream_influxdb.types.db_storage_type.DbStorageType"
    ] = None,
    allocated_storage: Optional[
        "capo_timestream_influxdb.types.allocated_storage.AllocatedStorage"
    ] = None,
    network_type: Optional[
        "capo_timestream_influxdb.types.network_type.NetworkType"
    ] = None,
    publicly_accessible: Optional[bool] = None,
    deployment_type: Optional[
        "capo_timestream_influxdb.types.cluster_deployment_type.ClusterDeploymentType"
    ] = None,
    failover_mode: Optional[
        "capo_timestream_influxdb.types.failover_mode.FailoverMode"
    ] = None,
    log_delivery_configuration: Optional[
        "capo_timestream_influxdb.types.log_delivery_configuration.LogDeliveryConfiguration"
    ] = None,
    maintenance_schedule: Optional[
        "capo_timestream_influxdb.types.maintenance_schedule.MaintenanceSchedule"
    ] = None,
    db_backup_configurations: Optional[
        "capo_timestream_influxdb.types.db_backup_configuration_input_list.DbBackupConfigurationInputList"
    ] = None,
    kms_key_id: Optional[
        "capo_timestream_influxdb.types.kms_key_id.KmsKeyId"
    ] = None,
    tags: Optional[
        "capo_timestream_influxdb.types.request_tag_map.RequestTagMap"
    ] = None,
) -> (
    "capo_timestream_influxdb.types.create_db_cluster_output.CreateDbClusterOutput"
):
    """<p>Creates a new Timestream for InfluxDB cluster.</p>

    Args:
        name: <p>The name that uniquely identifies the DB cluster when interacting with the Amazon Timestream for InfluxDB API and CLI commands. This name will also be a prefix included in the endpoint. DB cluster names must be unique per customer and per region.</p>
        username: <p>The 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 Secrets Manager in your account.</p>
        password: <p>The 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 Secrets Manager in your account.</p>
        organization: <p>The name of the initial organization for the initial admin user in InfluxDB. An InfluxDB organization is a workspace for a group of users.</p>
        bucket: <p>The 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.</p>
        port: <p>The port number on which InfluxDB accepts connections.</p> <p>Valid Values: 1024-65535</p> <p>Default: 8086 for InfluxDB v2, 8181 for InfluxDB v3</p> <p>Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680</p>
        db_parameter_group_identifier: <p>The ID of the DB parameter group to assign to your DB cluster. DB parameter groups specify how the database is configured. For example, DB parameter groups can specify the limit for query concurrency.</p>
        db_instance_type: <p>The Timestream for InfluxDB DB instance type to run InfluxDB on.</p>
        db_storage_type: <p>The Timestream for InfluxDB DB storage type to read and write InfluxDB data.</p> <p>You can choose between three different types of provisioned Influx IOPS Included storage according to your workload requirements:</p> <ul> <li> <p>Influx I/O Included 3000 IOPS</p> </li> <li> <p>Influx I/O Included 12000 IOPS</p> </li> <li> <p>Influx I/O Included 16000 IOPS</p> </li> </ul>
        allocated_storage: <p>The amount of storage to allocate for your DB storage type in GiB (gibibytes).</p>
        network_type: <p>Specifies whether the network type of the Timestream for InfluxDB cluster is IPv4, which can communicate over IPv4 protocol only, or DUAL, which can communicate over both IPv4 and IPv6 protocols.</p>
        publicly_accessible: <p>Configures the Timestream for InfluxDB cluster with a public IP to facilitate access from outside the VPC.</p>
        vpc_subnet_ids: <p>A list of VPC subnet IDs to associate with the DB cluster. Provide at least two VPC subnet IDs in different Availability Zones when deploying with a Multi-AZ standby.</p>
        vpc_security_group_ids: <p>A list of VPC security group IDs to associate with the Timestream for InfluxDB cluster.</p>
        deployment_type: <p>Specifies the type of cluster to create.</p>
        failover_mode: <p>Specifies the behavior of failure recovery when the primary node of the cluster fails.</p>
        log_delivery_configuration: <p>Configuration for sending InfluxDB engine logs to a specified S3 bucket.</p>
        maintenance_schedule: <p>Specifies the maintenance schedule for the DB cluster, including the preferred maintenance window and timezone.</p>
        db_backup_configurations: <p>A list of backup configurations to enable automated backups for the DB cluster.</p>
        kms_key_id: <p>The Amazon Web Services KMS key identifier to use for encryption of the DB cluster. Can be a key ID, key ARN, alias name, or alias ARN.</p>
        tags: <p>A list of key-value pairs to associate with the DB instance.</p>

    Raises:
        capo_timestream_influxdb.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_timestream_influxdb.errors.conflict_exception.ConflictException: <p>The request conflicts with an existing resource in Timestream for InfluxDB.</p>
        capo_timestream_influxdb.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_timestream_influxdb.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found or does not exist.</p>
        capo_timestream_influxdb.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeds the service quota.</p>
        capo_timestream_influxdb.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_timestream_influxdb.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by Timestream for InfluxDB.</p>
        capo_timestream_influxdb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_timestream_influxdb.types.create_db_cluster_input.CreateDbClusterInput]",
    ) -> AsyncOperationResponse[
        "capo_timestream_influxdb.types.create_db_cluster_output.CreateDbClusterOutput"
    ]:
        import capo_timestream_influxdb._operations.amazon_timestream_influx_db.create_db_cluster

        (
            output,
            http_response,
        ) = await capo_timestream_influxdb._operations.amazon_timestream_influx_db.create_db_cluster.async_create_db_cluster(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_timestream_influxdb.types.create_db_cluster_input.CreateDbClusterInput",
    ) -> dict[str, Any]:
        import capo_timestream_influxdb.types.create_db_cluster_input

        return (
            capo_timestream_influxdb.types.create_db_cluster_input.redact_sensitive(
                input_
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateDbCluster", redact_input=_redact_input),
    )
    input_: capo_timestream_influxdb.types.create_db_cluster_input.CreateDbClusterInput = {
        "name": name,
        "db_instance_type": db_instance_type,
        "vpc_subnet_ids": vpc_subnet_ids,
        "vpc_security_group_ids": vpc_security_group_ids,
    }
    if username is not None:
        input_["username"] = username
    if password is not None:
        input_["password"] = password
    if organization is not None:
        input_["organization"] = organization
    if bucket is not None:
        input_["bucket"] = bucket
    if port is not None:
        input_["port"] = port
    if db_parameter_group_identifier is not None:
        input_["db_parameter_group_identifier"] = db_parameter_group_identifier
    if db_storage_type is not None:
        input_["db_storage_type"] = db_storage_type
    if allocated_storage is not None:
        input_["allocated_storage"] = allocated_storage
    if network_type is not None:
        input_["network_type"] = network_type
    if publicly_accessible is not None:
        input_["publicly_accessible"] = publicly_accessible
    if deployment_type is not None:
        input_["deployment_type"] = deployment_type
    if failover_mode is not None:
        input_["failover_mode"] = failover_mode
    if log_delivery_configuration is not None:
        input_["log_delivery_configuration"] = log_delivery_configuration
    if maintenance_schedule is not None:
        input_["maintenance_schedule"] = maintenance_schedule
    if db_backup_configurations is not None:
        input_["db_backup_configurations"] = db_backup_configurations
    if kms_key_id is not None:
        input_["kms_key_id"] = kms_key_id
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output