@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
218 lines (217 loc) • 7.99 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a link resource within HuaweiCloud. A link enables the CDM cluster to read data from and write data to
* a data source.
*
* ## Example Usage
* ### Link to MySql
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const mysqlLinkName = config.requireObject("mysqlLinkName");
* const cdmClusterId = config.requireObject("cdmClusterId");
* const mysqlHost = config.requireObject("mysqlHost");
* const dbName = config.requireObject("dbName");
* const dbPassword = config.requireObject("dbPassword");
* const mysqlLink = new huaweicloud.cdm.Link("mysqlLink", {
* connector: "generic-jdbc-connector",
* clusterId: cdmClusterId,
* config: {
* databaseType: "MYSQL",
* host: mysqlHost,
* port: "3306",
* database: dbName,
* username: _var.username,
* },
* password: dbPassword,
* });
* ```
*
* ## Import
*
* The link can be imported by `id`, It is composed of the ID of CDM cluster and the name of job, separated by a slash.
*
* For example, bash
*
* ```sh
* $ pulumi import huaweicloud:Cdm/link:Link test b11b407c-e604-4e8d-8bc4-92398320b847/linkName
* ```
*
* Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`password`, `secret_key` and `config`. It is generally recommended running `terraform plan` after importing an instance. You can then decide if changes should be applied to the instance, or the resource definition should be updated to align with the instance. Also you can ignore changes as below. hcl resource "huaweicloud_cdm_link" "test" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* password, secret_key, config,
*
* ]
*
* } }
*/
export declare class Link extends pulumi.CustomResource {
/**
* Get an existing Link 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?: LinkState, opts?: pulumi.CustomResourceOptions): Link;
/**
* Returns true if the given object is an instance of Link. 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 Link;
/**
* Specifies access key for accessing the data sources.
*/
readonly accessKey: pulumi.Output<string | undefined>;
/**
* Specifies the id of CDM cluster which this link belongs to.
* Changing this parameter will create a new resource.
*/
readonly clusterId: pulumi.Output<string>;
/**
* Specifies the link configuration parameters. Each type of the data source to be connected
* has different configuration parameters, please refer to the document link below.
*/
readonly config: pulumi.Output<{
[key: string]: string;
}>;
/**
* Specifies the connector that is classified based on the type of the data
* source to be connected. Changing this parameter will create a new resource. The options are as follows:
*/
readonly connector: pulumi.Output<string>;
/**
* Specifies whether to enable the link. The default value is `true`.
*/
readonly enabled: pulumi.Output<boolean | undefined>;
/**
* Specifies the name of the link.
*/
readonly name: pulumi.Output<string>;
/**
* Specifies the password for accessing the data sources.
*/
readonly password: pulumi.Output<string | undefined>;
/**
* The region in which to create the resource. If omitted, the
* provider-level region will be used. Changing this parameter will create a new resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies security key for accessing the data sources.
*/
readonly secretKey: pulumi.Output<string | undefined>;
/**
* Create a Link 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: LinkArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Link resources.
*/
export interface LinkState {
/**
* Specifies access key for accessing the data sources.
*/
accessKey?: pulumi.Input<string>;
/**
* Specifies the id of CDM cluster which this link belongs to.
* Changing this parameter will create a new resource.
*/
clusterId?: pulumi.Input<string>;
/**
* Specifies the link configuration parameters. Each type of the data source to be connected
* has different configuration parameters, please refer to the document link below.
*/
config?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the connector that is classified based on the type of the data
* source to be connected. Changing this parameter will create a new resource. The options are as follows:
*/
connector?: pulumi.Input<string>;
/**
* Specifies whether to enable the link. The default value is `true`.
*/
enabled?: pulumi.Input<boolean>;
/**
* Specifies the name of the link.
*/
name?: pulumi.Input<string>;
/**
* Specifies the password for accessing the data sources.
*/
password?: pulumi.Input<string>;
/**
* The region in which to create the resource. If omitted, the
* provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies security key for accessing the data sources.
*/
secretKey?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Link resource.
*/
export interface LinkArgs {
/**
* Specifies access key for accessing the data sources.
*/
accessKey?: pulumi.Input<string>;
/**
* Specifies the id of CDM cluster which this link belongs to.
* Changing this parameter will create a new resource.
*/
clusterId: pulumi.Input<string>;
/**
* Specifies the link configuration parameters. Each type of the data source to be connected
* has different configuration parameters, please refer to the document link below.
*/
config: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the connector that is classified based on the type of the data
* source to be connected. Changing this parameter will create a new resource. The options are as follows:
*/
connector: pulumi.Input<string>;
/**
* Specifies whether to enable the link. The default value is `true`.
*/
enabled?: pulumi.Input<boolean>;
/**
* Specifies the name of the link.
*/
name?: pulumi.Input<string>;
/**
* Specifies the password for accessing the data sources.
*/
password?: pulumi.Input<string>;
/**
* The region in which to create the resource. If omitted, the
* provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies security key for accessing the data sources.
*/
secretKey?: pulumi.Input<string>;
}