UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

121 lines 5.46 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.HostGroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage tls host group * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.tls.HostGroup("foo", { * autoUpdate: true, * hostGroupName: "tfgroup-test-1", * hostGroupType: "Label", * hostIdentifier: "hostlable", * iamProjectName: "default", * serviceLogging: false, * updateEndTime: "02:00", * updateStartTime: "00:00", * }); * const fooIp = new volcengine.tls.HostGroup("fooIp", { * autoUpdate: true, * hostGroupName: "tfgroup-ip-1", * hostGroupType: "IP", * hostIpLists: [ * "192.168.0.1", * "192.168.0.2", * "192.168.0.3", * ], * iamProjectName: "default", * serviceLogging: false, * updateEndTime: "02:00", * updateStartTime: "00:00", * }); * ``` * * ## Import * * Tls Host Group can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:tls/hostGroup:HostGroup default edf052s21s*******dc15 * ``` */ class HostGroup extends pulumi.CustomResource { /** * Get an existing HostGroup 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, id, state, opts) { return new HostGroup(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of HostGroup. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === HostGroup.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["autoUpdate"] = state ? state.autoUpdate : undefined; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["hostCount"] = state ? state.hostCount : undefined; resourceInputs["hostGroupName"] = state ? state.hostGroupName : undefined; resourceInputs["hostGroupType"] = state ? state.hostGroupType : undefined; resourceInputs["hostIdentifier"] = state ? state.hostIdentifier : undefined; resourceInputs["hostIpLists"] = state ? state.hostIpLists : undefined; resourceInputs["iamProjectName"] = state ? state.iamProjectName : undefined; resourceInputs["modifyTime"] = state ? state.modifyTime : undefined; resourceInputs["ruleCount"] = state ? state.ruleCount : undefined; resourceInputs["serviceLogging"] = state ? state.serviceLogging : undefined; resourceInputs["updateEndTime"] = state ? state.updateEndTime : undefined; resourceInputs["updateStartTime"] = state ? state.updateStartTime : undefined; } else { const args = argsOrState; if ((!args || args.hostGroupName === undefined) && !opts.urn) { throw new Error("Missing required property 'hostGroupName'"); } if ((!args || args.hostGroupType === undefined) && !opts.urn) { throw new Error("Missing required property 'hostGroupType'"); } resourceInputs["autoUpdate"] = args ? args.autoUpdate : undefined; resourceInputs["hostGroupName"] = args ? args.hostGroupName : undefined; resourceInputs["hostGroupType"] = args ? args.hostGroupType : undefined; resourceInputs["hostIdentifier"] = args ? args.hostIdentifier : undefined; resourceInputs["hostIpLists"] = args ? args.hostIpLists : undefined; resourceInputs["iamProjectName"] = args ? args.iamProjectName : undefined; resourceInputs["serviceLogging"] = args ? args.serviceLogging : undefined; resourceInputs["updateEndTime"] = args ? args.updateEndTime : undefined; resourceInputs["updateStartTime"] = args ? args.updateStartTime : undefined; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["hostCount"] = undefined /*out*/; resourceInputs["modifyTime"] = undefined /*out*/; resourceInputs["ruleCount"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(HostGroup.__pulumiType, name, resourceInputs, opts); } } exports.HostGroup = HostGroup; /** @internal */ HostGroup.__pulumiType = 'volcengine:tls/hostGroup:HostGroup'; //# sourceMappingURL=hostGroup.js.map