import * as core from "@terrascript/core"; export interface DeadLetterConfigArgs extends core.SchemaArgs { arn?: string | core.StringOut; } export class DeadLetterConfig extends core.Schema { @core.attr(String) public arn?: string | core.StringOut; } export interface HttpTargetArgs extends core.SchemaArgs { headerParameters?: core.Map | core.MapOut; pathParameterValues?: core.Array | core.ArrayOut; queryStringParameters?: | core.Map | core.MapOut; } export class HttpTarget extends core.Schema { @core.attr(String, { kind: "map" }) public headerParameters?: | core.Map | core.MapOut; @core.attr(String, { kind: "array" }) public pathParameterValues?: | core.Array | core.ArrayOut; @core.attr(String, { kind: "map" }) public queryStringParameters?: | core.Map | core.MapOut; } export interface NetworkConfigurationArgs extends core.SchemaArgs { assignPublicIp?: boolean | core.BooleanOut; securityGroups?: core.Array | core.ArrayOut; subnets: core.Array | core.ArrayOut; } export class NetworkConfiguration extends core.Schema { @core.attr(Boolean) public assignPublicIp?: boolean | core.BooleanOut; @core.attr(String, { kind: "array" }) public securityGroups?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public subnets!: core.Array | core.ArrayOut; } export interface PlacementConstraintArgs extends core.SchemaArgs { expression?: string | core.StringOut; type: string | core.StringOut; } export class PlacementConstraint extends core.Schema { @core.attr(String) public expression?: string | core.StringOut; @core.attr(String) public type!: string | core.StringOut; } export interface EcsTargetArgs extends core.SchemaArgs { enableEcsManagedTags?: boolean | core.BooleanOut; enableExecuteCommand?: boolean | core.BooleanOut; group?: string | core.StringOut; launchType?: string | core.StringOut; networkConfiguration?: NetworkConfiguration; placementConstraint?: | core.Array | core.ArrayOut; platformVersion?: string | core.StringOut; propagateTags?: string | core.StringOut; tags?: core.Map | core.MapOut; taskCount?: number | core.NumberOut; taskDefinitionArn: string | core.StringOut; } export class EcsTarget extends core.Schema { @core.attr(Boolean) public enableEcsManagedTags?: boolean | core.BooleanOut; @core.attr(Boolean) public enableExecuteCommand?: boolean | core.BooleanOut; @core.attr(String) public group?: string | core.StringOut; @core.attr(String) public launchType?: string | core.StringOut; @core.attr(NetworkConfiguration) public networkConfiguration?: NetworkConfiguration; @core.attr(PlacementConstraint, { kind: "array" }) public placementConstraint?: | core.Array | core.ArrayOut; @core.attr(String) public platformVersion?: string | core.StringOut; @core.attr(String) public propagateTags?: string | core.StringOut; @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; @core.attr(Number) public taskCount?: number | core.NumberOut; @core.attr(String) public taskDefinitionArn!: string | core.StringOut; } export interface RedshiftTargetArgs extends core.SchemaArgs { database: string | core.StringOut; dbUser?: string | core.StringOut; secretsManagerArn?: string | core.StringOut; sql?: string | core.StringOut; statementName?: string | core.StringOut; withEvent?: boolean | core.BooleanOut; } export class RedshiftTarget extends core.Schema { @core.attr(String) public database!: string | core.StringOut; @core.attr(String) public dbUser?: string | core.StringOut; @core.attr(String) public secretsManagerArn?: string | core.StringOut; @core.attr(String) public sql?: string | core.StringOut; @core.attr(String) public statementName?: string | core.StringOut; @core.attr(Boolean) public withEvent?: boolean | core.BooleanOut; } export interface RetryPolicyArgs extends core.SchemaArgs { maximumEventAgeInSeconds?: number | core.NumberOut; maximumRetryAttempts?: number | core.NumberOut; } export class RetryPolicy extends core.Schema { @core.attr(Number) public maximumEventAgeInSeconds?: number | core.NumberOut; @core.attr(Number) public maximumRetryAttempts?: number | core.NumberOut; } export interface RunCommandTargetsArgs extends core.SchemaArgs { key: string | core.StringOut; values: core.Array | core.ArrayOut; } export class RunCommandTargets extends core.Schema { @core.attr(String) public key!: string | core.StringOut; @core.attr(String, { kind: "array" }) public values!: core.Array | core.ArrayOut; } export interface BatchTargetArgs extends core.SchemaArgs { arraySize?: number | core.NumberOut; jobAttempts?: number | core.NumberOut; jobDefinition: string | core.StringOut; jobName: string | core.StringOut; } export class BatchTarget extends core.Schema { @core.attr(Number) public arraySize?: number | core.NumberOut; @core.attr(Number) public jobAttempts?: number | core.NumberOut; @core.attr(String) public jobDefinition!: string | core.StringOut; @core.attr(String) public jobName!: string | core.StringOut; } export interface InputTransformerArgs extends core.SchemaArgs { inputPaths?: core.Map | core.MapOut; inputTemplate: string | core.StringOut; } export class InputTransformer extends core.Schema { @core.attr(String, { kind: "map" }) public inputPaths?: core.Map | core.MapOut; @core.attr(String) public inputTemplate!: string | core.StringOut; } export interface SqsTargetArgs extends core.SchemaArgs { messageGroupId?: string | core.StringOut; } export class SqsTarget extends core.Schema { @core.attr(String) public messageGroupId?: string | core.StringOut; } export interface KinesisTargetArgs extends core.SchemaArgs { partitionKeyPath?: string | core.StringOut; } export class KinesisTarget extends core.Schema { @core.attr(String) public partitionKeyPath?: string | core.StringOut; } export interface CloudwatchEventTargetArgs extends core.ResourceArgs { /** * (Required) The Amazon Resource Name (ARN) of the target. */ arn: string | core.StringOut; /** * (Optional) Parameters used when you are using the rule to invoke an Amazon Batch Job. Documented bel * ow. A maximum of 1 are allowed. */ batchTarget?: BatchTarget; /** * (Optional) Parameters used when you are providing a dead letter config. Documented below. A maximum * of 1 are allowed. */ deadLetterConfig?: DeadLetterConfig; /** * (Optional) Parameters used when you are using the rule to invoke Amazon ECS Task. Documented below. * A maximum of 1 are allowed. */ ecsTarget?: EcsTarget; /** * (Optional) The event bus to associate with the rule. If you omit this, the `default` event bus is us * ed. */ eventBusName?: string | core.StringOut; /** * (Optional) Parameters used when you are using the rule to invoke an API Gateway REST endpoint. Docum * ented below. A maximum of 1 is allowed. */ httpTarget?: HttpTarget; /** * (Optional) Valid JSON text passed to the target. Conflicts with `input_path` and `input_transformer` * . */ input?: string | core.StringOut; /** * (Optional) The value of the [JSONPath](http://goessner.net/articles/JsonPath/) that is used for extr * acting part of the matched event when passing it to the target. Conflicts with `input` and `input_tr * ansformer`. */ inputPath?: string | core.StringOut; /** * (Optional) Parameters used when you are providing a custom input to a target based on certain event * data. Conflicts with `input` and `input_path`. */ inputTransformer?: InputTransformer; /** * (Optional) Parameters used when you are using the rule to invoke an Amazon Kinesis Stream. Documente * d below. A maximum of 1 are allowed. */ kinesisTarget?: KinesisTarget; /** * (Optional) Parameters used when you are using the rule to invoke an Amazon Redshift Statement. Docum * ented below. A maximum of 1 are allowed. */ redshiftTarget?: RedshiftTarget; /** * (Optional) Parameters used when you are providing retry policies. Documented below. A maximum of 1 * are allowed. */ retryPolicy?: RetryPolicy; /** * (Optional) The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule i * s triggered. Required if `ecs_target` is used or target in `arn` is EC2 instance, Kinesis data strea * m, Step Functions state machine, or Event Bus in different account or region. */ roleArn?: string | core.StringOut; /** * (Required) The name of the rule you want to add targets to. */ rule: string | core.StringOut; /** * (Optional) Parameters used when you are using the rule to invoke Amazon EC2 Run Command. Documented * below. A maximum of 5 are allowed. */ runCommandTargets?: | core.Array | core.ArrayOut; /** * (Optional) Parameters used when you are using the rule to invoke an Amazon SQS Queue. Documented bel * ow. A maximum of 1 are allowed. */ sqsTarget?: SqsTarget; /** * (Optional) The unique target assignment ID. If missing, will generate a random, unique id. */ targetId?: string | core.StringOut; } export class CloudwatchEventTarget extends core.Resource { /** * (Required) The Amazon Resource Name (ARN) of the target. */ @core.attr(String) public arn!: string | core.StringOut; /** * (Optional) Parameters used when you are using the rule to invoke an Amazon Batch Job. Documented bel * ow. A maximum of 1 are allowed. */ @core.attr(BatchTarget) public batchTarget?: BatchTarget; /** * (Optional) Parameters used when you are providing a dead letter config. Documented below. A maximum * of 1 are allowed. */ @core.attr(DeadLetterConfig) public deadLetterConfig?: DeadLetterConfig; /** * (Optional) Parameters used when you are using the rule to invoke Amazon ECS Task. Documented below. * A maximum of 1 are allowed. */ @core.attr(EcsTarget) public ecsTarget?: EcsTarget; /** * (Optional) The event bus to associate with the rule. If you omit this, the `default` event bus is us * ed. */ @core.attr(String) public eventBusName?: string | core.StringOut; /** * (Optional) Parameters used when you are using the rule to invoke an API Gateway REST endpoint. Docum * ented below. A maximum of 1 is allowed. */ @core.attr(HttpTarget) public httpTarget?: HttpTarget; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) Valid JSON text passed to the target. Conflicts with `input_path` and `input_transformer` * . */ @core.attr(String) public input?: string | core.StringOut; /** * (Optional) The value of the [JSONPath](http://goessner.net/articles/JsonPath/) that is used for extr * acting part of the matched event when passing it to the target. Conflicts with `input` and `input_tr * ansformer`. */ @core.attr(String) public inputPath?: string | core.StringOut; /** * (Optional) Parameters used when you are providing a custom input to a target based on certain event * data. Conflicts with `input` and `input_path`. */ @core.attr(InputTransformer) public inputTransformer?: InputTransformer; /** * (Optional) Parameters used when you are using the rule to invoke an Amazon Kinesis Stream. Documente * d below. A maximum of 1 are allowed. */ @core.attr(KinesisTarget) public kinesisTarget?: KinesisTarget; /** * (Optional) Parameters used when you are using the rule to invoke an Amazon Redshift Statement. Docum * ented below. A maximum of 1 are allowed. */ @core.attr(RedshiftTarget) public redshiftTarget?: RedshiftTarget; /** * (Optional) Parameters used when you are providing retry policies. Documented below. A maximum of 1 * are allowed. */ @core.attr(RetryPolicy) public retryPolicy?: RetryPolicy; /** * (Optional) The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule i * s triggered. Required if `ecs_target` is used or target in `arn` is EC2 instance, Kinesis data strea * m, Step Functions state machine, or Event Bus in different account or region. */ @core.attr(String) public roleArn?: string | core.StringOut; /** * (Required) The name of the rule you want to add targets to. */ @core.attr(String) public rule!: string | core.StringOut; /** * (Optional) Parameters used when you are using the rule to invoke Amazon EC2 Run Command. Documented * below. A maximum of 5 are allowed. */ @core.attr(RunCommandTargets, { kind: "array" }) public runCommandTargets?: | core.Array | core.ArrayOut; /** * (Optional) Parameters used when you are using the rule to invoke an Amazon SQS Queue. Documented bel * ow. A maximum of 1 are allowed. */ @core.attr(SqsTarget) public sqsTarget?: SqsTarget; /** * (Optional) The unique target assignment ID. If missing, will generate a random, unique id. */ @core.attr(String, { computed: true }) public targetId?: string | core.StringOut; constructor(name: string, args?: CloudwatchEventTargetArgs) { super(name, "aws_cloudwatch_event_target", args); } public override getNamespace(): string { return "aws_eventbridge"; } }