@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
110 lines • 4.46 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.CustomPlugin = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an Amazon MSK Connect Custom Plugin Resource.
*
* ## Example Usage
*
* ### Basic configuration
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.s3.Bucket("example", {bucket: "example"});
* const exampleBucketObjectv2 = new aws.s3.BucketObjectv2("example", {
* bucket: example.id,
* key: "debezium.zip",
* source: new pulumi.asset.FileAsset("debezium.zip"),
* });
* const exampleCustomPlugin = new aws.mskconnect.CustomPlugin("example", {
* name: "debezium-example",
* contentType: "ZIP",
* location: {
* s3: {
* bucketArn: example.arn,
* fileKey: exampleBucketObjectv2.key,
* },
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import MSK Connect Custom Plugin using the plugin's `arn`. For example:
*
* ```sh
* $ pulumi import aws:mskconnect/customPlugin:CustomPlugin example 'arn:aws:kafkaconnect:eu-central-1:123456789012:custom-plugin/debezium-example/abcdefgh-1234-5678-9abc-defghijklmno-4'
* ```
*/
class CustomPlugin extends pulumi.CustomResource {
/**
* Get an existing CustomPlugin 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 CustomPlugin(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of CustomPlugin. 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'] === CustomPlugin.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["contentType"] = state?.contentType;
resourceInputs["description"] = state?.description;
resourceInputs["latestRevision"] = state?.latestRevision;
resourceInputs["location"] = state?.location;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["state"] = state?.state;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.contentType === undefined && !opts.urn) {
throw new Error("Missing required property 'contentType'");
}
if (args?.location === undefined && !opts.urn) {
throw new Error("Missing required property 'location'");
}
resourceInputs["contentType"] = args?.contentType;
resourceInputs["description"] = args?.description;
resourceInputs["location"] = args?.location;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["latestRevision"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(CustomPlugin.__pulumiType, name, resourceInputs, opts);
}
}
exports.CustomPlugin = CustomPlugin;
/** @internal */
CustomPlugin.__pulumiType = 'aws:mskconnect/customPlugin:CustomPlugin';
//# sourceMappingURL=customPlugin.js.map