@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
194 lines (193 loc) • 7.04 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a static route under the ER route table within HuaweiCloud.
*
* ## Example Usage
* ### Create a static route and cross the VPC
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const routeTableId = config.requireObject("routeTableId");
* const destinationVpcCidr = config.requireObject("destinationVpcCidr");
* const sourceVpcAttachmentId = config.requireObject("sourceVpcAttachmentId");
* const test = new huaweicloud.er.StaticRoute("test", {
* routeTableId: routeTableId,
* destination: destinationVpcCidr,
* attachmentId: sourceVpcAttachmentId,
* });
* ```
* ### Create a black hole route
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const routeTableId = config.requireObject("routeTableId");
* const destinationVpcCidr = config.requireObject("destinationVpcCidr");
* const test = new huaweicloud.er.StaticRoute("test", {
* routeTableId: routeTableId,
* destination: destinationVpcCidr,
* isBlackhole: true,
* });
* ```
*
* ## Import
*
* Static routes can be imported using the related `route_table_id` and their `id`, separated by a slash (/), e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Er/staticRoute:StaticRoute test <route_table_id>/<id>
* ```
*/
export declare class StaticRoute extends pulumi.CustomResource {
/**
* Get an existing StaticRoute 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?: StaticRouteState, opts?: pulumi.CustomResourceOptions): StaticRoute;
/**
* Returns true if the given object is an instance of StaticRoute. 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 StaticRoute;
/**
* Specifies the ID of the corresponding attachment.
*/
readonly attachmentId: pulumi.Output<string | undefined>;
/**
* The creation time of the static route.
*/
readonly createdAt: pulumi.Output<string>;
/**
* Specifies the destination of the static route.
* Changing this parameter will create a new resource.
*/
readonly destination: pulumi.Output<string>;
/**
* Specifies whether route is the black hole route, defaults to `false`.
* + If the value is empty or `false`, the parameter `attachmentId` is required.
* + If the value is `true`, the parameter `attachmentId` must be empty.
*/
readonly isBlackhole: pulumi.Output<boolean | undefined>;
/**
* Specifies the region where the static route and related route table are
* located.
* If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the ID of the route table to which the static route
* belongs.
* Changing this parameter will create a new resource.
*/
readonly routeTableId: pulumi.Output<string>;
/**
* The current status of the static route.
*/
readonly status: pulumi.Output<string>;
/**
* The type of the static route.
*/
readonly type: pulumi.Output<string>;
/**
* The latest update time of the static route.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* Create a StaticRoute 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: StaticRouteArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering StaticRoute resources.
*/
export interface StaticRouteState {
/**
* Specifies the ID of the corresponding attachment.
*/
attachmentId?: pulumi.Input<string>;
/**
* The creation time of the static route.
*/
createdAt?: pulumi.Input<string>;
/**
* Specifies the destination of the static route.
* Changing this parameter will create a new resource.
*/
destination?: pulumi.Input<string>;
/**
* Specifies whether route is the black hole route, defaults to `false`.
* + If the value is empty or `false`, the parameter `attachmentId` is required.
* + If the value is `true`, the parameter `attachmentId` must be empty.
*/
isBlackhole?: pulumi.Input<boolean>;
/**
* Specifies the region where the static route and related route table are
* located.
* If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the ID of the route table to which the static route
* belongs.
* Changing this parameter will create a new resource.
*/
routeTableId?: pulumi.Input<string>;
/**
* The current status of the static route.
*/
status?: pulumi.Input<string>;
/**
* The type of the static route.
*/
type?: pulumi.Input<string>;
/**
* The latest update time of the static route.
*/
updatedAt?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a StaticRoute resource.
*/
export interface StaticRouteArgs {
/**
* Specifies the ID of the corresponding attachment.
*/
attachmentId?: pulumi.Input<string>;
/**
* Specifies the destination of the static route.
* Changing this parameter will create a new resource.
*/
destination: pulumi.Input<string>;
/**
* Specifies whether route is the black hole route, defaults to `false`.
* + If the value is empty or `false`, the parameter `attachmentId` is required.
* + If the value is `true`, the parameter `attachmentId` must be empty.
*/
isBlackhole?: pulumi.Input<boolean>;
/**
* Specifies the region where the static route and related route table are
* located.
* If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the ID of the route table to which the static route
* belongs.
* Changing this parameter will create a new resource.
*/
routeTableId: pulumi.Input<string>;
}