@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
255 lines (254 loc) • 11.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides a resource to manage rds mysql endpoint
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const foo = new volcengine.rds_mysql.Endpoint("foo", {
* autoAddNewNodes: true,
* description: "tf-test-1",
* domain: "mysql-38c3d4f05f6e-te-8c00-private.rds.ivolces.com",
* endpointName: "tf-test-1",
* instanceId: "mysql-38c3d4f05f6e",
* nodes: [
* "Primary",
* "mysql-38c3d4f05f6e-r3b0d",
* ],
* port: 3306,
* readOnlyNodeDistributionType: "Custom",
* readOnlyNodeMaxDelayTime: 30,
* readOnlyNodeWeights: [
* {
* nodeId: "mysql-38c3d4f05f6e-r3b0d",
* nodeType: "ReadOnly",
* weight: 0,
* },
* {
* nodeType: "Primary",
* weight: 100,
* },
* ],
* readWriteMode: "ReadWrite",
* readWriteSpliting: true,
* });
* ```
*
* ## Import
*
* RdsMysqlEndpoint can be imported using the instance id and endpoint id, e.g.
*
* ```sh
* $ pulumi import volcengine:rds_mysql/endpoint:Endpoint default mysql-3c25f219***:mysql-3c25f219****-custom-eeb5
* ```
*/
export declare class Endpoint extends pulumi.CustomResource {
/**
* Get an existing Endpoint 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?: EndpointState, opts?: pulumi.CustomResourceOptions): Endpoint;
/**
* Returns true if the given object is an instance of Endpoint. 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 Endpoint;
/**
* When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are:
* true: Automatically add.
* false: Do not automatically add (default).
*/
readonly autoAddNewNodes: pulumi.Output<boolean | undefined>;
/**
* The description of the endpoint.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
*/
readonly domain: pulumi.Output<string>;
/**
* The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
*/
readonly endpointId: pulumi.Output<string>;
/**
* The name of the endpoint.
*/
readonly endpointName: pulumi.Output<string>;
/**
* The id of the mysql instance.
*/
readonly instanceId: pulumi.Output<string>;
/**
* List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in `Primary`.
*/
readonly nodes: pulumi.Output<string[]>;
/**
* The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
*/
readonly port: pulumi.Output<number>;
/**
* Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values:
* Default: Automatically allocate weights based on specifications (default).
* Custom: Custom weight allocation.
*/
readonly readOnlyNodeDistributionType: pulumi.Output<string>;
/**
* The maximum delay threshold for read-only nodes, when the delay time of a read-only node exceeds this value, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
*/
readonly readOnlyNodeMaxDelayTime: pulumi.Output<number>;
/**
* Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
*/
readonly readOnlyNodeWeights: pulumi.Output<outputs.rds_mysql.EndpointReadOnlyNodeWeight[]>;
/**
* Reading and writing mode: ReadWrite, ReadOnly(Default).
*/
readonly readWriteMode: pulumi.Output<string | undefined>;
/**
* Enable read-write separation. Possible values: TRUE, FALSE.
* This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
*/
readonly readWriteSpliting: pulumi.Output<boolean>;
/**
* Create a Endpoint 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: EndpointArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Endpoint resources.
*/
export interface EndpointState {
/**
* When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are:
* true: Automatically add.
* false: Do not automatically add (default).
*/
autoAddNewNodes?: pulumi.Input<boolean>;
/**
* The description of the endpoint.
*/
description?: pulumi.Input<string>;
/**
* Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
*/
domain?: pulumi.Input<string>;
/**
* The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
*/
endpointId?: pulumi.Input<string>;
/**
* The name of the endpoint.
*/
endpointName?: pulumi.Input<string>;
/**
* The id of the mysql instance.
*/
instanceId?: pulumi.Input<string>;
/**
* List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in `Primary`.
*/
nodes?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
*/
port?: pulumi.Input<number>;
/**
* Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values:
* Default: Automatically allocate weights based on specifications (default).
* Custom: Custom weight allocation.
*/
readOnlyNodeDistributionType?: pulumi.Input<string>;
/**
* The maximum delay threshold for read-only nodes, when the delay time of a read-only node exceeds this value, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
*/
readOnlyNodeMaxDelayTime?: pulumi.Input<number>;
/**
* Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
*/
readOnlyNodeWeights?: pulumi.Input<pulumi.Input<inputs.rds_mysql.EndpointReadOnlyNodeWeight>[]>;
/**
* Reading and writing mode: ReadWrite, ReadOnly(Default).
*/
readWriteMode?: pulumi.Input<string>;
/**
* Enable read-write separation. Possible values: TRUE, FALSE.
* This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
*/
readWriteSpliting?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a Endpoint resource.
*/
export interface EndpointArgs {
/**
* When the terminal type is a read-write terminal or a read-only terminal, support is provided for setting whether new nodes are automatically added. The values are:
* true: Automatically add.
* false: Do not automatically add (default).
*/
autoAddNewNodes?: pulumi.Input<boolean>;
/**
* The description of the endpoint.
*/
description?: pulumi.Input<string>;
/**
* Connection address, Please note that the connection address can only modify the prefix. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
*/
domain?: pulumi.Input<string>;
/**
* The id of the endpoint. Import an exist endpoint, usually for import a default endpoint generated with instance creating.
*/
endpointId?: pulumi.Input<string>;
/**
* The name of the endpoint.
*/
endpointName?: pulumi.Input<string>;
/**
* The id of the mysql instance.
*/
instanceId: pulumi.Input<string>;
/**
* List of node IDs configured for the endpoint. Required when EndpointType is Custom. To add a master node to the terminal, there is no need to fill in the master node ID, just fill in `Primary`.
*/
nodes: pulumi.Input<pulumi.Input<string>[]>;
/**
* The port. Cannot modify public network port. In one call, it is not possible to modify both the connection address prefix and the port at the same time.
*/
port?: pulumi.Input<number>;
/**
* Read weight allocation mode. This parameter is required when enabling read-write separation setting to TRUE. Possible values:
* Default: Automatically allocate weights based on specifications (default).
* Custom: Custom weight allocation.
*/
readOnlyNodeDistributionType?: pulumi.Input<string>;
/**
* The maximum delay threshold for read-only nodes, when the delay time of a read-only node exceeds this value, the read traffic will not be sent to that node, unit: seconds. Value range: 0~3600. Default value: 30.
*/
readOnlyNodeMaxDelayTime?: pulumi.Input<number>;
/**
* Customize read weight distribution, that is, pass in the read request weight of the master node and read-only nodes. It increases by 100 and the maximum value is 10000. When the ReadOnlyNodeDistributionType value is Custom, this parameter needs to be passed in.
*/
readOnlyNodeWeights?: pulumi.Input<pulumi.Input<inputs.rds_mysql.EndpointReadOnlyNodeWeight>[]>;
/**
* Reading and writing mode: ReadWrite, ReadOnly(Default).
*/
readWriteMode?: pulumi.Input<string>;
/**
* Enable read-write separation. Possible values: TRUE, FALSE.
* This setting can be configured when ReadWriteMode is set to read-write, but cannot be configured when ReadWriteMode is set to read-only. This parameter only applies to the default terminal.
*/
readWriteSpliting?: pulumi.Input<boolean>;
}