@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
106 lines • 4.41 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServerlessCluster = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an Amazon MSK Serverless cluster.
*
* > **Note:** To manage a _provisioned_ Amazon MSK cluster, use the `aws.msk.Cluster` resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.msk.ServerlessCluster("example", {
* clusterName: "Example",
* vpcConfigs: [{
* subnetIds: exampleAwsSubnet.map(__item => __item.id),
* securityGroupIds: [exampleAwsSecurityGroup.id],
* }],
* clientAuthentication: {
* sasl: {
* iam: {
* enabled: true,
* },
* },
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import MSK serverless clusters using the cluster `arn`. For example:
*
* ```sh
* $ pulumi import aws:msk/serverlessCluster:ServerlessCluster example arn:aws:kafka:us-west-2:123456789012:cluster/example/279c0212-d057-4dba-9aa9-1c4e5a25bfc7-3
* ```
*/
class ServerlessCluster extends pulumi.CustomResource {
/**
* Get an existing ServerlessCluster 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 ServerlessCluster(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ServerlessCluster. 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'] === ServerlessCluster.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["bootstrapBrokersSaslIam"] = state?.bootstrapBrokersSaslIam;
resourceInputs["clientAuthentication"] = state?.clientAuthentication;
resourceInputs["clusterName"] = state?.clusterName;
resourceInputs["clusterUuid"] = state?.clusterUuid;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["vpcConfigs"] = state?.vpcConfigs;
}
else {
const args = argsOrState;
if (args?.clientAuthentication === undefined && !opts.urn) {
throw new Error("Missing required property 'clientAuthentication'");
}
if (args?.vpcConfigs === undefined && !opts.urn) {
throw new Error("Missing required property 'vpcConfigs'");
}
resourceInputs["clientAuthentication"] = args?.clientAuthentication;
resourceInputs["clusterName"] = args?.clusterName;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["vpcConfigs"] = args?.vpcConfigs;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["bootstrapBrokersSaslIam"] = undefined /*out*/;
resourceInputs["clusterUuid"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ServerlessCluster.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServerlessCluster = ServerlessCluster;
/** @internal */
ServerlessCluster.__pulumiType = 'aws:msk/serverlessCluster:ServerlessCluster';
//# sourceMappingURL=serverlessCluster.js.map