Show / Hide Table of Contents

Interface IRuleTargetConfig

Properties for an event rule target.

Namespace: Amazon.CDK.AWS.Events
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IRuleTargetConfig
Syntax (vb)
Public Interface IRuleTargetConfig
Remarks

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK.AWS.Events;
            using Amazon.CDK.AWS.IAM;
            using Constructs;

            Construct construct;
            Role role;
            RuleTargetInput ruleTargetInput;
            var ruleTargetConfig = new RuleTargetConfig {
                Arn = "arn",

                // the properties below are optional
                AppSyncParameters = new AppSyncParametersProperty {
                    GraphQlOperation = "graphQlOperation"
                },
                BatchParameters = new BatchParametersProperty {
                    JobDefinition = "jobDefinition",
                    JobName = "jobName",

                    // the properties below are optional
                    ArrayProperties = new BatchArrayPropertiesProperty {
                        Size = 123
                    },
                    RetryStrategy = new BatchRetryStrategyProperty {
                        Attempts = 123
                    }
                },
                DeadLetterConfig = new DeadLetterConfigProperty {
                    Arn = "arn"
                },
                EcsParameters = new EcsParametersProperty {
                    TaskDefinitionArn = "taskDefinitionArn",

                    // the properties below are optional
                    CapacityProviderStrategy = new [] { new CapacityProviderStrategyItemProperty {
                        CapacityProvider = "capacityProvider",

                        // the properties below are optional
                        Base = 123,
                        Weight = 123
                    } },
                    EnableEcsManagedTags = false,
                    EnableExecuteCommand = false,
                    Group = "group",
                    LaunchType = "launchType",
                    NetworkConfiguration = new NetworkConfigurationProperty {
                        AwsVpcConfiguration = new AwsVpcConfigurationProperty {
                            Subnets = new [] { "subnets" },

                            // the properties below are optional
                            AssignPublicIp = "assignPublicIp",
                            SecurityGroups = new [] { "securityGroups" }
                        }
                    },
                    PlacementConstraints = new [] { new PlacementConstraintProperty {
                        Expression = "expression",
                        Type = "type"
                    } },
                    PlacementStrategies = new [] { new PlacementStrategyProperty {
                        Field = "field",
                        Type = "type"
                    } },
                    PlatformVersion = "platformVersion",
                    PropagateTags = "propagateTags",
                    ReferenceId = "referenceId",
                    TagList = new [] { new CfnTag {
                        Key = "key",
                        Value = "value"
                    } },
                    TaskCount = 123
                },
                HttpParameters = new HttpParametersProperty {
                    HeaderParameters = new Dictionary<string, string> {
                        { "headerParametersKey", "headerParameters" }
                    },
                    PathParameterValues = new [] { "pathParameterValues" },
                    QueryStringParameters = new Dictionary<string, string> {
                        { "queryStringParametersKey", "queryStringParameters" }
                    }
                },
                Input = ruleTargetInput,
                KinesisParameters = new KinesisParametersProperty {
                    PartitionKeyPath = "partitionKeyPath"
                },
                RedshiftDataParameters = new RedshiftDataParametersProperty {
                    Database = "database",

                    // the properties below are optional
                    DbUser = "dbUser",
                    SecretManagerArn = "secretManagerArn",
                    Sql = "sql",
                    Sqls = new [] { "sqls" },
                    StatementName = "statementName",
                    WithEvent = false
                },
                RetryPolicy = new RetryPolicyProperty {
                    MaximumEventAgeInSeconds = 123,
                    MaximumRetryAttempts = 123
                },
                Role = role,
                RunCommandParameters = new RunCommandParametersProperty {
                    RunCommandTargets = new [] { new RunCommandTargetProperty {
                        Key = "key",
                        Values = new [] { "values" }
                    } }
                },
                SqsParameters = new SqsParametersProperty {
                    MessageGroupId = "messageGroupId"
                },
                TargetResource = construct
            };

Synopsis

Properties

AppSyncParameters

Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API.

Arn

The Amazon Resource Name (ARN) of the target.

