UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

517 lines (516 loc) 20.7 kB
import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../types"; /** * Manages an APIG dedicated instance resource within HuaweiCloud. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as huaweicloud from "@pulumi/huaweicloud"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const instanceName = config.requireObject("instanceName"); * const vpcId = config.requireObject("vpcId"); * const subnetId = config.requireObject("subnetId"); * const securityGroupId = config.requireObject("securityGroupId"); * const enterpriseProjectId = config.requireObject("enterpriseProjectId"); * const testAvailabilityZones = huaweicloud.getAvailabilityZones({}); * const testInstance = new huaweicloud.dedicatedapig.Instance("testInstance", { * edition: "BASIC", * vpcId: vpcId, * subnetId: subnetId, * securityGroupId: securityGroupId, * enterpriseProjectId: enterpriseProjectId, * maintainBegin: "06:00:00", * description: "Created by script", * bandwidthSize: 3, * availableZones: [ * testAvailabilityZones.then(testAvailabilityZones => testAvailabilityZones.names?[0]), * testAvailabilityZones.then(testAvailabilityZones => testAvailabilityZones.names?[1]), * ], * tags: { * foo: "bar", * }, * }); * ``` * * ## Import * * Dedicated instances can be imported by their `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:DedicatedApig/instance:Instance test de379eed30aa4d31a84f426ea3c7ef4e * ``` */ export declare class Instance extends pulumi.CustomResource { /** * Get an existing Instance 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?: InstanceState, opts?: pulumi.CustomResourceOptions): Instance; /** * Returns true if the given object is an instance of Instance. 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 Instance; /** * Specifies the name list of availability zones for the dedicated * instance. * Please following [reference](https://developer.huaweicloud.com/intl/en-us/endpoint?APIG) for list elements. * Changing this will create a new resource. */ readonly availabilityZones: pulumi.Output<string[]>; /** * schema: Deprecated; The name list of availability zones for the dedicated instance. */ readonly availableZones: pulumi.Output<string[] | undefined>; /** * Specifies the egress bandwidth size of the dedicated instance. * The valid value ranges from `0` to `2,000`. */ readonly bandwidthSize: pulumi.Output<number | undefined>; /** * schema: Deprecated; Time when the dedicated instance is created. * * @deprecated Use 'created_at' instead */ readonly createTime: pulumi.Output<string>; /** * Time when the dedicated instance is created, in RFC-3339 format. */ readonly createdAt: pulumi.Output<string>; /** * Specified the list of the instance custom ingress ports. * The customIngressPorts structure is documented below. */ readonly customIngressPorts: pulumi.Output<outputs.DedicatedApig.InstanceCustomIngressPort[] | undefined>; /** * Specifies the description of the dedicated instance. * The description contain a maximum of `255` characters and the angle brackets (< and >) are not allowed. */ readonly description: pulumi.Output<string | undefined>; /** * Specifies the edition of the dedicated instance. * The valid values are as follows: * + **BASIC**: Basic Edition instance. * + **PROFESSIONAL**: Professional Edition instance. * + **ENTERPRISE**: Enterprise Edition instance. * + **PLATINUM**: Platinum Edition instance. * + **BASIC_IPV6**: IPv6 instance of the Basic Edition. * + **PROFESSIONAL_IPV6**: IPv6 instance of the Professional Edition. * + **ENTERPRISE_IPV6**: IPv6 instance of the Enterprise Edition. * + **PLATINUM_IPV6**: IPv6 instance of the Platinum Edition. */ readonly edition: pulumi.Output<string>; /** * The egress (NAT) public IP address. */ readonly egressAddress: pulumi.Output<string>; /** * The EIP ID associated with the dedicated instance. */ readonly eipId: pulumi.Output<string>; /** * Specifies the enterprise project ID to which the dedicated * instance belongs. This parameter is required for enterprise users. */ readonly enterpriseProjectId: pulumi.Output<string>; /** * The ingress EIP address. */ readonly ingressAddress: pulumi.Output<string>; /** * Specifies the ingress bandwidth billing type of the dedicated instance. * The valid values are as follows: * + **bandwidth**: Billed by bandwidth. * + **traffic**: Billed by traffic. */ readonly ingressBandwidthChargingMode: pulumi.Output<string | undefined>; /** * Specifies the ingress bandwidth size of the dedicated instance. * The minimum value is `5` */ readonly ingressBandwidthSize: pulumi.Output<number | undefined>; /** * Specifies whether public access with an IPv6 address is supported. * Changing this will create a new resource. */ readonly ipv6Enable: pulumi.Output<boolean>; /** * The type of load balancer used by the dedicated instance. * The valid value is as follows: * + **elb**: Elastic load balance. */ readonly loadbalancerProvider: pulumi.Output<string>; /** * Specifies the start time of the maintenance time window. * The format is **xx:00:00**, the value of **xx** can be `02`, `06`, `10`, `14`, `18` or `22`. */ readonly maintainBegin: pulumi.Output<string>; /** * End time of the maintenance time window, 4-hour difference between the start time and end time. */ readonly maintainEnd: pulumi.Output<string>; /** * Specifies the name of the dedicated instance. * The name can contain `3` to `64` characters, only letters, digits, hyphens (-) and underscores (_) are allowed, and * must start with a letter. */ readonly name: pulumi.Output<string>; /** * Specifies the region in which to create the dedicated instance resource. * If omitted, the provider-level region will be used. * Changing this will create a new resource. */ readonly region: pulumi.Output<string>; /** * Specifies the ID of the security group to which the dedicated instance * belongs to. */ readonly securityGroupId: pulumi.Output<string>; /** * The current status of the custom ingress port. * + **normal** * + **abnormal** */ readonly status: pulumi.Output<string>; /** * Specifies the ID of the VPC subnet used to create the dedicated instance. * Changing this will create a new resource. */ readonly subnetId: pulumi.Output<string>; /** * The supported features of the APIG dedicated instance. */ readonly supportedFeatures: pulumi.Output<string[]>; /** * Specifies the key/value pairs to associate with the dedicated instance. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Specifies the ID of the VPC used to create the dedicated instance. * Changing this will create a new resource. */ readonly vpcId: pulumi.Output<string>; /** * The ingress private IP address of the VPC. */ readonly vpcIngressAddress: pulumi.Output<string>; /** * The address (full name) of the VPC endpoint service, in the * "{region}.{vpcep_service_name}.{service_id}" format. If this parameter is not specified, the system automatically * generates a name in the "{region}.apig.{service_id}" format. */ readonly vpcepServiceAddress: pulumi.Output<string>; /** * Specifies the name of the VPC endpoint service. * It can contain a maximum of 16 characters, including letters, digits, underscores (_), and hyphens (-). * If this parameter is not specified, the system automatically generates a name in the "{region}.apig.{service_id}" format. * If this parameter is specified, the system automatically generates a name in the * "{region}.{vpcep_service_name}.{service_id}" format. */ readonly vpcepServiceName: pulumi.Output<string>; /** * Create a Instance 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: InstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Instance resources. */ export interface InstanceState { /** * Specifies the name list of availability zones for the dedicated * instance. * Please following [reference](https://developer.huaweicloud.com/intl/en-us/endpoint?APIG) for list elements. * Changing this will create a new resource. */ availabilityZones?: pulumi.Input<pulumi.Input<string>[]>; /** * schema: Deprecated; The name list of availability zones for the dedicated instance. */ availableZones?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies the egress bandwidth size of the dedicated instance. * The valid value ranges from `0` to `2,000`. */ bandwidthSize?: pulumi.Input<number>; /** * schema: Deprecated; Time when the dedicated instance is created. * * @deprecated Use 'created_at' instead */ createTime?: pulumi.Input<string>; /** * Time when the dedicated instance is created, in RFC-3339 format. */ createdAt?: pulumi.Input<string>; /** * Specified the list of the instance custom ingress ports. * The customIngressPorts structure is documented below. */ customIngressPorts?: pulumi.Input<pulumi.Input<inputs.DedicatedApig.InstanceCustomIngressPort>[]>; /** * Specifies the description of the dedicated instance. * The description contain a maximum of `255` characters and the angle brackets (< and >) are not allowed. */ description?: pulumi.Input<string>; /** * Specifies the edition of the dedicated instance. * The valid values are as follows: * + **BASIC**: Basic Edition instance. * + **PROFESSIONAL**: Professional Edition instance. * + **ENTERPRISE**: Enterprise Edition instance. * + **PLATINUM**: Platinum Edition instance. * + **BASIC_IPV6**: IPv6 instance of the Basic Edition. * + **PROFESSIONAL_IPV6**: IPv6 instance of the Professional Edition. * + **ENTERPRISE_IPV6**: IPv6 instance of the Enterprise Edition. * + **PLATINUM_IPV6**: IPv6 instance of the Platinum Edition. */ edition?: pulumi.Input<string>; /** * The egress (NAT) public IP address. */ egressAddress?: pulumi.Input<string>; /** * The EIP ID associated with the dedicated instance. */ eipId?: pulumi.Input<string>; /** * Specifies the enterprise project ID to which the dedicated * instance belongs. This parameter is required for enterprise users. */ enterpriseProjectId?: pulumi.Input<string>; /** * The ingress EIP address. */ ingressAddress?: pulumi.Input<string>; /** * Specifies the ingress bandwidth billing type of the dedicated instance. * The valid values are as follows: * + **bandwidth**: Billed by bandwidth. * + **traffic**: Billed by traffic. */ ingressBandwidthChargingMode?: pulumi.Input<string>; /** * Specifies the ingress bandwidth size of the dedicated instance. * The minimum value is `5` */ ingressBandwidthSize?: pulumi.Input<number>; /** * Specifies whether public access with an IPv6 address is supported. * Changing this will create a new resource. */ ipv6Enable?: pulumi.Input<boolean>; /** * The type of load balancer used by the dedicated instance. * The valid value is as follows: * + **elb**: Elastic load balance. */ loadbalancerProvider?: pulumi.Input<string>; /** * Specifies the start time of the maintenance time window. * The format is **xx:00:00**, the value of **xx** can be `02`, `06`, `10`, `14`, `18` or `22`. */ maintainBegin?: pulumi.Input<string>; /** * End time of the maintenance time window, 4-hour difference between the start time and end time. */ maintainEnd?: pulumi.Input<string>; /** * Specifies the name of the dedicated instance. * The name can contain `3` to `64` characters, only letters, digits, hyphens (-) and underscores (_) are allowed, and * must start with a letter. */ name?: pulumi.Input<string>; /** * Specifies the region in which to create the dedicated instance resource. * If omitted, the provider-level region will be used. * Changing this will create a new resource. */ region?: pulumi.Input<string>; /** * Specifies the ID of the security group to which the dedicated instance * belongs to. */ securityGroupId?: pulumi.Input<string>; /** * The current status of the custom ingress port. * + **normal** * + **abnormal** */ status?: pulumi.Input<string>; /** * Specifies the ID of the VPC subnet used to create the dedicated instance. * Changing this will create a new resource. */ subnetId?: pulumi.Input<string>; /** * The supported features of the APIG dedicated instance. */ supportedFeatures?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies the key/value pairs to associate with the dedicated instance. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Specifies the ID of the VPC used to create the dedicated instance. * Changing this will create a new resource. */ vpcId?: pulumi.Input<string>; /** * The ingress private IP address of the VPC. */ vpcIngressAddress?: pulumi.Input<string>; /** * The address (full name) of the VPC endpoint service, in the * "{region}.{vpcep_service_name}.{service_id}" format. If this parameter is not specified, the system automatically * generates a name in the "{region}.apig.{service_id}" format. */ vpcepServiceAddress?: pulumi.Input<string>; /** * Specifies the name of the VPC endpoint service. * It can contain a maximum of 16 characters, including letters, digits, underscores (_), and hyphens (-). * If this parameter is not specified, the system automatically generates a name in the "{region}.apig.{service_id}" format. * If this parameter is specified, the system automatically generates a name in the * "{region}.{vpcep_service_name}.{service_id}" format. */ vpcepServiceName?: pulumi.Input<string>; } /** * The set of arguments for constructing a Instance resource. */ export interface InstanceArgs { /** * Specifies the name list of availability zones for the dedicated * instance. * Please following [reference](https://developer.huaweicloud.com/intl/en-us/endpoint?APIG) for list elements. * Changing this will create a new resource. */ availabilityZones?: pulumi.Input<pulumi.Input<string>[]>; /** * schema: Deprecated; The name list of availability zones for the dedicated instance. */ availableZones?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies the egress bandwidth size of the dedicated instance. * The valid value ranges from `0` to `2,000`. */ bandwidthSize?: pulumi.Input<number>; /** * Specified the list of the instance custom ingress ports. * The customIngressPorts structure is documented below. */ customIngressPorts?: pulumi.Input<pulumi.Input<inputs.DedicatedApig.InstanceCustomIngressPort>[]>; /** * Specifies the description of the dedicated instance. * The description contain a maximum of `255` characters and the angle brackets (< and >) are not allowed. */ description?: pulumi.Input<string>; /** * Specifies the edition of the dedicated instance. * The valid values are as follows: * + **BASIC**: Basic Edition instance. * + **PROFESSIONAL**: Professional Edition instance. * + **ENTERPRISE**: Enterprise Edition instance. * + **PLATINUM**: Platinum Edition instance. * + **BASIC_IPV6**: IPv6 instance of the Basic Edition. * + **PROFESSIONAL_IPV6**: IPv6 instance of the Professional Edition. * + **ENTERPRISE_IPV6**: IPv6 instance of the Enterprise Edition. * + **PLATINUM_IPV6**: IPv6 instance of the Platinum Edition. */ edition: pulumi.Input<string>; /** * The EIP ID associated with the dedicated instance. */ eipId?: pulumi.Input<string>; /** * Specifies the enterprise project ID to which the dedicated * instance belongs. This parameter is required for enterprise users. */ enterpriseProjectId?: pulumi.Input<string>; /** * Specifies the ingress bandwidth billing type of the dedicated instance. * The valid values are as follows: * + **bandwidth**: Billed by bandwidth. * + **traffic**: Billed by traffic. */ ingressBandwidthChargingMode?: pulumi.Input<string>; /** * Specifies the ingress bandwidth size of the dedicated instance. * The minimum value is `5` */ ingressBandwidthSize?: pulumi.Input<number>; /** * Specifies whether public access with an IPv6 address is supported. * Changing this will create a new resource. */ ipv6Enable?: pulumi.Input<boolean>; /** * The type of load balancer used by the dedicated instance. * The valid value is as follows: * + **elb**: Elastic load balance. */ loadbalancerProvider?: pulumi.Input<string>; /** * Specifies the start time of the maintenance time window. * The format is **xx:00:00**, the value of **xx** can be `02`, `06`, `10`, `14`, `18` or `22`. */ maintainBegin?: pulumi.Input<string>; /** * Specifies the name of the dedicated instance. * The name can contain `3` to `64` characters, only letters, digits, hyphens (-) and underscores (_) are allowed, and * must start with a letter. */ name?: pulumi.Input<string>; /** * Specifies the region in which to create the dedicated instance resource. * If omitted, the provider-level region will be used. * Changing this will create a new resource. */ region?: pulumi.Input<string>; /** * Specifies the ID of the security group to which the dedicated instance * belongs to. */ securityGroupId: pulumi.Input<string>; /** * Specifies the ID of the VPC subnet used to create the dedicated instance. * Changing this will create a new resource. */ subnetId: pulumi.Input<string>; /** * Specifies the key/value pairs to associate with the dedicated instance. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Specifies the ID of the VPC used to create the dedicated instance. * Changing this will create a new resource. */ vpcId: pulumi.Input<string>; /** * Specifies the name of the VPC endpoint service. * It can contain a maximum of 16 characters, including letters, digits, underscores (_), and hyphens (-). * If this parameter is not specified, the system automatically generates a name in the "{region}.apig.{service_id}" format. * If this parameter is specified, the system automatically generates a name in the * "{region}.{vpcep_service_name}.{service_id}" format. */ vpcepServiceName?: pulumi.Input<string>; }