@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
90 lines • 3.79 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.Configuration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an Amazon Managed Streaming for Kafka configuration. More information can be found on the [MSK Developer Guide](https://docs.aws.amazon.com/msk/latest/developerguide/msk-configuration.html).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.msk.Configuration("example", {
* kafkaVersions: ["2.1.0"],
* name: "example",
* serverProperties: `auto.create.topics.enable = true
* delete.topic.enable = true
* `,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import MSK configurations using the configuration ARN. For example:
*
* ```sh
* $ pulumi import aws:msk/configuration:Configuration example arn:aws:kafka:us-west-2:123456789012:configuration/example/279c0212-d057-4dba-9aa9-1c4e5a25bfc7-3
* ```
*/
class Configuration extends pulumi.CustomResource {
/**
* Get an existing Configuration 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 Configuration(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Configuration. 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'] === Configuration.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["description"] = state?.description;
resourceInputs["kafkaVersions"] = state?.kafkaVersions;
resourceInputs["latestRevision"] = state?.latestRevision;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["serverProperties"] = state?.serverProperties;
}
else {
const args = argsOrState;
if (args?.serverProperties === undefined && !opts.urn) {
throw new Error("Missing required property 'serverProperties'");
}
resourceInputs["description"] = args?.description;
resourceInputs["kafkaVersions"] = args?.kafkaVersions;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["serverProperties"] = args?.serverProperties;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["latestRevision"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Configuration.__pulumiType, name, resourceInputs, opts);
}
}
exports.Configuration = Configuration;
/** @internal */
Configuration.__pulumiType = 'aws:msk/configuration:Configuration';
//# sourceMappingURL=configuration.js.map
;