Show / Hide Table of Contents

Class RuleTargetConfig

Properties for an event rule target.

Inheritance
object
RuleTargetConfig
Implements
IRuleTargetConfig
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.Events
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RuleTargetConfig : IRuleTargetConfig
Syntax (vb)
Public Class RuleTargetConfig Implements 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

Constructors

RuleTargetConfig()

Properties for an event rule target.

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.

Constructors

RuleTargetConfig()

Properties for an event rule target.

public RuleTargetConfig()
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
            };

Properties

AppSyncParameters

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

public CfnRule.IAppSyncParametersProperty? AppSyncParameters { get; set; }
Property Value

CfnRule.IAppSyncParametersProperty

Remarks

Default: - None

Arn

The Amazon Resource Name (ARN) of the target.

public string Arn { get; set; }
Property Value

string

Remarks

ExampleMetadata: fixture=_generated

BatchParameters

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

public CfnRule.IBatchParametersProperty? BatchParameters { get; set; }
Property Value

CfnRule.IBatchParametersProperty

Remarks

Default: no parameters set

DeadLetterConfig

Contains information about a dead-letter queue configuration.

public CfnRule.IDeadLetterConfigProperty? DeadLetterConfig { get; set; }
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.

public CfnRule.IEcsParametersProperty? EcsParameters { get; set; }
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.

public CfnRule.IHttpParametersProperty? HttpParameters { get; set; }
Property Value

CfnRule.IHttpParametersProperty

Remarks

Default: - None

Input

What input to send to the event target.

public RuleTargetInput? Input { get; set; }
Property Value

RuleTargetInput

Remarks

Default: the entire event

KinesisParameters

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

public CfnRule.IKinesisParametersProperty? KinesisParameters { get; set; }
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.

public CfnRule.IRedshiftDataParametersProperty? RedshiftDataParameters { get; set; }
Property Value

CfnRule.IRedshiftDataParametersProperty

Remarks

Default: - no parameters set

RetryPolicy

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

public CfnRule.IRetryPolicyProperty? RetryPolicy { get; set; }
Property Value

CfnRule.IRetryPolicyProperty

Remarks

Default: EventBridge default retry policy

Role

Role to use to invoke this event target.

public IRole? Role { get; set; }
Property Value

IRole

Remarks

ExampleMetadata: fixture=_generated

RunCommandParameters

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

public CfnRule.IRunCommandParametersProperty? RunCommandParameters { get; set; }
Property Value

CfnRule.IRunCommandParametersProperty

Remarks

ExampleMetadata: fixture=_generated

SqsParameters

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

public CfnRule.ISqsParametersProperty? SqsParameters { get; set; }
Property Value

CfnRule.ISqsParametersProperty

Remarks

ExampleMetadata: fixture=_generated

TargetResource

The resource that is backing this target.

public IConstruct? TargetResource { get; set; }
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

Implements

IRuleTargetConfig
Back to top Generated by DocFX