UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

135 lines (134 loc) 5.08 kB
import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../types"; /** * Provides a resource to manage the VPC endpoint connections. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const serviceVpcId = config.requireObject("serviceVpcId"); * const vmPort = config.requireObject("vmPort"); * const vpcId = config.requireObject("vpcId"); * const networkId = config.requireObject("networkId"); * const demoService = new huaweicloud.vpcep.Service("demoService", { * serverType: "VM", * vpcId: serviceVpcId, * portId: vmPort, * approval: true, * portMappings: [{ * servicePort: 8080, * terminalPort: 80, * }], * }); * const demoEndpoint = new huaweicloud.vpcep.Endpoint("demoEndpoint", { * serviceId: demoService.id, * vpcId: vpcId, * networkId: networkId, * enableDns: true, * }); * const approval = new huaweicloud.vpcep.Approval("approval", { * serviceId: demoService.id, * endpoints: [demoEndpoint.id], * }); * ``` * * ## Import * * VPC endpoint approval can be imported using the `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:Vpcep/approval:Approval test <id> * ``` */ export declare class Approval extends pulumi.CustomResource { /** * Get an existing Approval 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?: ApprovalState, opts?: pulumi.CustomResourceOptions): Approval; /** * Returns true if the given object is an instance of Approval. 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 Approval; /** * An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below. */ readonly connections: pulumi.Output<outputs.Vpcep.ApprovalConnection[]>; /** * Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint * service. The VPC endpoints will be rejected when the resource was destroyed. */ readonly endpoints: pulumi.Output<string[]>; /** * The region in which to obtain the VPC endpoint service. If omitted, the * provider-level region will be used. Changing this creates a new resource. */ readonly region: pulumi.Output<string>; /** * Specifies the ID of the VPC endpoint service. Changing this creates a new * resource. */ readonly serviceId: pulumi.Output<string>; /** * Create a Approval 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: ApprovalArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Approval resources. */ export interface ApprovalState { /** * An array of VPC endpoints connect to the VPC endpoint service. Structure is documented below. */ connections?: pulumi.Input<pulumi.Input<inputs.Vpcep.ApprovalConnection>[]>; /** * Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint * service. The VPC endpoints will be rejected when the resource was destroyed. */ endpoints?: pulumi.Input<pulumi.Input<string>[]>; /** * The region in which to obtain the VPC endpoint service. If omitted, the * provider-level region will be used. Changing this creates a new resource. */ region?: pulumi.Input<string>; /** * Specifies the ID of the VPC endpoint service. Changing this creates a new * resource. */ serviceId?: pulumi.Input<string>; } /** * The set of arguments for constructing a Approval resource. */ export interface ApprovalArgs { /** * Specifies the list of VPC endpoint IDs which accepted to connect to VPC endpoint * service. The VPC endpoints will be rejected when the resource was destroyed. */ endpoints: pulumi.Input<pulumi.Input<string>[]>; /** * The region in which to obtain the VPC endpoint service. If omitted, the * provider-level region will be used. Changing this creates a new resource. */ region?: pulumi.Input<string>; /** * Specifies the ID of the VPC endpoint service. Changing this creates a new * resource. */ serviceId: pulumi.Input<string>; }