UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

97 lines 4.33 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.ConsumerGroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage tls consumer group * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.tls.ConsumerGroup("foo", { * consumerGroupName: "tf-consumer-group-t", * heartbeatTtl: 120, * orderedConsume: false, * projectId: "7a8ac13e-8e3e-4392-ae77-aea8efa49bbf", * topicIdLists: ["33124cc3-15c4-4cdc-9a8a-cc64a9d593dd"], * }); * ``` * * ## Import * * ConsumerGroup can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:tls/consumerGroup:ConsumerGroup default resource_id * ``` */ class ConsumerGroup extends pulumi.CustomResource { /** * Get an existing ConsumerGroup 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 ConsumerGroup(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ConsumerGroup. 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'] === ConsumerGroup.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["consumerGroupName"] = state ? state.consumerGroupName : undefined; resourceInputs["heartbeatTtl"] = state ? state.heartbeatTtl : undefined; resourceInputs["orderedConsume"] = state ? state.orderedConsume : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["topicIdLists"] = state ? state.topicIdLists : undefined; } else { const args = argsOrState; if ((!args || args.consumerGroupName === undefined) && !opts.urn) { throw new Error("Missing required property 'consumerGroupName'"); } if ((!args || args.heartbeatTtl === undefined) && !opts.urn) { throw new Error("Missing required property 'heartbeatTtl'"); } if ((!args || args.orderedConsume === undefined) && !opts.urn) { throw new Error("Missing required property 'orderedConsume'"); } if ((!args || args.projectId === undefined) && !opts.urn) { throw new Error("Missing required property 'projectId'"); } if ((!args || args.topicIdLists === undefined) && !opts.urn) { throw new Error("Missing required property 'topicIdLists'"); } resourceInputs["consumerGroupName"] = args ? args.consumerGroupName : undefined; resourceInputs["heartbeatTtl"] = args ? args.heartbeatTtl : undefined; resourceInputs["orderedConsume"] = args ? args.orderedConsume : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["topicIdLists"] = args ? args.topicIdLists : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ConsumerGroup.__pulumiType, name, resourceInputs, opts); } } exports.ConsumerGroup = ConsumerGroup; /** @internal */ ConsumerGroup.__pulumiType = 'volcengine:tls/consumerGroup:ConsumerGroup'; //# sourceMappingURL=consumerGroup.js.map