@mapped/pulumi-astra
Version:
A Pulumi package for creating and managing astra cloud resources.
96 lines • 4.13 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.StreamingTenant = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* `astra.Cdc` enables cdc for an Astra Serverless table.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as astra from "@pulumi/astra";
*
* const streaming_tenant_1 = new astra.StreamingTenant("streaming_tenant-1", {
* cloudProvider: "gcp",
* region: "useast-4",
* tenantName: "terraformtest",
* topic: "terraformtest",
* userEmail: "seb@datastax.com",
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import astra:index/streamingTenant:StreamingTenant example tenant_name
* ```
*/
class StreamingTenant extends pulumi.CustomResource {
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["cloudProvider"] = state ? state.cloudProvider : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["tenantName"] = state ? state.tenantName : undefined;
resourceInputs["topic"] = state ? state.topic : undefined;
resourceInputs["userEmail"] = state ? state.userEmail : undefined;
}
else {
const args = argsOrState;
if ((!args || args.cloudProvider === undefined) && !opts.urn) {
throw new Error("Missing required property 'cloudProvider'");
}
if ((!args || args.region === undefined) && !opts.urn) {
throw new Error("Missing required property 'region'");
}
if ((!args || args.tenantName === undefined) && !opts.urn) {
throw new Error("Missing required property 'tenantName'");
}
if ((!args || args.topic === undefined) && !opts.urn) {
throw new Error("Missing required property 'topic'");
}
if ((!args || args.userEmail === undefined) && !opts.urn) {
throw new Error("Missing required property 'userEmail'");
}
resourceInputs["cloudProvider"] = args ? args.cloudProvider : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["tenantName"] = args ? args.tenantName : undefined;
resourceInputs["topic"] = args ? args.topic : undefined;
resourceInputs["userEmail"] = args ? args.userEmail : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(StreamingTenant.__pulumiType, name, resourceInputs, opts);
}
/**
* Get an existing StreamingTenant 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 StreamingTenant(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of StreamingTenant. 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'] === StreamingTenant.__pulumiType;
}
}
exports.StreamingTenant = StreamingTenant;
/** @internal */
StreamingTenant.__pulumiType = 'astra:index/streamingTenant:StreamingTenant';
//# sourceMappingURL=streamingTenant.js.map