BatchParameters

Parameters used when the rule invokes Amazon AWS Batch Job/Queue.

DeadLetterConfig

Contains information about a dead-letter queue configuration.

EcsParameters

The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task.

HttpParameters

Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination.

Input

What input to send to the event target.

KinesisParameters

Settings that control shard assignment, when the target is a Kinesis stream.

RedshiftDataParameters

Parameters used when the rule invokes Amazon Redshift Queries.

RetryPolicy

A RetryPolicy object that includes information about the retry policy settings.

Role

Role to use to invoke this event target.

RunCommandParameters

Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command.

SqsParameters

Parameters used when the FIFO sqs queue is used an event target by the rule.

TargetResource

The resource that is backing this target.

Properties

AppSyncParameters

Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API.

CfnRule.IAppSyncParametersProperty? AppSyncParameters { get; }
Property Value

CfnRule.IAppSyncParametersProperty

Remarks

Default: - None

Arn

The Amazon Resource Name (ARN) of the target.

string Arn { get; }
Property Value

string

Remarks

ExampleMetadata: fixture=_generated

BatchParameters

Parameters used when the rule invokes Amazon AWS Batch Job/Queue.

CfnRule.IBatchParametersProperty? BatchParameters { get; }
Property Value

CfnRule.IBatchParametersProperty

Remarks

Default: no parameters set

DeadLetterConfig

Contains information about a dead-letter queue configuration.

CfnRule.IDeadLetterConfigProperty? DeadLetterConfig { get; }
Property Value

CfnRule.IDeadLetterConfigProperty

Remarks

Default: no dead-letter queue set

EcsParameters

The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task.

CfnRule.IEcsParametersProperty? EcsParameters { get; }
Property Value

CfnRule.IEcsParametersProperty

Remarks

ExampleMetadata: fixture=_generated

HttpParameters

Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination.

CfnRule.IHttpParametersProperty? HttpParameters { get; }
Property Value

CfnRule.IHttpParametersProperty

Remarks

Default: - None

Input

What input to send to the event target.

RuleTargetInput? Input { get; }
Property Value

RuleTargetInput

Remarks

Default: the entire event

KinesisParameters

Settings that control shard assignment, when the target is a Kinesis stream.

CfnRule.IKinesisParametersProperty? KinesisParameters { get; }
Property Value

CfnRule.IKinesisParametersProperty

Remarks

If you don't include this parameter, eventId is used as the partition key.

RedshiftDataParameters

Parameters used when the rule invokes Amazon Redshift Queries.

CfnRule.IRedshiftDataParametersProperty? RedshiftDataParameters { get; }
Property Value

CfnRule.IRedshiftDataParametersProperty

Remarks

Default: - no parameters set

RetryPolicy

A RetryPolicy object that includes information about the retry policy settings.

CfnRule.IRetryPolicyProperty? RetryPolicy { get; }
Property Value

CfnRule.IRetryPolicyProperty

Remarks

Default: EventBridge default retry policy

Role

Role to use to invoke this event target.

IRole? Role { get; }
Property Value

IRole

Remarks

ExampleMetadata: fixture=_generated

RunCommandParameters

Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command.

CfnRule.IRunCommandParametersProperty? RunCommandParameters { get; }
Property Value

CfnRule.IRunCommandParametersProperty

Remarks

ExampleMetadata: fixture=_generated

SqsParameters

Parameters used when the FIFO sqs queue is used an event target by the rule.

CfnRule.ISqsParametersProperty? SqsParameters { get; }
Property Value

CfnRule.ISqsParametersProperty

Remarks

ExampleMetadata: fixture=_generated

TargetResource

The resource that is backing this target.

IConstruct? TargetResource { get; }
Property Value

IConstruct

Remarks

This is the resource that will actually have some action performed on it when used as a target (for example, start a build for a CodeBuild project). We need it to determine whether the rule belongs to a different account than the target - if so, we generate a more complex setup, including an additional stack containing the EventBusPolicy.

Default: the target is not backed by any resource

See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html

Back to top Generated by DocFX