@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
75 lines • 3.1 kB
JavaScript
;
// *** 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.KafkaConsumer = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to manage tls kafka consumer
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const foo = new volcengine.tls.KafkaConsumer("foo", {topicId: "cfb5c08b-0c7a-44fa-8971-8afc12f1b123"});
* ```
*
* ## Import
*
* Tls Kafka Consumer can be imported using the kafka:topic_id, e.g.
*
* ```sh
* $ pulumi import volcengine:tls/kafkaConsumer:KafkaConsumer default kafka:edf051ed-3c46-49ba-9339-bea628fedc15
* ```
*/
class KafkaConsumer extends pulumi.CustomResource {
/**
* Get an existing KafkaConsumer 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 KafkaConsumer(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of KafkaConsumer. 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'] === KafkaConsumer.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allowConsume"] = state ? state.allowConsume : undefined;
resourceInputs["consumeTopic"] = state ? state.consumeTopic : undefined;
resourceInputs["topicId"] = state ? state.topicId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.topicId === undefined) && !opts.urn) {
throw new Error("Missing required property 'topicId'");
}
resourceInputs["topicId"] = args ? args.topicId : undefined;
resourceInputs["allowConsume"] = undefined /*out*/;
resourceInputs["consumeTopic"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(KafkaConsumer.__pulumiType, name, resourceInputs, opts);
}
}
exports.KafkaConsumer = KafkaConsumer;
/** @internal */
KafkaConsumer.__pulumiType = 'volcengine:tls/kafkaConsumer:KafkaConsumer';
//# sourceMappingURL=kafkaConsumer.js.map