UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

132 lines (131 loc) 5.06 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages Server Group 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 instanceDemo = huaweicloud.Ecs.getInstance({ * name: "ecs-servergroup-demo", * }); * const test_sg = new huaweicloud.ecs.Servergroup("test-sg", { * policies: ["anti-affinity"], * members: [instanceDemo.then(instanceDemo => instanceDemo.id)], * }); * ``` * * ## Import * * Server Groups can be imported using the `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:Ecs/servergroup:Servergroup test-sg 1bc30ee9-9d5b-4c30-bdd5-7f1e663f5edf * ``` */ export declare class Servergroup extends pulumi.CustomResource { /** * Get an existing Servergroup 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?: ServergroupState, opts?: pulumi.CustomResourceOptions): Servergroup; /** * Returns true if the given object is an instance of Servergroup. 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 Servergroup; /** * schema: Internal */ readonly faultDomains: pulumi.Output<string[]>; /** * Specifies an array of one or more instance ID to attach server group. */ readonly members: pulumi.Output<string[]>; /** * Specifies a unique name for the server group. This parameter can contain a * maximum of 255 characters, which may consist of letters, digits, underscores (_), and hyphens (-). Changing this * creates a new server group. */ readonly name: pulumi.Output<string>; /** * Specifies the set of policies for the server group. Only *anti-affinity* * policies are supported. */ readonly policies: pulumi.Output<string[] | undefined>; /** * Specifies the region in which to create the server group resource. If omitted, * the provider-level region will be used. Changing this creates a new server group. */ readonly region: pulumi.Output<string>; /** * Create a Servergroup 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?: ServergroupArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Servergroup resources. */ export interface ServergroupState { /** * schema: Internal */ faultDomains?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies an array of one or more instance ID to attach server group. */ members?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies a unique name for the server group. This parameter can contain a * maximum of 255 characters, which may consist of letters, digits, underscores (_), and hyphens (-). Changing this * creates a new server group. */ name?: pulumi.Input<string>; /** * Specifies the set of policies for the server group. Only *anti-affinity* * policies are supported. */ policies?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies the region in which to create the server group resource. If omitted, * the provider-level region will be used. Changing this creates a new server group. */ region?: pulumi.Input<string>; } /** * The set of arguments for constructing a Servergroup resource. */ export interface ServergroupArgs { /** * Specifies an array of one or more instance ID to attach server group. */ members?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies a unique name for the server group. This parameter can contain a * maximum of 255 characters, which may consist of letters, digits, underscores (_), and hyphens (-). Changing this * creates a new server group. */ name?: pulumi.Input<string>; /** * Specifies the set of policies for the server group. Only *anti-affinity* * policies are supported. */ policies?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies the region in which to create the server group resource. If omitted, * the provider-level region will be used. Changing this creates a new server group. */ region?: pulumi.Input<string>; }