@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
171 lines (170 loc) • 5.14 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a resource to manage clb rule
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@pulumi/volcengine";
* import * as volcengine from "@volcengine/pulumi";
*
* const fooZones = volcengine.ecs.getZones({});
* const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
* vpcName: "acc-test-vpc",
* cidrBlock: "172.16.0.0/16",
* });
* const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
* subnetName: "acc-test-subnet",
* cidrBlock: "172.16.0.0/24",
* zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
* vpcId: fooVpc.id,
* });
* const fooClb = new volcengine.clb.Clb("fooClb", {
* type: "public",
* subnetId: fooSubnet.id,
* loadBalancerSpec: "small_1",
* description: "acc0Demo",
* loadBalancerName: "acc-test-create",
* eipBillingConfig: {
* isp: "BGP",
* eipBillingType: "PostPaidByBandwidth",
* bandwidth: 1,
* },
* });
* const fooServerGroup = new volcengine.clb.ServerGroup("fooServerGroup", {
* loadBalancerId: fooClb.id,
* serverGroupName: "acc-test-create",
* description: "hello demo11",
* });
* const fooListener = new volcengine.clb.Listener("fooListener", {
* loadBalancerId: fooClb.id,
* listenerName: "acc-test-listener",
* protocol: "HTTP",
* port: 90,
* serverGroupId: fooServerGroup.id,
* healthCheck: {
* enabled: "on",
* interval: 10,
* timeout: 3,
* healthyThreshold: 5,
* unHealthyThreshold: 2,
* domain: "volcengine.com",
* httpCode: "http_2xx",
* method: "GET",
* uri: "/",
* },
* enabled: "on",
* });
* const fooRule = new volcengine.clb.Rule("fooRule", {
* listenerId: fooListener.id,
* serverGroupId: fooServerGroup.id,
* domain: "test-volc123.com",
* url: "/tftest",
* });
* ```
*
* ## Import
*
* Rule can be imported using the id, e.g.
* Notice: resourceId is ruleId, due to the lack of describeRuleAttributes in openapi, for import resources, please use ruleId:listenerId to import.
* we will fix this problem later.
*
* ```sh
* $ pulumi import volcengine:clb/rule:Rule foo rule-273zb9hzi1gqo7fap8u1k3utb:lsn-273ywvnmiu70g7fap8u2xzg9d
* ```
*/
export declare class Rule extends pulumi.CustomResource {
/**
* Get an existing Rule 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?: RuleState, opts?: pulumi.CustomResourceOptions): Rule;
/**
* Returns true if the given object is an instance of Rule. 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 Rule;
/**
* The description of the Rule.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The domain of Rule.
*/
readonly domain: pulumi.Output<string | undefined>;
/**
* The ID of listener.
*/
readonly listenerId: pulumi.Output<string>;
/**
* Server Group Id.
*/
readonly serverGroupId: pulumi.Output<string>;
/**
* The Url of Rule.
*/
readonly url: pulumi.Output<string | undefined>;
/**
* Create a Rule 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: RuleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Rule resources.
*/
export interface RuleState {
/**
* The description of the Rule.
*/
description?: pulumi.Input<string>;
/**
* The domain of Rule.
*/
domain?: pulumi.Input<string>;
/**
* The ID of listener.
*/
listenerId?: pulumi.Input<string>;
/**
* Server Group Id.
*/
serverGroupId?: pulumi.Input<string>;
/**
* The Url of Rule.
*/
url?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Rule resource.
*/
export interface RuleArgs {
/**
* The description of the Rule.
*/
description?: pulumi.Input<string>;
/**
* The domain of Rule.
*/
domain?: pulumi.Input<string>;
/**
* The ID of listener.
*/
listenerId: pulumi.Input<string>;
/**
* Server Group Id.
*/
serverGroupId: pulumi.Input<string>;
/**
* The Url of Rule.
*/
url?: pulumi.Input<string>;
}