Documentation ¶
Index ¶
- func Archive_IsConstruct(x interface{}) *bool
- func Archive_IsResource(construct constructs.IConstruct) *bool
- func CfnApiDestination_CFN_RESOURCE_TYPE_NAME() *string
- func CfnApiDestination_IsCfnElement(x interface{}) *bool
- func CfnApiDestination_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnApiDestination_IsConstruct(x interface{}) *bool
- func CfnArchive_CFN_RESOURCE_TYPE_NAME() *string
- func CfnArchive_IsCfnElement(x interface{}) *bool
- func CfnArchive_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnArchive_IsConstruct(x interface{}) *bool
- func CfnConnection_CFN_RESOURCE_TYPE_NAME() *string
- func CfnConnection_IsCfnElement(x interface{}) *bool
- func CfnConnection_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnConnection_IsConstruct(x interface{}) *bool
- func CfnEventBusPolicy_CFN_RESOURCE_TYPE_NAME() *string
- func CfnEventBusPolicy_IsCfnElement(x interface{}) *bool
- func CfnEventBusPolicy_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnEventBusPolicy_IsConstruct(x interface{}) *bool
- func CfnEventBus_CFN_RESOURCE_TYPE_NAME() *string
- func CfnEventBus_IsCfnElement(x interface{}) *bool
- func CfnEventBus_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnEventBus_IsConstruct(x interface{}) *bool
- func CfnRule_CFN_RESOURCE_TYPE_NAME() *string
- func CfnRule_IsCfnElement(x interface{}) *bool
- func CfnRule_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnRule_IsConstruct(x interface{}) *bool
- func EventBus_GrantAllPutEvents(grantee awsiam.IGrantable) awsiam.Grant
- func EventBus_IsConstruct(x interface{}) *bool
- func EventBus_IsResource(construct constructs.IConstruct) *bool
- func EventField_Account() *string
- func EventField_DetailType() *string
- func EventField_EventId() *string
- func EventField_FromPath(path *string) *string
- func EventField_Region() *string
- func EventField_Source() *string
- func EventField_Time() *string
- func NewArchive_Override(a Archive, scope constructs.Construct, id *string, props *ArchiveProps)
- func NewCfnApiDestination_Override(c CfnApiDestination, scope constructs.Construct, id *string, ...)
- func NewCfnArchive_Override(c CfnArchive, scope constructs.Construct, id *string, props *CfnArchiveProps)
- func NewCfnConnection_Override(c CfnConnection, scope constructs.Construct, id *string, ...)
- func NewCfnEventBusPolicy_Override(c CfnEventBusPolicy, scope constructs.Construct, id *string, ...)
- func NewCfnEventBus_Override(c CfnEventBus, scope constructs.Construct, id *string, props *CfnEventBusProps)
- func NewCfnRule_Override(c CfnRule, scope constructs.Construct, id *string, props *CfnRuleProps)
- func NewEventBus_Override(e EventBus, scope constructs.Construct, id *string, props *EventBusProps)
- func NewRuleTargetInput_Override(r RuleTargetInput)
- func NewRule_Override(r Rule, scope constructs.Construct, id *string, props *RuleProps)
- func NewSchedule_Override(s Schedule)
- func Rule_IsConstruct(x interface{}) *bool
- func Rule_IsResource(construct constructs.IConstruct) *bool
- type Archive
- type ArchiveProps
- type BaseArchiveProps
- type CfnApiDestination
- type CfnApiDestinationProps
- type CfnArchive
- type CfnArchiveProps
- type CfnConnection
- type CfnConnectionProps
- type CfnEventBus
- type CfnEventBusPolicy
- type CfnEventBusPolicyProps
- type CfnEventBusPolicy_ConditionProperty
- type CfnEventBusProps
- type CfnEventBus_TagEntryProperty
- type CfnRule
- type CfnRuleProps
- type CfnRule_AwsVpcConfigurationProperty
- type CfnRule_BatchArrayPropertiesProperty
- type CfnRule_BatchParametersProperty
- type CfnRule_BatchRetryStrategyProperty
- type CfnRule_CapacityProviderStrategyItemProperty
- type CfnRule_DeadLetterConfigProperty
- type CfnRule_EcsParametersProperty
- type CfnRule_HttpParametersProperty
- type CfnRule_InputTransformerProperty
- type CfnRule_KinesisParametersProperty
- type CfnRule_NetworkConfigurationProperty
- type CfnRule_PlacementConstraintProperty
- type CfnRule_PlacementStrategyProperty
- type CfnRule_RedshiftDataParametersProperty
- type CfnRule_RetryPolicyProperty
- type CfnRule_RunCommandParametersProperty
- type CfnRule_RunCommandTargetProperty
- type CfnRule_SqsParametersProperty
- type CfnRule_TagProperty
- type CfnRule_TargetProperty
- type CronOptions
- type EventBus
- type EventBusAttributes
- type EventBusProps
- type EventField
- type EventPattern
- type IEventBus
- func EventBus_FromEventBusArn(scope constructs.Construct, id *string, eventBusArn *string) IEventBus
- func EventBus_FromEventBusAttributes(scope constructs.Construct, id *string, attrs *EventBusAttributes) IEventBus
- func EventBus_FromEventBusName(scope constructs.Construct, id *string, eventBusName *string) IEventBus
- type IRule
- type IRuleTarget
- type OnEventOptions
- type Rule
- type RuleProps
- type RuleTargetConfig
- type RuleTargetInput
- type RuleTargetInputProperties
- type Schedule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Archive_IsConstruct ¶
func Archive_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func Archive_IsResource ¶
func Archive_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func CfnApiDestination_CFN_RESOURCE_TYPE_NAME ¶
func CfnApiDestination_CFN_RESOURCE_TYPE_NAME() *string
func CfnApiDestination_IsCfnElement ¶
func CfnApiDestination_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnApiDestination_IsCfnResource ¶
func CfnApiDestination_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnApiDestination_IsConstruct ¶
func CfnApiDestination_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func CfnArchive_CFN_RESOURCE_TYPE_NAME ¶
func CfnArchive_CFN_RESOURCE_TYPE_NAME() *string
func CfnArchive_IsCfnElement ¶
func CfnArchive_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnArchive_IsCfnResource ¶
func CfnArchive_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnArchive_IsConstruct ¶
func CfnArchive_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func CfnConnection_CFN_RESOURCE_TYPE_NAME ¶
func CfnConnection_CFN_RESOURCE_TYPE_NAME() *string
func CfnConnection_IsCfnElement ¶
func CfnConnection_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnConnection_IsCfnResource ¶
func CfnConnection_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnConnection_IsConstruct ¶
func CfnConnection_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func CfnEventBusPolicy_CFN_RESOURCE_TYPE_NAME ¶
func CfnEventBusPolicy_CFN_RESOURCE_TYPE_NAME() *string
func CfnEventBusPolicy_IsCfnElement ¶
func CfnEventBusPolicy_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnEventBusPolicy_IsCfnResource ¶
func CfnEventBusPolicy_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnEventBusPolicy_IsConstruct ¶
func CfnEventBusPolicy_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func CfnEventBus_CFN_RESOURCE_TYPE_NAME ¶
func CfnEventBus_CFN_RESOURCE_TYPE_NAME() *string
func CfnEventBus_IsCfnElement ¶
func CfnEventBus_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnEventBus_IsCfnResource ¶
func CfnEventBus_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnEventBus_IsConstruct ¶
func CfnEventBus_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func CfnRule_CFN_RESOURCE_TYPE_NAME ¶
func CfnRule_CFN_RESOURCE_TYPE_NAME() *string
func CfnRule_IsCfnElement ¶
func CfnRule_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnRule_IsCfnResource ¶
func CfnRule_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnRule_IsConstruct ¶
func CfnRule_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func EventBus_GrantAllPutEvents ¶
func EventBus_GrantAllPutEvents(grantee awsiam.IGrantable) awsiam.Grant
Permits an IAM Principal to send custom events to EventBridge so that they can be matched to rules.
func EventBus_IsConstruct ¶
func EventBus_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func EventBus_IsResource ¶
func EventBus_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func EventField_Account ¶
func EventField_Account() *string
func EventField_DetailType ¶
func EventField_DetailType() *string
func EventField_EventId ¶
func EventField_EventId() *string
func EventField_FromPath ¶
Extract a custom JSON path from the event.
func EventField_Region ¶
func EventField_Region() *string
func EventField_Source ¶
func EventField_Source() *string
func EventField_Time ¶
func EventField_Time() *string
func NewArchive_Override ¶
func NewArchive_Override(a Archive, scope constructs.Construct, id *string, props *ArchiveProps)
func NewCfnApiDestination_Override ¶
func NewCfnApiDestination_Override(c CfnApiDestination, scope constructs.Construct, id *string, props *CfnApiDestinationProps)
Create a new `AWS::Events::ApiDestination`.
func NewCfnArchive_Override ¶
func NewCfnArchive_Override(c CfnArchive, scope constructs.Construct, id *string, props *CfnArchiveProps)
Create a new `AWS::Events::Archive`.
func NewCfnConnection_Override ¶
func NewCfnConnection_Override(c CfnConnection, scope constructs.Construct, id *string, props *CfnConnectionProps)
Create a new `AWS::Events::Connection`.
func NewCfnEventBusPolicy_Override ¶
func NewCfnEventBusPolicy_Override(c CfnEventBusPolicy, scope constructs.Construct, id *string, props *CfnEventBusPolicyProps)
Create a new `AWS::Events::EventBusPolicy`.
func NewCfnEventBus_Override ¶
func NewCfnEventBus_Override(c CfnEventBus, scope constructs.Construct, id *string, props *CfnEventBusProps)
Create a new `AWS::Events::EventBus`.
func NewCfnRule_Override ¶
func NewCfnRule_Override(c CfnRule, scope constructs.Construct, id *string, props *CfnRuleProps)
Create a new `AWS::Events::Rule`.
func NewEventBus_Override ¶
func NewEventBus_Override(e EventBus, scope constructs.Construct, id *string, props *EventBusProps)
func NewRuleTargetInput_Override ¶
func NewRuleTargetInput_Override(r RuleTargetInput)
func NewRule_Override ¶
func NewSchedule_Override ¶
func NewSchedule_Override(s Schedule)
func Rule_IsConstruct ¶
func Rule_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead
func Rule_IsResource ¶
func Rule_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
Types ¶
type Archive ¶
type Archive interface { awscdk.Resource ArchiveArn() *string ArchiveName() *string Env() *awscdk.ResourceEnvironment Node() constructs.Node PhysicalName() *string Stack() awscdk.Stack ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string GetResourceNameAttribute(nameAttr *string) *string ToString() *string }
Define an EventBridge Archive.
TODO: EXAMPLE
func NewArchive ¶
func NewArchive(scope constructs.Construct, id *string, props *ArchiveProps) Archive
type ArchiveProps ¶
type ArchiveProps struct { // An event pattern to use to filter events sent to the archive. EventPattern *EventPattern `json:"eventPattern" yaml:"eventPattern"` // The name of the archive. ArchiveName *string `json:"archiveName" yaml:"archiveName"` // A description for the archive. Description *string `json:"description" yaml:"description"` // The number of days to retain events for. // // Default value is 0. If set to 0, events are retained indefinitely. Retention awscdk.Duration `json:"retention" yaml:"retention"` // The event source associated with the archive. SourceEventBus IEventBus `json:"sourceEventBus" yaml:"sourceEventBus"` }
The event archive properties.
TODO: EXAMPLE
type BaseArchiveProps ¶
type BaseArchiveProps struct { // An event pattern to use to filter events sent to the archive. EventPattern *EventPattern `json:"eventPattern" yaml:"eventPattern"` // The name of the archive. ArchiveName *string `json:"archiveName" yaml:"archiveName"` // A description for the archive. Description *string `json:"description" yaml:"description"` // The number of days to retain events for. // // Default value is 0. If set to 0, events are retained indefinitely. Retention awscdk.Duration `json:"retention" yaml:"retention"` }
The event archive base properties.
TODO: EXAMPLE
type CfnApiDestination ¶
type CfnApiDestination interface { awscdk.CfnResource awscdk.IInspectable AttrArn() *string CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string ConnectionArn() *string SetConnectionArn(val *string) CreationStack() *[]*string Description() *string SetDescription(val *string) HttpMethod() *string SetHttpMethod(val *string) InvocationEndpoint() *string SetInvocationEndpoint(val *string) InvocationRateLimitPerSecond() *float64 SetInvocationRateLimitPerSecond(val *float64) LogicalId() *string Name() *string SetName(val *string) Node() constructs.Node Ref() *string Stack() awscdk.Stack UpdatedProperites() *map[string]interface{} AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Events::ApiDestination`.
Creates an API destination, which is an HTTP invocation endpoint configured as a target for events.
When using ApiDesinations with OAuth authentication we recommend these best practices:
- Create a secret in Secrets Manager with your OAuth credentials. - Reference that secret in your CloudFormation template for `AWS::Events::Connection` using CloudFormation dynamic reference syntax. For more information, see [Secrets Manager secrets](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-secretsmanager) .
When the Connection resource is created the secret will be passed to EventBridge and stored in the customer account using “Service Linked Secrets,” effectively creating two secrets. This will minimize the cost because the original secret is only accessed when a CloudFormation template is created or updated, not every time an event is sent to the ApiDestination. The secret stored in the customer account by EventBridge is the one used for each event sent to the ApiDestination and AWS is responsible for the fees.
> The secret stored in the customer account by EventBridge can’t be updated directly, only when a CloudFormation template is updated.
For examples of CloudFormation templates that use secrets, see [Examples](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-connection.html#aws-resource-events-connection--examples) .
TODO: EXAMPLE
func NewCfnApiDestination ¶
func NewCfnApiDestination(scope constructs.Construct, id *string, props *CfnApiDestinationProps) CfnApiDestination
Create a new `AWS::Events::ApiDestination`.
type CfnApiDestinationProps ¶
type CfnApiDestinationProps struct { // The ARN of the connection to use for the API destination. // // The destination endpoint must support the authorization type specified for the connection. ConnectionArn *string `json:"connectionArn" yaml:"connectionArn"` // The method to use for the request to the HTTP invocation endpoint. HttpMethod *string `json:"httpMethod" yaml:"httpMethod"` // The URL to the HTTP invocation endpoint for the API destination. InvocationEndpoint *string `json:"invocationEndpoint" yaml:"invocationEndpoint"` // A description for the API destination to create. Description *string `json:"description" yaml:"description"` // The maximum number of requests per second to send to the HTTP invocation endpoint. InvocationRateLimitPerSecond *float64 `json:"invocationRateLimitPerSecond" yaml:"invocationRateLimitPerSecond"` // The name for the API destination to create. Name *string `json:"name" yaml:"name"` }
Properties for defining a `CfnApiDestination`.
TODO: EXAMPLE
type CfnArchive ¶
type CfnArchive interface { awscdk.CfnResource awscdk.IInspectable ArchiveName() *string SetArchiveName(val *string) AttrArchiveName() *string AttrArn() *string CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string CreationStack() *[]*string Description() *string SetDescription(val *string) EventPattern() interface{} SetEventPattern(val interface{}) LogicalId() *string Node() constructs.Node Ref() *string RetentionDays() *float64 SetRetentionDays(val *float64) SourceArn() *string SetSourceArn(val *string) Stack() awscdk.Stack UpdatedProperites() *map[string]interface{} AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Events::Archive`.
Creates an archive of events with the specified settings. When you create an archive, incoming events might not immediately start being sent to the archive. Allow a short period of time for changes to take effect. If you do not specify a pattern to filter events sent to the archive, all events are sent to the archive except replayed events. Replayed events are not sent to an archive.
TODO: EXAMPLE
func NewCfnArchive ¶
func NewCfnArchive(scope constructs.Construct, id *string, props *CfnArchiveProps) CfnArchive
Create a new `AWS::Events::Archive`.
type CfnArchiveProps ¶
type CfnArchiveProps struct { // The ARN of the event bus that sends events to the archive. SourceArn *string `json:"sourceArn" yaml:"sourceArn"` // The name for the archive to create. ArchiveName *string `json:"archiveName" yaml:"archiveName"` // A description for the archive. Description *string `json:"description" yaml:"description"` // An event pattern to use to filter events sent to the archive. EventPattern interface{} `json:"eventPattern" yaml:"eventPattern"` // The number of days to retain events for. // // Default value is 0. If set to 0, events are retained indefinitely RetentionDays *float64 `json:"retentionDays" yaml:"retentionDays"` }
Properties for defining a `CfnArchive`.
TODO: EXAMPLE
type CfnConnection ¶
type CfnConnection interface { awscdk.CfnResource awscdk.IInspectable AttrArn() *string AttrSecretArn() *string AuthorizationType() *string SetAuthorizationType(val *string) AuthParameters() interface{} SetAuthParameters(val interface{}) CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string CreationStack() *[]*string Description() *string SetDescription(val *string) LogicalId() *string Name() *string SetName(val *string) Node() constructs.Node Ref() *string Stack() awscdk.Stack UpdatedProperites() *map[string]interface{} AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Events::Connection`.
Creates a connection. A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint.
TODO: EXAMPLE
func NewCfnConnection ¶
func NewCfnConnection(scope constructs.Construct, id *string, props *CfnConnectionProps) CfnConnection
Create a new `AWS::Events::Connection`.
type CfnConnectionProps ¶
type CfnConnectionProps struct { // The type of authorization to use for the connection. AuthorizationType *string `json:"authorizationType" yaml:"authorizationType"` // A `CreateConnectionAuthRequestParameters` object that contains the authorization parameters to use to authorize with the endpoint. AuthParameters interface{} `json:"authParameters" yaml:"authParameters"` // A description for the connection to create. Description *string `json:"description" yaml:"description"` // The name for the connection to create. Name *string `json:"name" yaml:"name"` }
Properties for defining a `CfnConnection`.
TODO: EXAMPLE
type CfnEventBus ¶
type CfnEventBus interface { awscdk.CfnResource awscdk.IInspectable AttrArn() *string AttrName() *string AttrPolicy() *string CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string CreationStack() *[]*string EventSourceName() *string SetEventSourceName(val *string) LogicalId() *string Name() *string SetName(val *string) Node() constructs.Node Ref() *string Stack() awscdk.Stack Tags() *[]*CfnEventBus_TagEntryProperty SetTags(val *[]*CfnEventBus_TagEntryProperty) UpdatedProperites() *map[string]interface{} AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Events::EventBus`.
Creates a new event bus within your account. This can be a custom event bus which you can use to receive events from your custom applications and services, or it can be a partner event bus which can be matched to a partner event source.
TODO: EXAMPLE
func NewCfnEventBus ¶
func NewCfnEventBus(scope constructs.Construct, id *string, props *CfnEventBusProps) CfnEventBus
Create a new `AWS::Events::EventBus`.
type CfnEventBusPolicy ¶
type CfnEventBusPolicy interface { awscdk.CfnResource awscdk.IInspectable Action() *string SetAction(val *string) CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string Condition() interface{} SetCondition(val interface{}) CreationStack() *[]*string EventBusName() *string SetEventBusName(val *string) LogicalId() *string Node() constructs.Node Principal() *string SetPrincipal(val *string) Ref() *string Stack() awscdk.Stack Statement() interface{} SetStatement(val interface{}) StatementId() *string SetStatementId(val *string) UpdatedProperites() *map[string]interface{} AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Events::EventBusPolicy`.
Running `PutPermission` permits the specified AWS account or AWS organization to put events to the specified *event bus* . Amazon EventBridge (CloudWatch Events) rules in your account are triggered by these events arriving to an event bus in your account.
For another account to send events to your account, that external account must have an EventBridge rule with your account's event bus as a target.
To enable multiple AWS accounts to put events to your event bus, run `PutPermission` once for each of these accounts. Or, if all the accounts are members of the same AWS organization, you can run `PutPermission` once specifying `Principal` as "*" and specifying the AWS organization ID in `Condition` , to grant permissions to all accounts in that organization.
If you grant permissions using an organization, then accounts in that organization must specify a `RoleArn` with proper permissions when they use `PutTarget` to add your account's event bus as a target. For more information, see [Sending and Receiving Events Between AWS Accounts](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) in the *Amazon EventBridge User Guide* .
The permission policy on the event bus cannot exceed 10 KB in size.
TODO: EXAMPLE
func NewCfnEventBusPolicy ¶
func NewCfnEventBusPolicy(scope constructs.Construct, id *string, props *CfnEventBusPolicyProps) CfnEventBusPolicy
Create a new `AWS::Events::EventBusPolicy`.
type CfnEventBusPolicyProps ¶
type CfnEventBusPolicyProps struct { // An identifier string for the external account that you are granting permissions to. // // If you later want to revoke the permission for this external account, specify this `StatementId` when you run [RemovePermission](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_RemovePermission.html) . // // > Each `StatementId` must be unique. StatementId *string `json:"statementId" yaml:"statementId"` // The action that you are enabling the other account to perform. Action *string `json:"action" yaml:"action"` // This parameter enables you to limit the permission to accounts that fulfill a certain condition, such as being a member of a certain AWS organization. // // For more information about AWS Organizations, see [What Is AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html) in the *AWS Organizations User Guide* . // // If you specify `Condition` with an AWS organization ID, and specify "*" as the value for `Principal` , you grant permission to all the accounts in the named organization. // // The `Condition` is a JSON string which must contain `Type` , `Key` , and `Value` fields. Condition interface{} `json:"condition" yaml:"condition"` // The name of the event bus associated with the rule. // // If you omit this, the default event bus is used. EventBusName *string `json:"eventBusName" yaml:"eventBusName"` // The 12-digit AWS account ID that you are permitting to put events to your default event bus. // // Specify "*" to permit any account to put events to your default event bus. // // If you specify "*" without specifying `Condition` , avoid creating rules that may match undesirable events. To create more secure rules, make sure that the event pattern for each rule contains an `account` field with a specific account ID from which to receive events. Rules with an account field do not match any events sent from other accounts. Principal *string `json:"principal" yaml:"principal"` // A JSON string that describes the permission policy statement. // // You can include a `Policy` parameter in the request instead of using the `StatementId` , `Action` , `Principal` , or `Condition` parameters. Statement interface{} `json:"statement" yaml:"statement"` }
Properties for defining a `CfnEventBusPolicy`.
TODO: EXAMPLE
type CfnEventBusPolicy_ConditionProperty ¶
type CfnEventBusPolicy_ConditionProperty struct { // Specifies the key for the condition. // // Currently the only supported key is `aws:PrincipalOrgID` . Key *string `json:"key" yaml:"key"` // Specifies the type of condition. // // Currently the only supported value is `StringEquals` . Type *string `json:"type" yaml:"type"` // Specifies the value for the key. // // Currently, this must be the ID of the organization. Value *string `json:"value" yaml:"value"` }
A JSON string which you can use to limit the event bus permissions you are granting to only accounts that fulfill the condition.
Currently, the only supported condition is membership in a certain AWS organization. The string must contain `Type` , `Key` , and `Value` fields. The `Value` field specifies the ID of the AWS organization. Following is an example value for `Condition` :
`'{"Type" : "StringEquals", "Key": "aws:PrincipalOrgID", "Value": "o-1234567890"}'`
TODO: EXAMPLE
type CfnEventBusProps ¶
type CfnEventBusProps struct { // The name of the new event bus. // // Event bus names cannot contain the / character. You can't use the name `default` for a custom event bus, as this name is already used for your account's default event bus. // // If this is a partner event bus, the name must exactly match the name of the partner event source that this event bus is matched to. Name *string `json:"name" yaml:"name"` // If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with. EventSourceName *string `json:"eventSourceName" yaml:"eventSourceName"` // `AWS::Events::EventBus.Tags`. Tags *[]*CfnEventBus_TagEntryProperty `json:"tags" yaml:"tags"` }
Properties for defining a `CfnEventBus`.
TODO: EXAMPLE
type CfnEventBus_TagEntryProperty ¶ added in v2.9.0
type CfnEventBus_TagEntryProperty struct { // `CfnEventBus.TagEntryProperty.Key`. Key *string `json:"key" yaml:"key"` // `CfnEventBus.TagEntryProperty.Value`. Value *string `json:"value" yaml:"value"` }
TODO: EXAMPLE
type CfnRule ¶
type CfnRule interface { awscdk.CfnResource awscdk.IInspectable AttrArn() *string CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string CreationStack() *[]*string Description() *string SetDescription(val *string) EventBusName() *string SetEventBusName(val *string) EventPattern() interface{} SetEventPattern(val interface{}) LogicalId() *string Name() *string SetName(val *string) Node() constructs.Node Ref() *string RoleArn() *string SetRoleArn(val *string) ScheduleExpression() *string SetScheduleExpression(val *string) Stack() awscdk.Stack State() *string SetState(val *string) Targets() interface{} SetTargets(val interface{}) UpdatedProperites() *map[string]interface{} AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Events::Rule`.
Creates or updates the specified rule. Rules are enabled by default, or based on value of the state. You can disable a rule using [DisableRule](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DisableRule.html) .
A single rule watches for events from a single event bus. Events generated by AWS services go to your account's default event bus. Events generated by SaaS partner services or applications go to the matching partner event bus. If you have custom applications or services, you can specify whether their events go to your default event bus or a custom event bus that you have created. For more information, see [CreateEventBus](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_CreateEventBus.html) .
If you are updating an existing rule, the rule is replaced with what you specify in this `PutRule` command. If you omit arguments in `PutRule` , the old values for those arguments are not kept. Instead, they are replaced with null values.
When you create or update a rule, incoming events might not immediately start matching to new or updated rules. Allow a short period of time for changes to take effect.
A rule must contain at least an EventPattern or ScheduleExpression. Rules with EventPatterns are triggered when a matching event is observed. Rules with ScheduleExpressions self-trigger based on the given schedule. A rule can have both an EventPattern and a ScheduleExpression, in which case the rule triggers on matching events as well as on a schedule.
Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, EventBridge uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.
In EventBridge, it is possible to create rules that lead to infinite loops, where a rule is fired repeatedly. For example, a rule might detect that ACLs have changed on an S3 bucket, and trigger software to change them to the desired state. If the rule is not written carefully, the subsequent change to the ACLs fires the rule again, creating an infinite loop.
To prevent this, write the rules so that the triggered actions do not re-fire the same rule. For example, your rule could fire only if ACLs are found to be in a bad state, instead of after any change.
An infinite loop can quickly cause higher than expected charges. We recommend that you use budgeting, which alerts you when charges exceed your specified limit. For more information, see [Managing Your Costs with Budgets](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-managing-costs.html) .
TODO: EXAMPLE
func NewCfnRule ¶
func NewCfnRule(scope constructs.Construct, id *string, props *CfnRuleProps) CfnRule
Create a new `AWS::Events::Rule`.
type CfnRuleProps ¶
type CfnRuleProps struct { // The description of the rule. Description *string `json:"description" yaml:"description"` // The name or ARN of the event bus associated with the rule. // // If you omit this, the default event bus is used. EventBusName *string `json:"eventBusName" yaml:"eventBusName"` // The event pattern of the rule. // // For more information, see [Events and Event Patterns](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) in the *Amazon EventBridge User Guide* . EventPattern interface{} `json:"eventPattern" yaml:"eventPattern"` // The name of the rule. Name *string `json:"name" yaml:"name"` // The Amazon Resource Name (ARN) of the role that is used for target invocation. // // If you're setting an event bus in another account as the target and that account granted permission to your account through an organization instead of directly by the account ID, you must specify a `RoleArn` with proper permissions in the `Target` structure, instead of here in this parameter. RoleArn *string `json:"roleArn" yaml:"roleArn"` // The scheduling expression. // // For example, "cron(0 20 * * ? *)", "rate(5 minutes)". For more information, see [Creating an Amazon EventBridge rule that runs on a schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule-schedule.html) . ScheduleExpression *string `json:"scheduleExpression" yaml:"scheduleExpression"` // The state of the rule. State *string `json:"state" yaml:"state"` // Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule. // // Targets are the resources that are invoked when a rule is triggered. // // > Each rule can have up to five (5) targets associated with it at one time. // // You can configure the following as targets for Events: // // - [API destination](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html) // - Amazon API Gateway REST API endpoints // - API Gateway // - AWS Batch job queue // - CloudWatch Logs group // - CodeBuild project // - CodePipeline // - Amazon EC2 `CreateSnapshot` API call // - EC2 Image Builder // - Amazon EC2 `RebootInstances` API call // - Amazon EC2 `StopInstances` API call // - Amazon EC2 `TerminateInstances` API call // - Amazon ECS tasks // - Event bus in a different AWS account or Region. // // You can use an event bus in the US East (N. Virginia) us-east-1, US West (Oregon) us-west-2, or Europe (Ireland) eu-west-1 Regions as a target for a rule. // - Firehose delivery stream (Kinesis Data Firehose) // - Inspector assessment template (Amazon Inspector) // - Kinesis stream (Kinesis Data Stream) // - AWS Lambda function // - Redshift clusters (Data API statement execution) // - Amazon SNS topic // - Amazon SQS queues (includes FIFO queues) // - SSM Automation // - SSM OpsItem // - SSM Run Command // - Step Functions state machines // // Creating rules with built-in targets is supported only in the AWS Management Console . The built-in targets are `EC2 CreateSnapshot API call` , `EC2 RebootInstances API call` , `EC2 StopInstances API call` , and `EC2 TerminateInstances API call` . // // For some target types, `PutTargets` provides target-specific parameters. If the target is a Kinesis data stream, you can optionally specify which shard the event goes to by using the `KinesisParameters` argument. To invoke a command on multiple EC2 instances with one rule, you can use the `RunCommandParameters` field. // // To be able to make API calls against the resources that you own, Amazon EventBridge needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, EventBridge relies on resource-based policies. For EC2 instances, Kinesis Data Streams, AWS Step Functions state machines and API Gateway REST APIs, EventBridge relies on IAM roles that you specify in the `RoleARN` argument in `PutTargets` . For more information, see [Authentication and Access Control](https://docs.aws.amazon.com/eventbridge/latest/userguide/auth-and-access-control-eventbridge.html) in the *Amazon EventBridge User Guide* . // // If another AWS account is in the same region and has granted you permission (using `PutPermission` ), you can send events to that account. Set that account's event bus as a target of the rules in your account. To send the matched events to the other account, specify that account's event bus as the `Arn` value when you run `PutTargets` . If your account sends events to another account, your account is charged for each sent event. Each event sent to another account is charged as a custom event. The account receiving the event is not charged. For more information, see [Amazon EventBridge Pricing](https://docs.aws.amazon.com/eventbridge/pricing/) . // // > `Input` , `InputPath` , and `InputTransformer` are not available with `PutTarget` if the target is an event bus of a different AWS account. // // If you are setting the event bus of another account as the target, and that account granted permission to your account through an organization instead of directly by the account ID, then you must specify a `RoleArn` with proper permissions in the `Target` structure. For more information, see [Sending and Receiving Events Between AWS Accounts](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) in the *Amazon EventBridge User Guide* . // // For more information about enabling cross-account events, see [PutPermission](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPermission.html) . // // *Input* , *InputPath* , and *InputTransformer* are mutually exclusive and optional parameters of a target. When a rule is triggered due to a matched event: // // - If none of the following arguments are specified for a target, then the entire event is passed to the target in JSON format (unless the target is Amazon EC2 Run Command or Amazon ECS task, in which case nothing from the event is passed to the target). // - If *Input* is specified in the form of valid JSON, then the matched event is overridden with this constant. // - If *InputPath* is specified in the form of JSONPath (for example, `$.detail` ), then only the part of the event specified in the path is passed to the target (for example, only the detail part of the event is passed). // - If *InputTransformer* is specified, then one or more specified JSONPaths are extracted from the event and used as values in a template that you specify as the input to the target. // // When you specify `InputPath` or `InputTransformer` , you must use JSON dot notation, not bracket notation. // // When you add targets to a rule and the associated rule triggers soon after, new or updated targets might not be immediately invoked. Allow a short period of time for changes to take effect. // // This action can partially fail if too many requests are made at the same time. If that happens, `FailedEntryCount` is non-zero in the response and each entry in `FailedEntries` provides the ID of the failed target and the error code. Targets interface{} `json:"targets" yaml:"targets"` }
Properties for defining a `CfnRule`.
TODO: EXAMPLE
type CfnRule_AwsVpcConfigurationProperty ¶
type CfnRule_AwsVpcConfigurationProperty struct { // Specifies the subnets associated with the task. // // These subnets must all be in the same VPC. You can specify as many as 16 subnets. Subnets *[]*string `json:"subnets" yaml:"subnets"` // Specifies whether the task's elastic network interface receives a public IP address. // // You can specify `ENABLED` only when `LaunchType` in `EcsParameters` is set to `FARGATE` . AssignPublicIp *string `json:"assignPublicIp" yaml:"assignPublicIp"` // Specifies the security groups associated with the task. // // These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used. SecurityGroups *[]*string `json:"securityGroups" yaml:"securityGroups"` }
This structure specifies the VPC subnets and security groups for the task, and whether a public IP address is to be used.
This structure is relevant only for ECS tasks that use the `awsvpc` network mode.
TODO: EXAMPLE
type CfnRule_BatchArrayPropertiesProperty ¶
type CfnRule_BatchArrayPropertiesProperty struct { // The size of the array, if this is an array batch job. // // Valid values are integers between 2 and 10,000. Size *float64 `json:"size" yaml:"size"` }
The array properties for the submitted job, such as the size of the array.
The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. This parameter is used only if the target is an AWS Batch job.
TODO: EXAMPLE
type CfnRule_BatchParametersProperty ¶
type CfnRule_BatchParametersProperty struct { // The ARN or name of the job definition to use if the event target is an AWS Batch job. // // This job definition must already exist. JobDefinition *string `json:"jobDefinition" yaml:"jobDefinition"` // The name to use for this execution of the job, if the target is an AWS Batch job. JobName *string `json:"jobName" yaml:"jobName"` // The array properties for the submitted job, such as the size of the array. // // The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. This parameter is used only if the target is an AWS Batch job. ArrayProperties interface{} `json:"arrayProperties" yaml:"arrayProperties"` // The retry strategy to use for failed jobs, if the target is an AWS Batch job. // // The retry strategy is the number of times to retry the failed job execution. Valid values are 1–10. When you specify a retry strategy here, it overrides the retry strategy defined in the job definition. RetryStrategy interface{} `json:"retryStrategy" yaml:"retryStrategy"` }
The custom parameters to be used when the target is an AWS Batch job.
TODO: EXAMPLE
type CfnRule_BatchRetryStrategyProperty ¶
type CfnRule_BatchRetryStrategyProperty struct { // The number of times to attempt to retry, if the job fails. // // Valid values are 1–10. Attempts *float64 `json:"attempts" yaml:"attempts"` }
The retry strategy to use for failed jobs, if the target is an AWS Batch job.
If you specify a retry strategy here, it overrides the retry strategy defined in the job definition.
TODO: EXAMPLE
type CfnRule_CapacityProviderStrategyItemProperty ¶
type CfnRule_CapacityProviderStrategyItemProperty struct { // The short name of the capacity provider. CapacityProvider *string `json:"capacityProvider" yaml:"capacityProvider"` // The base value designates how many tasks, at a minimum, to run on the specified capacity provider. // // Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used. Base *float64 `json:"base" yaml:"base"` // The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. // // The weight value is taken into consideration after the base value, if defined, is satisfied. Weight *float64 `json:"weight" yaml:"weight"` }
The details of a capacity provider strategy.
To learn more, see [CapacityProviderStrategyItem](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CapacityProviderStrategyItem.html) in the Amazon ECS API Reference.
TODO: EXAMPLE
type CfnRule_DeadLetterConfigProperty ¶
type CfnRule_DeadLetterConfigProperty struct { // The ARN of the SQS queue specified as the target for the dead-letter queue. Arn *string `json:"arn" yaml:"arn"` }
A `DeadLetterConfig` object that contains information about a dead-letter queue configuration.
TODO: EXAMPLE
type CfnRule_EcsParametersProperty ¶
type CfnRule_EcsParametersProperty struct { // The ARN of the task definition to use if the event target is an Amazon ECS task. TaskDefinitionArn *string `json:"taskDefinitionArn" yaml:"taskDefinitionArn"` // The capacity provider strategy to use for the task. // // If a `capacityProviderStrategy` is specified, the `launchType` parameter must be omitted. If no `capacityProviderStrategy` or launchType is specified, the `defaultCapacityProviderStrategy` for the cluster is used. CapacityProviderStrategy interface{} `json:"capacityProviderStrategy" yaml:"capacityProviderStrategy"` // Specifies whether to enable Amazon ECS managed tags for the task. // // For more information, see [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) in the Amazon Elastic Container Service Developer Guide. EnableEcsManagedTags interface{} `json:"enableEcsManagedTags" yaml:"enableEcsManagedTags"` // Whether or not to enable the execute command functionality for the containers in this task. // // If true, this enables execute command functionality on all containers in the task. EnableExecuteCommand interface{} `json:"enableExecuteCommand" yaml:"enableExecuteCommand"` // Specifies an ECS task group for the task. // // The maximum length is 255 characters. Group *string `json:"group" yaml:"group"` // Specifies the launch type on which your task is running. // // The launch type that you specify here must match one of the launch type (compatibilities) of the target task. The `FARGATE` value is supported only in the Regions where AWS Fargate with Amazon ECS is supported. For more information, see [AWS Fargate on Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS-Fargate.html) in the *Amazon Elastic Container Service Developer Guide* . LaunchType *string `json:"launchType" yaml:"launchType"` // Use this structure if the Amazon ECS task uses the `awsvpc` network mode. // // This structure specifies the VPC subnets and security groups associated with the task, and whether a public IP address is to be used. This structure is required if `LaunchType` is `FARGATE` because the `awsvpc` mode is required for Fargate tasks. // // If you specify `NetworkConfiguration` when the target ECS task does not use the `awsvpc` network mode, the task fails. NetworkConfiguration interface{} `json:"networkConfiguration" yaml:"networkConfiguration"` // An array of placement constraint objects to use for the task. // // You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime). PlacementConstraints interface{} `json:"placementConstraints" yaml:"placementConstraints"` // The placement strategy objects to use for the task. // // You can specify a maximum of five strategy rules per task. PlacementStrategies interface{} `json:"placementStrategies" yaml:"placementStrategies"` // Specifies the platform version for the task. // // Specify only the numeric portion of the platform version, such as `1.1.0` . // // This structure is used only if `LaunchType` is `FARGATE` . For more information about valid platform versions, see [AWS Fargate Platform Versions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) in the *Amazon Elastic Container Service Developer Guide* . PlatformVersion *string `json:"platformVersion" yaml:"platformVersion"` // Specifies whether to propagate the tags from the task definition to the task. // // If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action. PropagateTags *string `json:"propagateTags" yaml:"propagateTags"` // The reference ID to use for the task. ReferenceId *string `json:"referenceId" yaml:"referenceId"` // The metadata that you apply to the task to help you categorize and organize them. // // Each tag consists of a key and an optional value, both of which you define. To learn more, see [RunTask](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#ECS-RunTask-request-tags) in the Amazon ECS API Reference. TagList interface{} `json:"tagList" yaml:"tagList"` // The number of tasks to create based on `TaskDefinition` . // // The default is 1. TaskCount *float64 `json:"taskCount" yaml:"taskCount"` }
The custom parameters to be used when the target is an Amazon ECS task.
TODO: EXAMPLE
type CfnRule_HttpParametersProperty ¶
type CfnRule_HttpParametersProperty struct { // The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination. HeaderParameters interface{} `json:"headerParameters" yaml:"headerParameters"` // The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path wildcards ("*"). PathParameterValues *[]*string `json:"pathParameterValues" yaml:"pathParameterValues"` // The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination. QueryStringParameters interface{} `json:"queryStringParameters" yaml:"queryStringParameters"` }
These are custom parameter to be used when the target is an API Gateway REST APIs or EventBridge ApiDestinations.
In the latter case, these are merged with any InvocationParameters specified on the Connection, with any values from the Connection taking precedence.
TODO: EXAMPLE
type CfnRule_InputTransformerProperty ¶
type CfnRule_InputTransformerProperty struct { // Input template where you specify placeholders that will be filled with the values of the keys from `InputPathsMap` to customize the data sent to the target. // // Enclose each `InputPathsMaps` value in brackets: < *value* > The InputTemplate must be valid JSON. // // If `InputTemplate` is a JSON object (surrounded by curly braces), the following restrictions apply: // // - The placeholder cannot be used as an object key. // // The following example shows the syntax for using `InputPathsMap` and `InputTemplate` . // // `"InputTransformer":` // // `{` // // `"InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"},` // // `"InputTemplate": "<instance> is in state <status>"` // // `}` // // To have the `InputTemplate` include quote marks within a JSON string, escape each quote marks with a slash, as in the following example: // // `"InputTransformer":` // // `{` // // `"InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"},` // // `"InputTemplate": "<instance> is in state \"<status>\""` // // `}` // // The `InputTemplate` can also be valid JSON with varibles in quotes or out, as in the following example: // // `"InputTransformer":` // // `{` // // `"InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"},` // // `"InputTemplate": '{"myInstance": <instance>,"myStatus": "<instance> is in state \"<status>\""}'` // // `}` InputTemplate *string `json:"inputTemplate" yaml:"inputTemplate"` // Map of JSON paths to be extracted from the event. // // You can then insert these in the template in `InputTemplate` to produce the output you want to be sent to the target. // // `InputPathsMap` is an array key-value pairs, where each value is a valid JSON path. You can have as many as 100 key-value pairs. You must use JSON dot notation, not bracket notation. // // The keys cannot start with " AWS ." InputPathsMap interface{} `json:"inputPathsMap" yaml:"inputPathsMap"` }
Contains the parameters needed for you to provide custom input to a target based on one or more pieces of data extracted from the event.
TODO: EXAMPLE
type CfnRule_KinesisParametersProperty ¶
type CfnRule_KinesisParametersProperty struct { // The JSON path to be extracted from the event and used as the partition key. // // For more information, see [Amazon Kinesis Streams Key Concepts](https://docs.aws.amazon.com/streams/latest/dev/key-concepts.html#partition-key) in the *Amazon Kinesis Streams Developer Guide* . PartitionKeyPath *string `json:"partitionKeyPath" yaml:"partitionKeyPath"` }
This object enables you to specify a JSON path to extract from the event and use as the partition key for the Amazon Kinesis data stream, so that you can control the shard to which the event goes.
If you do not include this parameter, the default is to use the `eventId` as the partition key.
TODO: EXAMPLE
type CfnRule_NetworkConfigurationProperty ¶
type CfnRule_NetworkConfigurationProperty struct { // Use this structure to specify the VPC subnets and security groups for the task, and whether a public IP address is to be used. // // This structure is relevant only for ECS tasks that use the `awsvpc` network mode. AwsVpcConfiguration interface{} `json:"awsVpcConfiguration" yaml:"awsVpcConfiguration"` }
This structure specifies the network configuration for an ECS task.
TODO: EXAMPLE
type CfnRule_PlacementConstraintProperty ¶
type CfnRule_PlacementConstraintProperty struct { // A cluster query language expression to apply to the constraint. // // You cannot specify an expression if the constraint type is `distinctInstance` . To learn more, see [Cluster Query Language](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) in the Amazon Elastic Container Service Developer Guide. Expression *string `json:"expression" yaml:"expression"` // The type of constraint. // // Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf to restrict the selection to a group of valid candidates. Type *string `json:"type" yaml:"type"` }
An object representing a constraint on task placement.
To learn more, see [Task Placement Constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) in the Amazon Elastic Container Service Developer Guide.
TODO: EXAMPLE
type CfnRule_PlacementStrategyProperty ¶
type CfnRule_PlacementStrategyProperty struct { // The field to apply the placement strategy against. // // For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance, such as attribute:ecs.availability-zone. For the binpack placement strategy, valid values are cpu and memory. For the random placement strategy, this field is not used. Field *string `json:"field" yaml:"field"` // The type of placement strategy. // // The random placement strategy randomly places tasks on available candidates. The spread placement strategy spreads placement across available candidates evenly based on the field parameter. The binpack strategy places tasks on available candidates that have the least available amount of the resource that is specified with the field parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory (but still enough to run the task). Type *string `json:"type" yaml:"type"` }
The task placement strategy for a task or service.
To learn more, see [Task Placement Strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html) in the Amazon Elastic Container Service Service Developer Guide.
TODO: EXAMPLE
type CfnRule_RedshiftDataParametersProperty ¶
type CfnRule_RedshiftDataParametersProperty struct { // The name of the database. // // Required when authenticating using temporary credentials. Database *string `json:"database" yaml:"database"` // The SQL statement text to run. Sql *string `json:"sql" yaml:"sql"` // The database user name. // // Required when authenticating using temporary credentials. DbUser *string `json:"dbUser" yaml:"dbUser"` // The name or ARN of the secret that enables access to the database. // // Required when authenticating using AWS Secrets Manager. SecretManagerArn *string `json:"secretManagerArn" yaml:"secretManagerArn"` // The name of the SQL statement. // // You can name the SQL statement when you create it to identify the query. StatementName *string `json:"statementName" yaml:"statementName"` // Indicates whether to send an event back to EventBridge after the SQL statement runs. WithEvent interface{} `json:"withEvent" yaml:"withEvent"` }
These are custom parameters to be used when the target is a Amazon Redshift cluster to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.
TODO: EXAMPLE
type CfnRule_RetryPolicyProperty ¶
type CfnRule_RetryPolicyProperty struct { // The maximum amount of time, in seconds, to continue to make retry attempts. MaximumEventAgeInSeconds *float64 `json:"maximumEventAgeInSeconds" yaml:"maximumEventAgeInSeconds"` // The maximum number of retry attempts to make before the request fails. // // Retry attempts continue until either the maximum number of attempts is made or until the duration of the `MaximumEventAgeInSeconds` is met. MaximumRetryAttempts *float64 `json:"maximumRetryAttempts" yaml:"maximumRetryAttempts"` }
A `RetryPolicy` object that includes information about the retry policy settings.
TODO: EXAMPLE
type CfnRule_RunCommandParametersProperty ¶
type CfnRule_RunCommandParametersProperty struct {
// Currently, we support including only one RunCommandTarget block, which specifies either an array of InstanceIds or a tag.
RunCommandTargets interface{} `json:"runCommandTargets" yaml:"runCommandTargets"`
}
This parameter contains the criteria (either InstanceIds or a tag) used to specify which EC2 instances are to be sent the command.
TODO: EXAMPLE
type CfnRule_RunCommandTargetProperty ¶
type CfnRule_RunCommandTargetProperty struct { // Can be either `tag:` *tag-key* or `InstanceIds` . Key *string `json:"key" yaml:"key"` // If `Key` is `tag:` *tag-key* , `Values` is a list of tag values. // // If `Key` is `InstanceIds` , `Values` is a list of Amazon EC2 instance IDs. Values *[]*string `json:"values" yaml:"values"` }
Information about the EC2 instances that are to be sent the command, specified as key-value pairs.
Each `RunCommandTarget` block can include only one key, but this key may specify multiple values.
TODO: EXAMPLE
type CfnRule_SqsParametersProperty ¶
type CfnRule_SqsParametersProperty struct { // The FIFO message group ID to use as the target. MessageGroupId *string `json:"messageGroupId" yaml:"messageGroupId"` }
This structure includes the custom parameter to be used when the target is an SQS FIFO queue.
TODO: EXAMPLE
type CfnRule_TagProperty ¶
type CfnRule_TagProperty struct { // A string you can use to assign a value. // // The combination of tag keys and values can help you organize and categorize your resources. Key *string `json:"key" yaml:"key"` // The value for the specified tag key. Value *string `json:"value" yaml:"value"` }
A key-value pair associated with an ECS Target of an EventBridge rule.
The tag will be propagated to ECS by EventBridge when starting an ECS task based on a matched event.
> Currently, tags are only available when using ECS with EventBridge .
TODO: EXAMPLE
type CfnRule_TargetProperty ¶
type CfnRule_TargetProperty struct { // The Amazon Resource Name (ARN) of the target. Arn *string `json:"arn" yaml:"arn"` // The ID of the target within the specified rule. // // Use this ID to reference the target when updating the rule. We recommend using a memorable and unique string. Id *string `json:"id" yaml:"id"` // If the event target is an AWS Batch job, this contains the job definition, job name, and other parameters. // // For more information, see [Jobs](https://docs.aws.amazon.com/batch/latest/userguide/jobs.html) in the *AWS Batch User Guide* . BatchParameters interface{} `json:"batchParameters" yaml:"batchParameters"` // The `DeadLetterConfig` that defines the target queue to send dead-letter queue events to. DeadLetterConfig interface{} `json:"deadLetterConfig" yaml:"deadLetterConfig"` // Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. // // For more information about Amazon ECS tasks, see [Task Definitions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) in the *Amazon EC2 Container Service Developer Guide* . EcsParameters interface{} `json:"ecsParameters" yaml:"ecsParameters"` // Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge ApiDestination. // // If you specify an API Gateway REST API or EventBridge ApiDestination as a target, you can use this parameter to specify headers, path parameters, and query string keys/values as part of your target invoking request. If you're using ApiDestinations, the corresponding Connection can also have these values configured. In case of any conflicting keys, values from the Connection take precedence. HttpParameters interface{} `json:"httpParameters" yaml:"httpParameters"` // Valid JSON text passed to the target. // // In this case, nothing from the event itself is passed to the target. For more information, see [The JavaScript Object Notation (JSON) Data Interchange Format](https://docs.aws.amazon.com/http://www.rfc-editor.org/rfc/rfc7159.txt) . Input *string `json:"input" yaml:"input"` // The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. // // You must use JSON dot notation, not bracket notation. For more information about JSON paths, see [JSONPath](https://docs.aws.amazon.com/http://goessner.net/articles/JsonPath/) . InputPath *string `json:"inputPath" yaml:"inputPath"` // Settings to enable you to provide custom input to a target based on certain event data. // // You can extract one or more key-value pairs from the event and then use that data to send customized input to the target. InputTransformer interface{} `json:"inputTransformer" yaml:"inputTransformer"` // The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream. // // If you do not include this parameter, the default is to use the `eventId` as the partition key. KinesisParameters interface{} `json:"kinesisParameters" yaml:"kinesisParameters"` // Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster. // // If you specify a Amazon Redshift Cluster as a Target, you can use this to specify parameters to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events. RedshiftDataParameters interface{} `json:"redshiftDataParameters" yaml:"redshiftDataParameters"` // The `RetryPolicy` object that contains the retry policy configuration to use for the dead-letter queue. RetryPolicy interface{} `json:"retryPolicy" yaml:"retryPolicy"` // The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. // // If one rule triggers multiple targets, you can use a different IAM role for each target. RoleArn *string `json:"roleArn" yaml:"roleArn"` // Parameters used when you are using the rule to invoke Amazon EC2 Run Command. RunCommandParameters interface{} `json:"runCommandParameters" yaml:"runCommandParameters"` // Contains the message group ID to use when the target is a FIFO queue. // // If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled. SqsParameters interface{} `json:"sqsParameters" yaml:"sqsParameters"` }
Targets are the resources to be invoked when a rule is triggered.
For a complete list of services and resources that can be set as a target, see [PutTargets](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutTargets.html) .
If you are setting the event bus of another account as the target, and that account granted permission to your account through an organization instead of directly by the account ID, then you must specify a `RoleArn` with proper permissions in the `Target` structure. For more information, see [Sending and Receiving Events Between AWS Accounts](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) in the *Amazon EventBridge User Guide* .
TODO: EXAMPLE
type CronOptions ¶
type CronOptions struct { // The day of the month to run this rule at. Day *string `json:"day" yaml:"day"` // The hour to run this rule at. Hour *string `json:"hour" yaml:"hour"` // The minute to run this rule at. Minute *string `json:"minute" yaml:"minute"` // The month to run this rule at. Month *string `json:"month" yaml:"month"` // The day of the week to run this rule at. WeekDay *string `json:"weekDay" yaml:"weekDay"` // The year to run this rule at. Year *string `json:"year" yaml:"year"` }
Options to configure a cron expression.
All fields are strings so you can use complex expressions. Absence of a field implies '*' or '?', whichever one is appropriate.
TODO: EXAMPLE
See: https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions
type EventBus ¶
type EventBus interface { awscdk.Resource IEventBus Env() *awscdk.ResourceEnvironment EventBusArn() *string EventBusName() *string EventBusPolicy() *string EventSourceName() *string Node() constructs.Node PhysicalName() *string Stack() awscdk.Stack ApplyRemovalPolicy(policy awscdk.RemovalPolicy) Archive(id *string, props *BaseArchiveProps) Archive GeneratePhysicalName() *string GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string GetResourceNameAttribute(nameAttr *string) *string GrantPutEventsTo(grantee awsiam.IGrantable) awsiam.Grant ToString() *string }
Define an EventBridge EventBus.
TODO: EXAMPLE
func NewEventBus ¶
func NewEventBus(scope constructs.Construct, id *string, props *EventBusProps) EventBus
type EventBusAttributes ¶
type EventBusAttributes struct { // The ARN of this event bus resource. EventBusArn *string `json:"eventBusArn" yaml:"eventBusArn"` // The physical ID of this event bus resource. EventBusName *string `json:"eventBusName" yaml:"eventBusName"` // The JSON policy of this event bus resource. EventBusPolicy *string `json:"eventBusPolicy" yaml:"eventBusPolicy"` // The partner event source to associate with this event bus resource. EventSourceName *string `json:"eventSourceName" yaml:"eventSourceName"` }
Interface with properties necessary to import a reusable EventBus.
TODO: EXAMPLE
type EventBusProps ¶
type EventBusProps struct { // The name of the event bus you are creating Note: If 'eventSourceName' is passed in, you cannot set this. EventBusName *string `json:"eventBusName" yaml:"eventBusName"` // The partner event source to associate with this event bus resource Note: If 'eventBusName' is passed in, you cannot set this. EventSourceName *string `json:"eventSourceName" yaml:"eventSourceName"` }
Properties to define an event bus.
TODO: EXAMPLE
type EventField ¶
type EventField interface { awscdk.IResolvable CreationStack() *[]*string DisplayHint() *string Path() *string Resolve(_ctx awscdk.IResolveContext) interface{} ToJSON() *string ToString() *string }
Represents a field in the event pattern.
type EventPattern ¶
type EventPattern struct { // The 12-digit number identifying an AWS account. Account *[]*string `json:"account" yaml:"account"` // A JSON object, whose content is at the discretion of the service originating the event. Detail *map[string]interface{} `json:"detail" yaml:"detail"` // Identifies, in combination with the source field, the fields and values that appear in the detail field. // // Represents the "detail-type" event field. DetailType *[]*string `json:"detailType" yaml:"detailType"` // A unique value is generated for every event. // // This can be helpful in // tracing events as they move through rules to targets, and are processed. Id *[]*string `json:"id" yaml:"id"` // Identifies the AWS region where the event originated. Region *[]*string `json:"region" yaml:"region"` // This JSON array contains ARNs that identify resources that are involved in the event. // // Inclusion of these ARNs is at the discretion of the // service. // // For example, Amazon EC2 instance state-changes include Amazon EC2 // instance ARNs, Auto Scaling events include ARNs for both instances and // Auto Scaling groups, but API calls with AWS CloudTrail do not include // resource ARNs. Resources *[]*string `json:"resources" yaml:"resources"` // Identifies the service that sourced the event. // // All events sourced from // within AWS begin with "aws." Customer-generated events can have any value // here, as long as it doesn't begin with "aws." We recommend the use of // Java package-name style reverse domain-name strings. // // To find the correct value for source for an AWS service, see the table in // AWS Service Namespaces. For example, the source value for Amazon // CloudFront is aws.cloudfront. // See: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces // Source *[]*string `json:"source" yaml:"source"` // The event timestamp, which can be specified by the service originating the event. // // If the event spans a time interval, the service might choose // to report the start time, so this value can be noticeably before the time // the event is actually received. Time *[]*string `json:"time" yaml:"time"` // By default, this is set to 0 (zero) in all events. Version *[]*string `json:"version" yaml:"version"` }
Events in Amazon CloudWatch Events are represented as JSON objects. For more information about JSON objects, see RFC 7159.
**Important**: this class can only be used with a `Rule` class. In particular, do not use it with `CfnRule` class: your pattern will not be rendered correctly. In a `CfnRule` class, write the pattern as you normally would when directly writing CloudFormation.
Rules use event patterns to select events and route them to targets. A pattern either matches an event or it doesn't. Event patterns are represented as JSON objects with a structure that is similar to that of events.
It is important to remember the following about event pattern matching:
- For a pattern to match an event, the event must contain all the field names listed in the pattern. The field names must appear in the event with the same nesting structure.
- Other fields of the event not mentioned in the pattern are ignored; effectively, there is a “"*": "*"“ wildcard for fields not mentioned.
- The matching is exact (character-by-character), without case-folding or any other string normalization.
- The values being matched follow JSON rules: Strings enclosed in quotes, numbers, and the unquoted keywords true, false, and null.
- Number matching is at the string representation level. For example, 300, 300.0, and 3.0e2 are not considered equal.
TODO: EXAMPLE
See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html
type IEventBus ¶
type IEventBus interface { awscdk.IResource // Create an EventBridge archive to send events to. // // When you create an archive, incoming events might not immediately start being sent to the archive. // Allow a short period of time for changes to take effect. Archive(id *string, props *BaseArchiveProps) Archive // Grants an IAM Principal to send custom events to the eventBus so that they can be matched to rules. GrantPutEventsTo(grantee awsiam.IGrantable) awsiam.Grant // The ARN of this event bus resource. EventBusArn() *string // The physical ID of this event bus resource. EventBusName() *string // The JSON policy of this event bus resource. EventBusPolicy() *string // The partner event source to associate with this event bus resource. EventSourceName() *string }
Interface which all EventBus based classes MUST implement.
func EventBus_FromEventBusArn ¶
func EventBus_FromEventBusArn(scope constructs.Construct, id *string, eventBusArn *string) IEventBus
Import an existing event bus resource.
func EventBus_FromEventBusAttributes ¶
func EventBus_FromEventBusAttributes(scope constructs.Construct, id *string, attrs *EventBusAttributes) IEventBus
Import an existing event bus resource.
func EventBus_FromEventBusName ¶
func EventBus_FromEventBusName(scope constructs.Construct, id *string, eventBusName *string) IEventBus
Import an existing event bus resource.
type IRule ¶
type IRule interface { awscdk.IResource // The value of the event rule Amazon Resource Name (ARN), such as arn:aws:events:us-east-2:123456789012:rule/example. RuleArn() *string // The name event rule. RuleName() *string }
Represents an EventBridge Rule.
func Rule_FromEventRuleArn ¶
Import an existing EventBridge Rule provided an ARN.
type IRuleTarget ¶
type IRuleTarget interface { // Returns the rule target specification. // // NOTE: Do not use the various `inputXxx` options. They can be set in a call to `addTarget`. Bind(rule IRule, id *string) *RuleTargetConfig }
An abstract target for EventRules.
type OnEventOptions ¶
type OnEventOptions struct { // A description of the rule's purpose. Description *string `json:"description" yaml:"description"` // Additional restrictions for the event to route to the specified target. // // The method that generates the rule probably imposes some type of event // filtering. The filtering implied by what you pass here is added // on top of that filtering. // See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html // EventPattern *EventPattern `json:"eventPattern" yaml:"eventPattern"` // A name for the rule. RuleName *string `json:"ruleName" yaml:"ruleName"` // The target to register for the event. Target IRuleTarget `json:"target" yaml:"target"` }
Standard set of options for `onXxx` event handlers on construct.
TODO: EXAMPLE
type Rule ¶
type Rule interface { awscdk.Resource IRule Env() *awscdk.ResourceEnvironment Node() constructs.Node PhysicalName() *string RuleArn() *string RuleName() *string Stack() awscdk.Stack AddEventPattern(eventPattern *EventPattern) AddTarget(target IRuleTarget) ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string GetResourceNameAttribute(nameAttr *string) *string ToString() *string ValidateRule() *[]*string }
Defines an EventBridge Rule in this stack.
TODO: EXAMPLE
type RuleProps ¶
type RuleProps struct { // A description of the rule's purpose. Description *string `json:"description" yaml:"description"` // Indicates whether the rule is enabled. Enabled *bool `json:"enabled" yaml:"enabled"` // The event bus to associate with this rule. EventBus IEventBus `json:"eventBus" yaml:"eventBus"` // Describes which events EventBridge routes to the specified target. // // These routed events are matched events. For more information, see Events // and Event Patterns in the Amazon EventBridge User Guide. // See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html // // You must specify this property (either via props or via // `addEventPattern`), the `scheduleExpression` property, or both. The // method `addEventPattern` can be used to add filter values to the event // pattern. // EventPattern *EventPattern `json:"eventPattern" yaml:"eventPattern"` // A name for the rule. RuleName *string `json:"ruleName" yaml:"ruleName"` // The schedule or rate (frequency) that determines when EventBridge runs the rule. // // For more information, see Schedule Expression Syntax for // Rules in the Amazon EventBridge User Guide. // See: https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html // // You must specify this property, the `eventPattern` property, or both. // Schedule Schedule `json:"schedule" yaml:"schedule"` // Targets to invoke when this rule matches an event. // // Input will be the full matched event. If you wish to specify custom // target input, use `addTarget(target[, inputOptions])`. Targets *[]IRuleTarget `json:"targets" yaml:"targets"` }
Properties for defining an EventBridge Rule.
TODO: EXAMPLE
type RuleTargetConfig ¶
type RuleTargetConfig struct { // The Amazon Resource Name (ARN) of the target. Arn *string `json:"arn" yaml:"arn"` // Parameters used when the rule invokes Amazon AWS Batch Job/Queue. BatchParameters *CfnRule_BatchParametersProperty `json:"batchParameters" yaml:"batchParameters"` // Contains information about a dead-letter queue configuration. DeadLetterConfig *CfnRule_DeadLetterConfigProperty `json:"deadLetterConfig" yaml:"deadLetterConfig"` // The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task. EcsParameters *CfnRule_EcsParametersProperty `json:"ecsParameters" yaml:"ecsParameters"` // Parameters used when the rule invoke api gateway. HttpParameters *CfnRule_HttpParametersProperty `json:"httpParameters" yaml:"httpParameters"` // What input to send to the event target. Input RuleTargetInput `json:"input" yaml:"input"` // Settings that control shard assignment, when the target is a Kinesis stream. // // If you don't include this parameter, eventId is used as the // partition key. KinesisParameters *CfnRule_KinesisParametersProperty `json:"kinesisParameters" yaml:"kinesisParameters"` // A RetryPolicy object that includes information about the retry policy settings. RetryPolicy *CfnRule_RetryPolicyProperty `json:"retryPolicy" yaml:"retryPolicy"` // Role to use to invoke this event target. Role awsiam.IRole `json:"role" yaml:"role"` // Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command. RunCommandParameters *CfnRule_RunCommandParametersProperty `json:"runCommandParameters" yaml:"runCommandParameters"` // Parameters used when the FIFO sqs queue is used an event target by the rule. SqsParameters *CfnRule_SqsParametersProperty `json:"sqsParameters" yaml:"sqsParameters"` // The resource that is backing this target. // // 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. // See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html // TargetResource constructs.IConstruct `json:"targetResource" yaml:"targetResource"` }
Properties for an event rule target.
TODO: EXAMPLE
type RuleTargetInput ¶
type RuleTargetInput interface {
Bind(rule IRule) *RuleTargetInputProperties
}
The input to send to the event target.
TODO: EXAMPLE
func RuleTargetInput_FromEventPath ¶
func RuleTargetInput_FromEventPath(path *string) RuleTargetInput
Take the event target input from a path in the event JSON.
func RuleTargetInput_FromMultilineText ¶
func RuleTargetInput_FromMultilineText(text *string) RuleTargetInput
Pass text to the event target, splitting on newlines.
This is only useful when passing to a target that does not take a single argument.
May contain strings returned by EventField.from() to substitute in parts of the matched event.
func RuleTargetInput_FromObject ¶
func RuleTargetInput_FromObject(obj interface{}) RuleTargetInput
Pass a JSON object to the event target.
May contain strings returned by EventField.from() to substitute in parts of the matched event.
func RuleTargetInput_FromText ¶
func RuleTargetInput_FromText(text *string) RuleTargetInput
Pass text to the event target.
May contain strings returned by EventField.from() to substitute in parts of the matched event.
type RuleTargetInputProperties ¶
type RuleTargetInputProperties struct { // Literal input to the target service (must be valid JSON). Input *string `json:"input" yaml:"input"` // JsonPath to take input from the input event. InputPath *string `json:"inputPath" yaml:"inputPath"` // Paths map to extract values from event and insert into `inputTemplate`. InputPathsMap *map[string]*string `json:"inputPathsMap" yaml:"inputPathsMap"` // Input template to insert paths map into. InputTemplate *string `json:"inputTemplate" yaml:"inputTemplate"` }
The input properties for an event target.
TODO: EXAMPLE
type Schedule ¶
type Schedule interface {
ExpressionString() *string
}
Schedule for scheduled event rules.
TODO: EXAMPLE
func Schedule_Cron ¶
func Schedule_Cron(options *CronOptions) Schedule
Create a schedule from a set of cron fields.
func Schedule_Expression ¶
Construct a schedule from a literal schedule expression.
func Schedule_Rate ¶
func Schedule_Rate(duration awscdk.Duration) Schedule
Construct a schedule from an interval and a time unit.