UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

118 lines (117 loc) 3.71 kB
import * as pulumi from "@pulumi/pulumi"; /** * The VPC Peering Connection data source provides details about a specific VPC peering connection. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as huaweicloud from "@pulumi/huaweicloud"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const vpc = huaweicloud.Vpc.getVpc({ * name: "vpc", * }); * const peerVpc = huaweicloud.Vpc.getVpc({ * name: "peer_vpc", * }); * const peering = Promise.all([vpc, peerVpc]).then(([vpc, peerVpc]) => huaweicloud.Vpc.getPeeringConnection({ * vpcId: vpc.id, * peerVpcId: peerVpc.id, * })); * const vpcRoute = new huaweicloud.vpc.Route("vpcRoute", { * type: "peering", * nexthop: peering.then(peering => peering.id), * destination: "192.168.0.0/16", * vpcId: vpc.then(vpc => vpc.id), * }); * ``` */ export declare function getPeeringConnection(args?: GetPeeringConnectionArgs, opts?: pulumi.InvokeOptions): Promise<GetPeeringConnectionResult>; /** * A collection of arguments for invoking getPeeringConnection. */ export interface GetPeeringConnectionArgs { /** * The ID of the specific VPC Peering Connection to retrieve. */ id?: string; /** * The name of the specific VPC Peering Connection to retrieve. */ name?: string; /** * The Tenant ID of the accepter/peer VPC of the specific VPC Peering Connection to * retrieve. */ peerTenantId?: string; /** * The ID of the accepter/peer VPC of the specific VPC Peering Connection to retrieve. */ peerVpcId?: string; /** * The region in which to obtain the VPC Peering Connection. If omitted, the provider-level * region will be used. */ region?: string; /** * The status of the specific VPC Peering Connection to retrieve. */ status?: string; /** * The ID of the requester VPC of the specific VPC Peering Connection to retrieve. */ vpcId?: string; } /** * A collection of values returned by getPeeringConnection. */ export interface GetPeeringConnectionResult { /** * The description of the VPC Peering Connection. */ readonly description: string; readonly id: string; readonly name: string; readonly peerTenantId: string; readonly peerVpcId: string; readonly region: string; readonly status: string; readonly vpcId: string; } export declare function getPeeringConnectionOutput(args?: GetPeeringConnectionOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetPeeringConnectionResult>; /** * A collection of arguments for invoking getPeeringConnection. */ export interface GetPeeringConnectionOutputArgs { /** * The ID of the specific VPC Peering Connection to retrieve. */ id?: pulumi.Input<string>; /** * The name of the specific VPC Peering Connection to retrieve. */ name?: pulumi.Input<string>; /** * The Tenant ID of the accepter/peer VPC of the specific VPC Peering Connection to * retrieve. */ peerTenantId?: pulumi.Input<string>; /** * The ID of the accepter/peer VPC of the specific VPC Peering Connection to retrieve. */ peerVpcId?: pulumi.Input<string>; /** * The region in which to obtain the VPC Peering Connection. If omitted, the provider-level * region will be used. */ region?: pulumi.Input<string>; /** * The status of the specific VPC Peering Connection to retrieve. */ status?: pulumi.Input<string>; /** * The ID of the requester VPC of the specific VPC Peering Connection to retrieve. */ vpcId?: pulumi.Input<string>; }