UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

112 lines (111 loc) 3.95 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a resource to manage private zone record weight enabler * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooRecord = new volcengine.private_zone.Record("fooRecord", { * zid: 2450000, * host: "www", * type: "A", * value: "10.1.1.158", * weight: 8, * ttl: 700, * remark: "tf-test", * enable: true, * }); * const fooRecordSets = volcengine.private_zone.getRecordSetsOutput({ * zid: fooRecord.zid, * host: fooRecord.host, * searchMode: "EXACT", * }); * const fooRecordWeightEnabler = new volcengine.private_zone.RecordWeightEnabler("fooRecordWeightEnabler", { * zid: fooRecord.zid, * recordSetId: pulumi.all([fooRecordSets, fooRecord.type]).apply(([fooRecordSets, type]) => .filter(set => set.type == type).map(set => (set.recordSetId))[0]), * weightEnabled: true, * }); * ``` * * ## Import * * PrivateZoneRecordWeightEnabler can be imported using the zid:record_set_id, e.g. * * ```sh * $ pulumi import volcengine:private_zone/recordWeightEnabler:RecordWeightEnabler default resource_id * ``` */ export declare class RecordWeightEnabler extends pulumi.CustomResource { /** * Get an existing RecordWeightEnabler 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?: RecordWeightEnablerState, opts?: pulumi.CustomResourceOptions): RecordWeightEnabler; /** * Returns true if the given object is an instance of RecordWeightEnabler. 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 RecordWeightEnabler; /** * The id of the private zone record set. */ readonly recordSetId: pulumi.Output<string>; /** * Whether to enable the load balance of the private zone record set. */ readonly weightEnabled: pulumi.Output<boolean>; /** * The zid of the private zone record set. */ readonly zid: pulumi.Output<number>; /** * Create a RecordWeightEnabler 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: RecordWeightEnablerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RecordWeightEnabler resources. */ export interface RecordWeightEnablerState { /** * The id of the private zone record set. */ recordSetId?: pulumi.Input<string>; /** * Whether to enable the load balance of the private zone record set. */ weightEnabled?: pulumi.Input<boolean>; /** * The zid of the private zone record set. */ zid?: pulumi.Input<number>; } /** * The set of arguments for constructing a RecordWeightEnabler resource. */ export interface RecordWeightEnablerArgs { /** * The id of the private zone record set. */ recordSetId: pulumi.Input<string>; /** * Whether to enable the load balance of the private zone record set. */ weightEnabled: pulumi.Input<boolean>; /** * The zid of the private zone record set. */ zid: pulumi.Input<number>; }