@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
408 lines (407 loc) • 16.3 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Manage RDS Read Replica Instance resource.
*
* ## Example Usage
*
* ## Import
*
* RDS read replica instance can be imported by `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Rds/readReplicaInstance:ReadReplicaInstance replica_instance <id>
* ```
*/
export declare class ReadReplicaInstance extends pulumi.CustomResource {
/**
* Get an existing ReadReplicaInstance resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ReadReplicaInstanceState, opts?: pulumi.CustomResourceOptions): ReadReplicaInstance;
/**
* Returns true if the given object is an instance of ReadReplicaInstance. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ReadReplicaInstance;
/**
* Specifies whether auto-renew is enabled. Valid values are **true** and **false**.
*/
readonly autoRenew: pulumi.Output<string | undefined>;
/**
* Specifies the AZ name. Changing this parameter will create a new
* resource.
*/
readonly availabilityZone: pulumi.Output<string>;
/**
* Specifies the charging mode of the read replica instance. Valid values
* are **prePaid** and **postPaid**, defaults to **postPaid**. Changing this creates a new resource.
*/
readonly chargingMode: pulumi.Output<string>;
/**
* Specifies the database information. The db structure is documented below.
* Changing this parameter will create a new resource.
*/
readonly db: pulumi.Output<outputs.Rds.ReadReplicaInstanceDb>;
/**
* Specifies the description of the instance. The value consists of 0 to 64
* characters, including letters, digits, periods (.), underscores (_), and hyphens (-).
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Specifies the enterprise project id of the read replica instance.
*/
readonly enterpriseProjectId: pulumi.Output<string>;
/**
* Specifies an intranet floating IP address of read replica instance.
*/
readonly fixedIp: pulumi.Output<string>;
/**
* Specifies the specification code.
*/
readonly flavor: pulumi.Output<string>;
/**
* Specifies the time at which the maintenance time window starts, for example, **22:00**.
*/
readonly maintainBegin: pulumi.Output<string>;
/**
* Specifies the time at which the maintenance time window ends, for example, **01:00**.
*/
readonly maintainEnd: pulumi.Output<string>;
/**
* Specifies the parameter name. Some of them needs the instance to be restarted
* to take effect.
*/
readonly name: pulumi.Output<string>;
/**
* Specify an array of one or more parameters to be set to the read replica instance
* after launched. You can check on console to see which parameters supported. The parameters
* structure is documented below.
*/
readonly parameters: pulumi.Output<outputs.Rds.ReadReplicaInstanceParameter[]>;
/**
* Specifies the charging period of the read replica instance. If `periodUnit` is
* set to **month**, the value ranges from 1 to 9. If `periodUnit` is set to **year**, the value ranges from 1 to 3.
* This parameter is mandatory if `chargingMode` is set to **prePaid**. Changing this creates a new resource.
*/
readonly period: pulumi.Output<number | undefined>;
/**
* Specifies the charging period unit of the read replica instance. Valid
* values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**. Changing this
* creates a new resource.
*/
readonly periodUnit: pulumi.Output<string | undefined>;
/**
* Specifies the DB instance ID, which is used to create a read
* replica. Changing this parameter will create a new resource.
*/
readonly primaryInstanceId: pulumi.Output<string>;
/**
* Indicates the private IP address list.
*/
readonly privateIps: pulumi.Output<string[]>;
/**
* Indicates the public IP address list.
*/
readonly publicIps: pulumi.Output<string[]>;
/**
* The region in which to create the rds read replica instance resource. If
* omitted, the provider-level region will be used.
* Changing this parameter will create a new resource.
* Currently, read replicas can be created **only** in the same region as that of the primary DB instance.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the security group which the read replica instance belongs to.
*/
readonly securityGroupId: pulumi.Output<string>;
/**
* Specifies whether to enable the SSL for read replica instance.
*/
readonly sslEnable: pulumi.Output<boolean>;
/**
* Indicates the instance status.
*/
readonly status: pulumi.Output<string>;
/**
* Indicates the subnet id.
*/
readonly subnetId: pulumi.Output<string>;
/**
* A mapping of tags to assign to the RDS read replica instance. Each tag is represented by one
* key-value pair.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Specifies the volume type. It must same with the type of the primary instance.
* Its value can be any of the following and is case-sensitive:
* + **ULTRAHIGH**: SSD storage.
* + **LOCALSSD**: local SSD storage.
* + **CLOUDSSD**: cloud SSD storage. This storage type is supported only with general-purpose and dedicated DB
* instances.
* + **ESSD**: extreme SSD storage.
*/
readonly type: pulumi.Output<string>;
/**
* Specifies the volume information. The volume structure is
* documented below. Changing this parameter will create a new resource.
*/
readonly volume: pulumi.Output<outputs.Rds.ReadReplicaInstanceVolume>;
/**
* Indicates the VPC ID.
*/
readonly vpcId: pulumi.Output<string>;
/**
* Create a ReadReplicaInstance resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ReadReplicaInstanceArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ReadReplicaInstance resources.
*/
export interface ReadReplicaInstanceState {
/**
* Specifies whether auto-renew is enabled. Valid values are **true** and **false**.
*/
autoRenew?: pulumi.Input<string>;
/**
* Specifies the AZ name. Changing this parameter will create a new
* resource.
*/
availabilityZone?: pulumi.Input<string>;
/**
* Specifies the charging mode of the read replica instance. Valid values
* are **prePaid** and **postPaid**, defaults to **postPaid**. Changing this creates a new resource.
*/
chargingMode?: pulumi.Input<string>;
/**
* Specifies the database information. The db structure is documented below.
* Changing this parameter will create a new resource.
*/
db?: pulumi.Input<inputs.Rds.ReadReplicaInstanceDb>;
/**
* Specifies the description of the instance. The value consists of 0 to 64
* characters, including letters, digits, periods (.), underscores (_), and hyphens (-).
*/
description?: pulumi.Input<string>;
/**
* Specifies the enterprise project id of the read replica instance.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies an intranet floating IP address of read replica instance.
*/
fixedIp?: pulumi.Input<string>;
/**
* Specifies the specification code.
*/
flavor?: pulumi.Input<string>;
/**
* Specifies the time at which the maintenance time window starts, for example, **22:00**.
*/
maintainBegin?: pulumi.Input<string>;
/**
* Specifies the time at which the maintenance time window ends, for example, **01:00**.
*/
maintainEnd?: pulumi.Input<string>;
/**
* Specifies the parameter name. Some of them needs the instance to be restarted
* to take effect.
*/
name?: pulumi.Input<string>;
/**
* Specify an array of one or more parameters to be set to the read replica instance
* after launched. You can check on console to see which parameters supported. The parameters
* structure is documented below.
*/
parameters?: pulumi.Input<pulumi.Input<inputs.Rds.ReadReplicaInstanceParameter>[]>;
/**
* Specifies the charging period of the read replica instance. If `periodUnit` is
* set to **month**, the value ranges from 1 to 9. If `periodUnit` is set to **year**, the value ranges from 1 to 3.
* This parameter is mandatory if `chargingMode` is set to **prePaid**. Changing this creates a new resource.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the read replica instance. Valid
* values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**. Changing this
* creates a new resource.
*/
periodUnit?: pulumi.Input<string>;
/**
* Specifies the DB instance ID, which is used to create a read
* replica. Changing this parameter will create a new resource.
*/
primaryInstanceId?: pulumi.Input<string>;
/**
* Indicates the private IP address list.
*/
privateIps?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Indicates the public IP address list.
*/
publicIps?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The region in which to create the rds read replica instance resource. If
* omitted, the provider-level region will be used.
* Changing this parameter will create a new resource.
* Currently, read replicas can be created **only** in the same region as that of the primary DB instance.
*/
region?: pulumi.Input<string>;
/**
* Specifies the security group which the read replica instance belongs to.
*/
securityGroupId?: pulumi.Input<string>;
/**
* Specifies whether to enable the SSL for read replica instance.
*/
sslEnable?: pulumi.Input<boolean>;
/**
* Indicates the instance status.
*/
status?: pulumi.Input<string>;
/**
* Indicates the subnet id.
*/
subnetId?: pulumi.Input<string>;
/**
* A mapping of tags to assign to the RDS read replica instance. Each tag is represented by one
* key-value pair.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the volume type. It must same with the type of the primary instance.
* Its value can be any of the following and is case-sensitive:
* + **ULTRAHIGH**: SSD storage.
* + **LOCALSSD**: local SSD storage.
* + **CLOUDSSD**: cloud SSD storage. This storage type is supported only with general-purpose and dedicated DB
* instances.
* + **ESSD**: extreme SSD storage.
*/
type?: pulumi.Input<string>;
/**
* Specifies the volume information. The volume structure is
* documented below. Changing this parameter will create a new resource.
*/
volume?: pulumi.Input<inputs.Rds.ReadReplicaInstanceVolume>;
/**
* Indicates the VPC ID.
*/
vpcId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ReadReplicaInstance resource.
*/
export interface ReadReplicaInstanceArgs {
/**
* Specifies whether auto-renew is enabled. Valid values are **true** and **false**.
*/
autoRenew?: pulumi.Input<string>;
/**
* Specifies the AZ name. Changing this parameter will create a new
* resource.
*/
availabilityZone: pulumi.Input<string>;
/**
* Specifies the charging mode of the read replica instance. Valid values
* are **prePaid** and **postPaid**, defaults to **postPaid**. Changing this creates a new resource.
*/
chargingMode?: pulumi.Input<string>;
/**
* Specifies the database information. The db structure is documented below.
* Changing this parameter will create a new resource.
*/
db?: pulumi.Input<inputs.Rds.ReadReplicaInstanceDb>;
/**
* Specifies the description of the instance. The value consists of 0 to 64
* characters, including letters, digits, periods (.), underscores (_), and hyphens (-).
*/
description?: pulumi.Input<string>;
/**
* Specifies the enterprise project id of the read replica instance.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies an intranet floating IP address of read replica instance.
*/
fixedIp?: pulumi.Input<string>;
/**
* Specifies the specification code.
*/
flavor: pulumi.Input<string>;
/**
* Specifies the time at which the maintenance time window starts, for example, **22:00**.
*/
maintainBegin?: pulumi.Input<string>;
/**
* Specifies the time at which the maintenance time window ends, for example, **01:00**.
*/
maintainEnd?: pulumi.Input<string>;
/**
* Specifies the parameter name. Some of them needs the instance to be restarted
* to take effect.
*/
name?: pulumi.Input<string>;
/**
* Specify an array of one or more parameters to be set to the read replica instance
* after launched. You can check on console to see which parameters supported. The parameters
* structure is documented below.
*/
parameters?: pulumi.Input<pulumi.Input<inputs.Rds.ReadReplicaInstanceParameter>[]>;
/**
* Specifies the charging period of the read replica instance. If `periodUnit` is
* set to **month**, the value ranges from 1 to 9. If `periodUnit` is set to **year**, the value ranges from 1 to 3.
* This parameter is mandatory if `chargingMode` is set to **prePaid**. Changing this creates a new resource.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the read replica instance. Valid
* values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**. Changing this
* creates a new resource.
*/
periodUnit?: pulumi.Input<string>;
/**
* Specifies the DB instance ID, which is used to create a read
* replica. Changing this parameter will create a new resource.
*/
primaryInstanceId: pulumi.Input<string>;
/**
* The region in which to create the rds read replica instance resource. If
* omitted, the provider-level region will be used.
* Changing this parameter will create a new resource.
* Currently, read replicas can be created **only** in the same region as that of the primary DB instance.
*/
region?: pulumi.Input<string>;
/**
* Specifies the security group which the read replica instance belongs to.
*/
securityGroupId?: pulumi.Input<string>;
/**
* Specifies whether to enable the SSL for read replica instance.
*/
sslEnable?: pulumi.Input<boolean>;
/**
* A mapping of tags to assign to the RDS read replica instance. Each tag is represented by one
* key-value pair.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the volume information. The volume structure is
* documented below. Changing this parameter will create a new resource.
*/
volume: pulumi.Input<inputs.Rds.ReadReplicaInstanceVolume>;
}