CustomPlugin class
Provides an Amazon MSK Connect Custom Plugin Resource.
Example Usage
Basic configuration
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", {
location: {
s3: {
bucketArn: example.arn,
fileKey: exampleBucketObjectv2.key,
},
},
name: "debezium-example",
contentType: "ZIP",
});
import pulumi
import pulumi_aws as aws
example = aws.s3.Bucket("example", bucket="example")
example_bucket_objectv2 = aws.s3.BucketObjectv2("example",
bucket=example.id,
key="debezium.zip",
source=pulumi.FileAsset("debezium.zip"))
example_custom_plugin = aws.mskconnect.CustomPlugin("example",
location={
"s3": {
"bucket_arn": example.arn,
"file_key": example_bucket_objectv2.key,
},
},
name="debezium-example",
content_type="ZIP")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.S3.Bucket("example", new()
{
BucketName = "example",
});
var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2("example", new()
{
Bucket = example.Id,
Key = "debezium.zip",
Source = new FileAsset("debezium.zip"),
});
var exampleCustomPlugin = new Aws.MskConnect.CustomPlugin("example", new()
{
Location = new Aws.MskConnect.Inputs.CustomPluginLocationArgs
{
S3 = new Aws.MskConnect.Inputs.CustomPluginLocationS3Args
{
BucketArn = example.Arn,
FileKey = exampleBucketObjectv2.Key,
},
},
Name = "debezium-example",
ContentType = "ZIP",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/mskconnect"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := s3.NewBucket(ctx, "example", &s3.BucketArgs{
Bucket: pulumi.String("example"),
})
if err != nil {
return err
}
exampleBucketObjectv2, err := s3.NewBucketObjectv2(ctx, "example", &s3.BucketObjectv2Args{
Bucket: example.ID().ToIDOutput().ToStringOutput(),
Key: pulumi.String("debezium.zip"),
Source: pulumi.NewFileAsset("debezium.zip"),
})
if err != nil {
return err
}
_, err = mskconnect.NewCustomPlugin(ctx, "example", &mskconnect.CustomPluginArgs{
Location: &mskconnect.CustomPluginLocationArgs{
S3: &mskconnect.CustomPluginLocationS3Args{
BucketArn: example.Arn,
FileKey: exampleBucketObjectv2.Key,
},
},
Name: pulumi.String("debezium-example"),
ContentType: pulumi.String("ZIP"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_s3_bucket" "example" {
bucket = "example"
}
resource "aws_s3_bucketobjectv2" "example" {
bucket = aws_s3_bucket.example.id
key = "debezium.zip"
source = fileAsset("debezium.zip")
}
resource "aws_mskconnect_customplugin" "example" {
location = {
s3 = {
bucket_arn = aws_s3_bucket.example.arn
file_key = aws_s3_bucketobjectv2.example.key
}
}
name = "debezium-example"
content_type = "ZIP"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.Bucket;
import com.pulumi.aws.s3.BucketArgs;
import com.pulumi.aws.s3.BucketObjectv2;
import com.pulumi.aws.s3.BucketObjectv2Args;
import com.pulumi.aws.mskconnect.CustomPlugin;
import com.pulumi.aws.mskconnect.CustomPluginArgs;
import com.pulumi.aws.mskconnect.inputs.CustomPluginLocationArgs;
import com.pulumi.aws.mskconnect.inputs.CustomPluginLocationS3Args;
import com.pulumi.asset.FileAsset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Bucket("example", BucketArgs.builder()
.bucket("example")
.build());
var exampleBucketObjectv2 = new BucketObjectv2("exampleBucketObjectv2", BucketObjectv2Args.builder()
.bucket(example.id())
.key("debezium.zip")
.source(new FileAsset("debezium.zip"))
.build());
var exampleCustomPlugin = new CustomPlugin("exampleCustomPlugin", CustomPluginArgs.builder()
.location(CustomPluginLocationArgs.builder()
.s3(CustomPluginLocationS3Args.builder()
.bucketArn(example.arn())
.fileKey(exampleBucketObjectv2.key())
.build())
.build())
.name("debezium-example")
.contentType("ZIP")
.build());
}
}
resources:
example:
type: aws:s3:Bucket
properties:
bucket: example
exampleBucketObjectv2:
type: aws:s3:BucketObjectv2
name: example
properties:
bucket: ${example.id}
key: debezium.zip
source:
fn::fileAsset: debezium.zip
exampleCustomPlugin:
type: aws:mskconnect:CustomPlugin
name: example
properties:
location:
s3:
bucketArn: ${example.arn}
fileKey: ${exampleBucketObjectv2.key}
name: debezium-example
contentType: ZIP
Import
Using pulumi import, import MSK Connect Custom Plugin using the plugin's arn. For example:
$ pulumi import aws:mskconnect/customPlugin:CustomPlugin example 'arn:aws:kafkaconnect:eu-central-1:123456789012:custom-plugin/debezium-example/abcdefgh-1234-5678-9abc-defghijklmno-4'
Constructors
- CustomPlugin(String name, {CustomPluginArgs? args, CustomResourceOptions? options})
-
Creates a new CustomPlugin.
nameThe Pulumi resource name.argsArguments used to configure this CustomPlugin. The set of arguments for CustomPlugin.optionsResource options controlling this resource's behavior. - CustomPlugin.reference(String urn)
- Creates a typed reference to an existing CustomPlugin resource.
Properties
-
arn
↔ Output<
String> -
the ARN of the custom plugin.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
contentType
↔ Output<
String> -
The type of the plugin file. Allowed values are
ZIPandJAR.latefinal -
description
↔ Output<
String?> -
A summary description of the custom plugin.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
latestRevision
↔ Output<
int> -
an ID of the latest successfully created revision of the custom plugin.
latefinal
-
location
↔ Output<
CustomPluginLocation> -
Information about the location of a custom plugin. See
locationBlock for details.latefinal -
name
↔ Output<
String> -
The name of the custom plugin..
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
↔ Output<
String> -
the state of the custom plugin.
latefinal
-
A map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {CustomPluginState? state, CustomResourceOptions? options}) → CustomPlugin -
Gets an existing CustomPlugin resource's state with the given
nameandid.