@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
174 lines • 8.34 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.Connector = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an Amazon MSK Connect Connector resource.
*
* ## Example Usage
*
* ### Basic configuration
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.mskconnect.Connector("example", {
* name: "example",
* kafkaconnectVersion: "2.7.1",
* capacity: {
* autoscaling: {
* mcuCount: 1,
* minWorkerCount: 1,
* maxWorkerCount: 2,
* scaleInPolicy: {
* cpuUtilizationPercentage: 20,
* },
* scaleOutPolicy: {
* cpuUtilizationPercentage: 80,
* },
* },
* },
* connectorConfiguration: {
* "connector.class": "com.github.jcustenborder.kafka.connect.simulator.SimulatorSinkConnector",
* "tasks.max": "1",
* topics: "example",
* },
* kafkaCluster: {
* apacheKafkaCluster: {
* bootstrapServers: exampleAwsMskCluster.bootstrapBrokersTls,
* vpc: {
* securityGroups: [exampleAwsSecurityGroup.id],
* subnets: [
* example1.id,
* example2.id,
* example3.id,
* ],
* },
* },
* },
* kafkaClusterClientAuthentication: {
* authenticationType: "NONE",
* },
* kafkaClusterEncryptionInTransit: {
* encryptionType: "TLS",
* },
* plugins: [{
* customPlugin: {
* arn: exampleAwsMskconnectCustomPlugin.arn,
* revision: exampleAwsMskconnectCustomPlugin.latestRevision,
* },
* }],
* serviceExecutionRoleArn: exampleAwsIamRole.arn,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import MSK Connect Connector using the connector's `arn`. For example:
*
* ```sh
* $ pulumi import aws:mskconnect/connector:Connector example 'arn:aws:kafkaconnect:eu-central-1:123456789012:connector/example/264edee4-17a3-412e-bd76-6681cfc93805-3'
* ```
*/
class Connector extends pulumi.CustomResource {
/**
* Get an existing Connector 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 Connector(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Connector. 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'] === Connector.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["capacity"] = state ? state.capacity : undefined;
resourceInputs["connectorConfiguration"] = state ? state.connectorConfiguration : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["kafkaCluster"] = state ? state.kafkaCluster : undefined;
resourceInputs["kafkaClusterClientAuthentication"] = state ? state.kafkaClusterClientAuthentication : undefined;
resourceInputs["kafkaClusterEncryptionInTransit"] = state ? state.kafkaClusterEncryptionInTransit : undefined;
resourceInputs["kafkaconnectVersion"] = state ? state.kafkaconnectVersion : undefined;
resourceInputs["logDelivery"] = state ? state.logDelivery : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["plugins"] = state ? state.plugins : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["serviceExecutionRoleArn"] = state ? state.serviceExecutionRoleArn : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["version"] = state ? state.version : undefined;
resourceInputs["workerConfiguration"] = state ? state.workerConfiguration : undefined;
}
else {
const args = argsOrState;
if ((!args || args.capacity === undefined) && !opts.urn) {
throw new Error("Missing required property 'capacity'");
}
if ((!args || args.connectorConfiguration === undefined) && !opts.urn) {
throw new Error("Missing required property 'connectorConfiguration'");
}
if ((!args || args.kafkaCluster === undefined) && !opts.urn) {
throw new Error("Missing required property 'kafkaCluster'");
}
if ((!args || args.kafkaClusterClientAuthentication === undefined) && !opts.urn) {
throw new Error("Missing required property 'kafkaClusterClientAuthentication'");
}
if ((!args || args.kafkaClusterEncryptionInTransit === undefined) && !opts.urn) {
throw new Error("Missing required property 'kafkaClusterEncryptionInTransit'");
}
if ((!args || args.kafkaconnectVersion === undefined) && !opts.urn) {
throw new Error("Missing required property 'kafkaconnectVersion'");
}
if ((!args || args.plugins === undefined) && !opts.urn) {
throw new Error("Missing required property 'plugins'");
}
if ((!args || args.serviceExecutionRoleArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'serviceExecutionRoleArn'");
}
resourceInputs["capacity"] = args ? args.capacity : undefined;
resourceInputs["connectorConfiguration"] = args ? args.connectorConfiguration : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["kafkaCluster"] = args ? args.kafkaCluster : undefined;
resourceInputs["kafkaClusterClientAuthentication"] = args ? args.kafkaClusterClientAuthentication : undefined;
resourceInputs["kafkaClusterEncryptionInTransit"] = args ? args.kafkaClusterEncryptionInTransit : undefined;
resourceInputs["kafkaconnectVersion"] = args ? args.kafkaconnectVersion : undefined;
resourceInputs["logDelivery"] = args ? args.logDelivery : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["plugins"] = args ? args.plugins : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["serviceExecutionRoleArn"] = args ? args.serviceExecutionRoleArn : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["workerConfiguration"] = args ? args.workerConfiguration : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
resourceInputs["version"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Connector.__pulumiType, name, resourceInputs, opts);
}
}
exports.Connector = Connector;
/** @internal */
Connector.__pulumiType = 'aws:mskconnect/connector:Connector';
//# sourceMappingURL=connector.js.map