import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Resource for managing an AWS EventBridge Pipes Pipe. * * You can find out more about EventBridge Pipes in the [User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html). * * EventBridge Pipes are very configurable, and may require IAM permissions to work correctly. More information on the configuration options and IAM permissions can be found in the [User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html). * * > **Note:** EventBridge was formerly known as CloudWatch Events. The functionality is identical. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const main = aws.getCallerIdentity({}); * const example = new aws.iam.Role("example", {assumeRolePolicy: JSON.stringify({ * Version: "2012-10-17", * Statement: { * Effect: "Allow", * Action: "sts:AssumeRole", * Principal: { * Service: "pipes.amazonaws.com", * }, * Condition: { * StringEquals: { * "aws:SourceAccount": main.then(main => main.accountId), * }, * }, * }, * })}); * const sourceQueue = new aws.sqs.Queue("source", {}); * const source = new aws.iam.RolePolicy("source", { * role: example.id, * policy: pulumi.jsonStringify({ * Version: "2012-10-17", * Statement: [{ * Effect: "Allow", * Action: [ * "sqs:DeleteMessage", * "sqs:GetQueueAttributes", * "sqs:ReceiveMessage", * ], * Resource: [sourceQueue.arn], * }], * }), * }); * const targetQueue = new aws.sqs.Queue("target", {}); * const target = new aws.iam.RolePolicy("target", { * role: example.id, * policy: pulumi.jsonStringify({ * Version: "2012-10-17", * Statement: [{ * Effect: "Allow", * Action: ["sqs:SendMessage"], * Resource: [targetQueue.arn], * }], * }), * }); * const examplePipe = new aws.pipes.Pipe("example", { * name: "example-pipe", * roleArn: example.arn, * source: sourceQueue.arn, * target: targetQueue.arn, * }, { * dependsOn: [ * source, * target, * ], * }); * ``` * * ### Enrichment Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.pipes.Pipe("example", { * enrichmentParameters: { * httpParameters: { * pathParameterValues: "example-path-param", * headerParameters: { * "example-header": "example-value", * "second-example-header": "second-example-value", * }, * queryStringParameters: { * "example-query-string": "example-value", * "second-example-query-string": "second-example-value", * }, * }, * }, * name: "example-pipe", * roleArn: exampleAwsIamRole.arn, * source: source.arn, * target: target.arn, * enrichment: exampleAwsCloudwatchEventApiDestination.arn, * }); * ``` * * ### Filter Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.pipes.Pipe("example", { * sourceParameters: { * filterCriteria: { * filters: [{ * pattern: JSON.stringify({ * source: ["event-source"], * }), * }], * }, * }, * name: "example-pipe", * roleArn: exampleAwsIamRole.arn, * source: source.arn, * target: target.arn, * }); * ``` * * ### CloudWatch Logs Logging Configuration Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudwatch.LogGroup("example", {name: "example-pipe-target"}); * const examplePipe = new aws.pipes.Pipe("example", { * logConfiguration: { * cloudwatchLogsLogDestination: { * logGroupArn: targetAwsCloudwatchLogGroup.arn, * }, * includeExecutionDatas: ["ALL"], * level: "INFO", * }, * name: "example-pipe", * roleArn: exampleAwsIamRole.arn, * source: sourceAwsSqsQueue.arn, * target: targetAwsSqsQueue.arn, * }, { * dependsOn: [ * source, * target, * ], * }); * ``` * * ### SQS Source and Target Configuration Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.pipes.Pipe("example", { * sourceParameters: { * sqsQueueParameters: { * batchSize: 1, * maximumBatchingWindowInSeconds: 2, * }, * }, * targetParameters: { * sqsQueueParameters: { * messageDeduplicationId: "example-dedupe", * messageGroupId: "example-group", * }, * }, * name: "example-pipe", * roleArn: exampleAwsIamRole.arn, * source: source.arn, * target: target.arn, * }); * ``` * * ## Import * * Using `pulumi import`, import pipes using the `name`. For example: * * ```sh * $ pulumi import aws:pipes/pipe:Pipe example my-pipe * ``` */ export declare class Pipe extends pulumi.CustomResource { /** * Get an existing Pipe 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: string, id: pulumi.Input, state?: PipeState, opts?: pulumi.CustomResourceOptions): Pipe; /** * Check whether an existing Pipe resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: PipeState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of Pipe. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Pipe; /** * ARN of this pipe. */ readonly arn: pulumi.Output; /** * Description of the pipe. At most 512 characters. */ readonly description: pulumi.Output; /** * State the pipe should be in. One of: `RUNNING`, `STOPPED`. */ readonly desiredState: pulumi.Output; /** * Enrichment resource of the pipe (typically an ARN). Read more about enrichment in the [User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html#pipes-enrichment). */ readonly enrichment: pulumi.Output; /** * Parameters to configure enrichment for the pipe. See `enrichmentParameters` Block for details. */ readonly enrichmentParameters: pulumi.Output; /** * Identifier of the AWS KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt pipe data. The identifier can be the key ARN, KeyId, key alias, or key alias ARN. If not set, EventBridge uses an AWS owned key to encrypt pipe data. */ readonly kmsKeyIdentifier: pulumi.Output; /** * Logging configuration settings for the pipe. See `logConfiguration` Block for details. */ readonly logConfiguration: pulumi.Output; /** * Name of the pipe. If omitted, the provider will assign a random, unique name. Conflicts with `namePrefix`. */ readonly name: pulumi.Output; /** * Creates a unique name beginning with the specified prefix. Conflicts with `name`. */ readonly namePrefix: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * ARN of the role that allows the pipe to send data to the target. */ readonly roleArn: pulumi.Output; /** * Source resource of the pipe. This field typically requires an ARN. However, when using a self-managed Kafka cluster, you should use a different format. Instead of an ARN, use 'smk://' followed by the bootstrap server's address. */ readonly source: pulumi.Output; /** * Parameters to configure a source for the pipe. See `sourceParameters` Block for details. */ readonly sourceParameters: pulumi.Output; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Target resource of the pipe (typically an ARN). * * The following arguments are optional: */ readonly target: pulumi.Output; /** * Parameters to configure a target for the pipe. See `targetParameters` Block for details. */ readonly targetParameters: pulumi.Output; /** * Create a Pipe resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: PipeArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Pipe resources. */ export interface PipeState { /** * ARN of this pipe. */ arn?: pulumi.Input; /** * Description of the pipe. At most 512 characters. */ description?: pulumi.Input; /** * State the pipe should be in. One of: `RUNNING`, `STOPPED`. */ desiredState?: pulumi.Input; /** * Enrichment resource of the pipe (typically an ARN). Read more about enrichment in the [User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html#pipes-enrichment). */ enrichment?: pulumi.Input; /** * Parameters to configure enrichment for the pipe. See `enrichmentParameters` Block for details. */ enrichmentParameters?: pulumi.Input; /** * Identifier of the AWS KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt pipe data. The identifier can be the key ARN, KeyId, key alias, or key alias ARN. If not set, EventBridge uses an AWS owned key to encrypt pipe data. */ kmsKeyIdentifier?: pulumi.Input; /** * Logging configuration settings for the pipe. See `logConfiguration` Block for details. */ logConfiguration?: pulumi.Input; /** * Name of the pipe. If omitted, the provider will assign a random, unique name. Conflicts with `namePrefix`. */ name?: pulumi.Input; /** * Creates a unique name beginning with the specified prefix. Conflicts with `name`. */ namePrefix?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * ARN of the role that allows the pipe to send data to the target. */ roleArn?: pulumi.Input; /** * Source resource of the pipe. This field typically requires an ARN. However, when using a self-managed Kafka cluster, you should use a different format. Instead of an ARN, use 'smk://' followed by the bootstrap server's address. */ source?: pulumi.Input; /** * Parameters to configure a source for the pipe. See `sourceParameters` Block for details. */ sourceParameters?: pulumi.Input; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Target resource of the pipe (typically an ARN). * * The following arguments are optional: */ target?: pulumi.Input; /** * Parameters to configure a target for the pipe. See `targetParameters` Block for details. */ targetParameters?: pulumi.Input; } /** * The set of arguments for constructing a Pipe resource. */ export interface PipeArgs { /** * Description of the pipe. At most 512 characters. */ description?: pulumi.Input; /** * State the pipe should be in. One of: `RUNNING`, `STOPPED`. */ desiredState?: pulumi.Input; /** * Enrichment resource of the pipe (typically an ARN). Read more about enrichment in the [User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html#pipes-enrichment). */ enrichment?: pulumi.Input; /** * Parameters to configure enrichment for the pipe. See `enrichmentParameters` Block for details. */ enrichmentParameters?: pulumi.Input; /** * Identifier of the AWS KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt pipe data. The identifier can be the key ARN, KeyId, key alias, or key alias ARN. If not set, EventBridge uses an AWS owned key to encrypt pipe data. */ kmsKeyIdentifier?: pulumi.Input; /** * Logging configuration settings for the pipe. See `logConfiguration` Block for details. */ logConfiguration?: pulumi.Input; /** * Name of the pipe. If omitted, the provider will assign a random, unique name. Conflicts with `namePrefix`. */ name?: pulumi.Input; /** * Creates a unique name beginning with the specified prefix. Conflicts with `name`. */ namePrefix?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * ARN of the role that allows the pipe to send data to the target. */ roleArn: pulumi.Input; /** * Source resource of the pipe. This field typically requires an ARN. However, when using a self-managed Kafka cluster, you should use a different format. Instead of an ARN, use 'smk://' followed by the bootstrap server's address. */ source: pulumi.Input; /** * Parameters to configure a source for the pipe. See `sourceParameters` Block for details. */ sourceParameters?: pulumi.Input; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Target resource of the pipe (typically an ARN). * * The following arguments are optional: */ target: pulumi.Input; /** * Parameters to configure a target for the pipe. See `targetParameters` Block for details. */ targetParameters?: pulumi.Input; } //# sourceMappingURL=pipe.d.ts.map