Documentation ¶
Index ¶
- func ApiDestination_IsConstruct(x interface{}) *bool
- func ApiDestination_IsOwnedResource(construct constructs.IConstruct) *bool
- func ApiDestination_IsResource(construct constructs.IConstruct) *bool
- func Archive_IsConstruct(x interface{}) *bool
- func Archive_IsOwnedResource(construct constructs.IConstruct) *bool
- func Archive_IsResource(construct constructs.IConstruct) *bool
- func CfnApiDestination_CFN_RESOURCE_TYPE_NAME() *string
- func CfnApiDestination_IsCfnElement(x interface{}) *bool
- func CfnApiDestination_IsCfnResource(x interface{}) *bool
- func CfnApiDestination_IsConstruct(x interface{}) *bool
- func CfnArchive_CFN_RESOURCE_TYPE_NAME() *string
- func CfnArchive_IsCfnElement(x interface{}) *bool
- func CfnArchive_IsCfnResource(x interface{}) *bool
- func CfnArchive_IsConstruct(x interface{}) *bool
- func CfnConnection_CFN_RESOURCE_TYPE_NAME() *string
- func CfnConnection_IsCfnElement(x interface{}) *bool
- func CfnConnection_IsCfnResource(x interface{}) *bool
- func CfnConnection_IsConstruct(x interface{}) *bool
- func CfnEndpoint_CFN_RESOURCE_TYPE_NAME() *string
- func CfnEndpoint_IsCfnElement(x interface{}) *bool
- func CfnEndpoint_IsCfnResource(x interface{}) *bool
- func CfnEndpoint_IsConstruct(x interface{}) *bool
- func CfnEventBusPolicy_CFN_RESOURCE_TYPE_NAME() *string
- func CfnEventBusPolicy_IsCfnElement(x interface{}) *bool
- func CfnEventBusPolicy_IsCfnResource(x interface{}) *bool
- func CfnEventBusPolicy_IsConstruct(x interface{}) *bool
- func CfnEventBus_CFN_RESOURCE_TYPE_NAME() *string
- func CfnEventBus_IsCfnElement(x interface{}) *bool
- func CfnEventBus_IsCfnResource(x interface{}) *bool
- func CfnEventBus_IsConstruct(x interface{}) *bool
- func CfnRule_CFN_RESOURCE_TYPE_NAME() *string
- func CfnRule_IsCfnElement(x interface{}) *bool
- func CfnRule_IsCfnResource(x interface{}) *bool
- func CfnRule_IsConstruct(x interface{}) *bool
- func Connection_IsConstruct(x interface{}) *bool
- func Connection_IsOwnedResource(construct constructs.IConstruct) *bool
- func Connection_IsResource(construct constructs.IConstruct) *bool
- func EventBusPolicy_IsConstruct(x interface{}) *bool
- func EventBusPolicy_IsOwnedResource(construct constructs.IConstruct) *bool
- func EventBusPolicy_IsResource(construct constructs.IConstruct) *bool
- func EventBus_GrantAllPutEvents(grantee awsiam.IGrantable) awsiam.Grant
- func EventBus_IsConstruct(x interface{}) *bool
- func EventBus_IsOwnedResource(construct constructs.IConstruct) *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 Match_AllOf(matchers ...interface{}) *[]*string
- func Match_AnyOf(matchers ...interface{}) *[]*string
- func Match_AnythingBut(values ...interface{}) *[]*string
- func Match_AnythingButPrefix(prefix *string) *[]*string
- func Match_Cidr(range_ *string) *[]*string
- func Match_DoesNotExist() *[]*string
- func Match_Equal(value *float64) *[]*string
- func Match_EqualsIgnoreCase(value *string) *[]*string
- func Match_ExactString(value *string) *[]*string
- func Match_Exists() *[]*string
- func Match_GreaterThan(value *float64) *[]*string
- func Match_GreaterThanOrEqual(value *float64) *[]*string
- func Match_Interval(lower *float64, upper *float64) *[]*string
- func Match_IpAddressRange(range_ *string) *[]*string
- func Match_LessThan(value *float64) *[]*string
- func Match_LessThanOrEqual(value *float64) *[]*string
- func Match_NullValue() *[]*string
- func Match_Prefix(value *string) *[]*string
- func Match_Suffix(value *string) *[]*string
- func NewApiDestination_Override(a ApiDestination, scope constructs.Construct, id *string, ...)
- func NewArchive_Override(a Archive, scope constructs.Construct, id *string, props *ArchiveProps)
- func NewAuthorization_Override(a Authorization)
- 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 NewCfnEndpoint_Override(c CfnEndpoint, scope constructs.Construct, id *string, props *CfnEndpointProps)
- 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 NewConnection_Override(c Connection, scope constructs.Construct, id *string, props *ConnectionProps)
- func NewEventBusPolicy_Override(e EventBusPolicy, scope constructs.Construct, id *string, ...)
- func NewEventBus_Override(e EventBus, scope constructs.Construct, id *string, props *EventBusProps)
- func NewHttpParameter_Override(h HttpParameter)
- 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_IsOwnedResource(construct constructs.IConstruct) *bool
- func Rule_IsResource(construct constructs.IConstruct) *bool
- type ApiDestination
- type ApiDestinationAttributes
- type ApiDestinationProps
- type Archive
- type ArchiveProps
- type Authorization
- type BaseArchiveProps
- type CfnApiDestination
- type CfnApiDestinationProps
- type CfnArchive
- type CfnArchiveProps
- type CfnConnection
- type CfnConnectionProps
- type CfnConnection_ApiKeyAuthParametersProperty
- type CfnConnection_AuthParametersProperty
- type CfnConnection_BasicAuthParametersProperty
- type CfnConnection_ClientParametersProperty
- type CfnConnection_ConnectionHttpParametersProperty
- type CfnConnection_OAuthParametersProperty
- type CfnConnection_ParameterProperty
- type CfnEndpoint
- type CfnEndpointProps
- type CfnEndpoint_EndpointEventBusProperty
- type CfnEndpoint_FailoverConfigProperty
- type CfnEndpoint_PrimaryProperty
- type CfnEndpoint_ReplicationConfigProperty
- type CfnEndpoint_RoutingConfigProperty
- type CfnEndpoint_SecondaryProperty
- type CfnEventBus
- type CfnEventBusPolicy
- type CfnEventBusPolicyProps
- type CfnEventBusPolicy_ConditionProperty
- type CfnEventBusProps
- type CfnEventBus_DeadLetterConfigProperty
- type CfnRule
- type CfnRuleProps
- type CfnRule_AppSyncParametersProperty
- 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_SageMakerPipelineParameterProperty
- type CfnRule_SageMakerPipelineParametersProperty
- type CfnRule_SqsParametersProperty
- type CfnRule_TagProperty
- type CfnRule_TargetProperty
- type Connection
- type ConnectionAttributes
- type ConnectionProps
- type CronOptions
- type EventBus
- type EventBusAttributes
- type EventBusPolicy
- type EventBusPolicyProps
- type EventBusProps
- type EventCommonOptions
- type EventField
- type EventPattern
- type HttpMethod
- type HttpParameter
- type IApiDestination
- type IConnection
- 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 Match
- type OAuthAuthorizationProps
- 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 ApiDestination_IsConstruct ¶ added in v2.13.0
func ApiDestination_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func ApiDestination_IsOwnedResource ¶ added in v2.32.0
func ApiDestination_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func ApiDestination_IsResource ¶ added in v2.13.0
func ApiDestination_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func Archive_IsConstruct ¶
func Archive_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func Archive_IsOwnedResource ¶ added in v2.32.0
func Archive_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
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(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnApiDestination_IsConstruct ¶
func CfnApiDestination_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
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(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnArchive_IsConstruct ¶
func CfnArchive_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
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(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnConnection_IsConstruct ¶
func CfnConnection_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func CfnEndpoint_CFN_RESOURCE_TYPE_NAME ¶ added in v2.21.0
func CfnEndpoint_CFN_RESOURCE_TYPE_NAME() *string
func CfnEndpoint_IsCfnElement ¶ added in v2.21.0
func CfnEndpoint_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 CfnEndpoint_IsCfnResource ¶ added in v2.21.0
func CfnEndpoint_IsCfnResource(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnEndpoint_IsConstruct ¶ added in v2.21.0
func CfnEndpoint_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
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(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnEventBusPolicy_IsConstruct ¶
func CfnEventBusPolicy_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
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(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnEventBus_IsConstruct ¶
func CfnEventBus_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
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(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnRule_IsConstruct ¶
func CfnRule_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func Connection_IsConstruct ¶ added in v2.13.0
func Connection_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func Connection_IsOwnedResource ¶ added in v2.32.0
func Connection_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func Connection_IsResource ¶ added in v2.13.0
func Connection_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func EventBusPolicy_IsConstruct ¶ added in v2.54.0
func EventBusPolicy_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func EventBusPolicy_IsOwnedResource ¶ added in v2.54.0
func EventBusPolicy_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func EventBusPolicy_IsResource ¶ added in v2.54.0
func EventBusPolicy_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
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.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func EventBus_IsOwnedResource ¶ added in v2.32.0
func EventBus_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
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 Match_AllOf ¶ added in v2.37.0
func Match_AllOf(matchers ...interface{}) *[]*string
Matches an event if any of the provided matchers do.
Only numeric matchers are accepted.
func Match_AnyOf ¶ added in v2.37.0
func Match_AnyOf(matchers ...interface{}) *[]*string
Matches an event if any of the provided matchers does.
func Match_AnythingBut ¶ added in v2.37.0
func Match_AnythingBut(values ...interface{}) *[]*string
Matches anything except what's provided in the rule.
The list of provided values must contain only strings or only numbers.
func Match_AnythingButPrefix ¶ added in v2.37.0
Matches any string that doesn't start with the given prefix.
func Match_Cidr ¶ added in v2.37.0
Matches IPv4 and IPv6 network addresses using the Classless Inter-Domain Routing (CIDR) format.
func Match_DoesNotExist ¶ added in v2.37.0
func Match_DoesNotExist() *[]*string
Matches when the field is absent from the JSON of the event.
func Match_Equal ¶ added in v2.37.0
Matches numbers equal to the provided value.
func Match_EqualsIgnoreCase ¶ added in v2.54.0
Matches a string, regardless of case, in the JSON of the event.
func Match_ExactString ¶ added in v2.37.0
Matches a string, exactly, in the JSON of the event.
func Match_Exists ¶ added in v2.37.0
func Match_Exists() *[]*string
Matches when the field is present in the JSON of the event.
func Match_GreaterThan ¶ added in v2.37.0
Matches numbers greater than the provided value.
func Match_GreaterThanOrEqual ¶ added in v2.37.0
Matches numbers greater than, or equal to, the provided value.
func Match_Interval ¶ added in v2.37.0
Matches numbers inside a closed numeric interval. Equivalent to:.
Match.allOf(Match.greaterThanOrEqual(lower), Match.lessThanOrEqual(upper))
func Match_IpAddressRange ¶ added in v2.37.0
Matches IPv4 and IPv6 network addresses using the Classless Inter-Domain Routing (CIDR) format.
Alias of `cidr()`.
func Match_LessThan ¶ added in v2.37.0
Matches numbers less than the provided value.
func Match_LessThanOrEqual ¶ added in v2.37.0
Matches numbers less than, or equal to, the provided value.
func Match_NullValue ¶ added in v2.37.0
func Match_NullValue() *[]*string
Matches a null value in the JSON of the event.
func Match_Prefix ¶ added in v2.37.0
Matches strings with the given prefix in the JSON of the event.
func Match_Suffix ¶ added in v2.54.0
Matches strings with the given suffix in the JSON of the event.
func NewApiDestination_Override ¶ added in v2.13.0
func NewApiDestination_Override(a ApiDestination, scope constructs.Construct, id *string, props *ApiDestinationProps)
func NewArchive_Override ¶
func NewArchive_Override(a Archive, scope constructs.Construct, id *string, props *ArchiveProps)
func NewAuthorization_Override ¶ added in v2.13.0
func NewAuthorization_Override(a Authorization)
func NewCfnApiDestination_Override ¶
func NewCfnApiDestination_Override(c CfnApiDestination, scope constructs.Construct, id *string, props *CfnApiDestinationProps)
func NewCfnArchive_Override ¶
func NewCfnArchive_Override(c CfnArchive, scope constructs.Construct, id *string, props *CfnArchiveProps)
func NewCfnConnection_Override ¶
func NewCfnConnection_Override(c CfnConnection, scope constructs.Construct, id *string, props *CfnConnectionProps)
func NewCfnEndpoint_Override ¶ added in v2.21.0
func NewCfnEndpoint_Override(c CfnEndpoint, scope constructs.Construct, id *string, props *CfnEndpointProps)
func NewCfnEventBusPolicy_Override ¶
func NewCfnEventBusPolicy_Override(c CfnEventBusPolicy, scope constructs.Construct, id *string, props *CfnEventBusPolicyProps)
func NewCfnEventBus_Override ¶
func NewCfnEventBus_Override(c CfnEventBus, scope constructs.Construct, id *string, props *CfnEventBusProps)
func NewCfnRule_Override ¶
func NewCfnRule_Override(c CfnRule, scope constructs.Construct, id *string, props *CfnRuleProps)
func NewConnection_Override ¶ added in v2.13.0
func NewConnection_Override(c Connection, scope constructs.Construct, id *string, props *ConnectionProps)
func NewEventBusPolicy_Override ¶ added in v2.54.0
func NewEventBusPolicy_Override(e EventBusPolicy, scope constructs.Construct, id *string, props *EventBusPolicyProps)
func NewEventBus_Override ¶
func NewEventBus_Override(e EventBus, scope constructs.Construct, id *string, props *EventBusProps)
func NewHttpParameter_Override ¶ added in v2.13.0
func NewHttpParameter_Override(h HttpParameter)
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.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func Rule_IsOwnedResource ¶ added in v2.32.0
func Rule_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func Rule_IsResource ¶
func Rule_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
Types ¶
type ApiDestination ¶ added in v2.13.0
type ApiDestination interface { awscdk.Resource IApiDestination // The ARN of the Api Destination created. ApiDestinationArn() *string // The Name of the Api Destination created. ApiDestinationName() *string // The Connection to associate with Api Destination. Connection() IConnection // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
Define an EventBridge Api Destination.
Example:
connection := events.NewConnection(this, jsii.String("Connection"), &ConnectionProps{ Authorization: events.Authorization_ApiKey(jsii.String("x-api-key"), awscdk.SecretValue_SecretsManager(jsii.String("ApiSecretName"))), Description: jsii.String("Connection with API Key x-api-key"), }) destination := events.NewApiDestination(this, jsii.String("Destination"), &ApiDestinationProps{ Connection: Connection, Endpoint: jsii.String("https://example.com"), Description: jsii.String("Calling example.com with API key x-api-key"), }) rule := events.NewRule(this, jsii.String("Rule"), &RuleProps{ Schedule: events.Schedule_Rate(awscdk.Duration_Minutes(jsii.Number(1))), Targets: []iRuleTarget{ targets.NewApiDestination(destination), }, })
func ApiDestination_FromApiDestinationAttributes ¶ added in v2.140.0
func ApiDestination_FromApiDestinationAttributes(scope constructs.Construct, id *string, attrs *ApiDestinationAttributes) ApiDestination
Create an Api Destination construct from an existing Api Destination ARN.
func NewApiDestination ¶ added in v2.13.0
func NewApiDestination(scope constructs.Construct, id *string, props *ApiDestinationProps) ApiDestination
type ApiDestinationAttributes ¶ added in v2.140.0
type ApiDestinationAttributes struct { // The ARN of the Api Destination. ApiDestinationArn *string `field:"required" json:"apiDestinationArn" yaml:"apiDestinationArn"` // The Connection to associate with the Api Destination. Connection IConnection `field:"required" json:"connection" yaml:"connection"` }
The properties to import an existing Api Destination.
Example:
connection := events.Connection_FromEventBusArn(this, jsii.String("Connection"), jsii.String("arn:aws:events:us-east-1:123456789012:event-bus/EventBusName"), jsii.String("arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-f3gDy9")) apiDestinationArn := "arn:aws:events:us-east-1:123456789012:api-destination/DestinationName" destination := events.ApiDestination_FromApiDestinationAttributes(this, jsii.String("Destination"), &ApiDestinationAttributes{ ApiDestinationArn: jsii.String(ApiDestinationArn), Connection: Connection, }) rule := events.NewRule(this, jsii.String("OtherRule"), &RuleProps{ Schedule: events.Schedule_Rate(awscdk.Duration_Minutes(jsii.Number(10))), Targets: []iRuleTarget{ targets.NewApiDestination(destination), }, })
type ApiDestinationProps ¶ added in v2.13.0
type ApiDestinationProps struct { // The ARN of the connection to use for the API destination. Connection IConnection `field:"required" json:"connection" yaml:"connection"` // The URL to the HTTP invocation endpoint for the API destination.. Endpoint *string `field:"required" json:"endpoint" yaml:"endpoint"` // The name for the API destination. // Default: - A unique name will be generated. // ApiDestinationName *string `field:"optional" json:"apiDestinationName" yaml:"apiDestinationName"` // A description for the API destination. // Default: - none. // Description *string `field:"optional" json:"description" yaml:"description"` // The method to use for the request to the HTTP invocation endpoint. // Default: HttpMethod.POST // HttpMethod HttpMethod `field:"optional" json:"httpMethod" yaml:"httpMethod"` // The maximum number of requests per second to send to the HTTP invocation endpoint. // Default: - Not rate limited. // RateLimitPerSecond *float64 `field:"optional" json:"rateLimitPerSecond" yaml:"rateLimitPerSecond"` }
The event API Destination properties.
Example:
connection := events.NewConnection(this, jsii.String("Connection"), &ConnectionProps{ Authorization: events.Authorization_ApiKey(jsii.String("x-api-key"), awscdk.SecretValue_SecretsManager(jsii.String("ApiSecretName"))), Description: jsii.String("Connection with API Key x-api-key"), }) destination := events.NewApiDestination(this, jsii.String("Destination"), &ApiDestinationProps{ Connection: Connection, Endpoint: jsii.String("https://example.com"), Description: jsii.String("Calling example.com with API key x-api-key"), }) rule := events.NewRule(this, jsii.String("Rule"), &RuleProps{ Schedule: events.Schedule_Rate(awscdk.Duration_Minutes(jsii.Number(1))), Targets: []iRuleTarget{ targets.NewApiDestination(destination), }, })
type Archive ¶
type Archive interface { awscdk.Resource // The ARN of the archive created. ArchiveArn() *string // The archive name. ArchiveName() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
Define an EventBridge Archive.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var detail interface{} var eventBus eventBus archive := awscdk.Aws_events.NewArchive(this, jsii.String("MyArchive"), &ArchiveProps{ EventPattern: &EventPattern{ Account: []*string{ jsii.String("account"), }, Detail: map[string]interface{}{ "detailKey": detail, }, DetailType: []*string{ jsii.String("detailType"), }, Id: []*string{ jsii.String("id"), }, Region: []*string{ jsii.String("region"), }, Resources: []*string{ jsii.String("resources"), }, Source: []*string{ jsii.String("source"), }, Time: []*string{ jsii.String("time"), }, Version: []*string{ jsii.String("version"), }, }, SourceEventBus: eventBus, // the properties below are optional ArchiveName: jsii.String("archiveName"), Description: jsii.String("description"), Retention: cdk.Duration_Minutes(jsii.Number(30)), })
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 `field:"required" json:"eventPattern" yaml:"eventPattern"` // The name of the archive. // Default: - Automatically generated. // ArchiveName *string `field:"optional" json:"archiveName" yaml:"archiveName"` // A description for the archive. // Default: - none. // Description *string `field:"optional" json:"description" yaml:"description"` // The number of days to retain events for. // // Default value is 0. If set to 0, events are retained indefinitely. // Default: - Infinite. // Retention awscdk.Duration `field:"optional" json:"retention" yaml:"retention"` // The event source associated with the archive. SourceEventBus IEventBus `field:"required" json:"sourceEventBus" yaml:"sourceEventBus"` }
The event archive properties.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var detail interface{} var eventBus eventBus archiveProps := &ArchiveProps{ EventPattern: &EventPattern{ Account: []*string{ jsii.String("account"), }, Detail: map[string]interface{}{ "detailKey": detail, }, DetailType: []*string{ jsii.String("detailType"), }, Id: []*string{ jsii.String("id"), }, Region: []*string{ jsii.String("region"), }, Resources: []*string{ jsii.String("resources"), }, Source: []*string{ jsii.String("source"), }, Time: []*string{ jsii.String("time"), }, Version: []*string{ jsii.String("version"), }, }, SourceEventBus: eventBus, // the properties below are optional ArchiveName: jsii.String("archiveName"), Description: jsii.String("description"), Retention: cdk.Duration_Minutes(jsii.Number(30)), }
type Authorization ¶ added in v2.13.0
type Authorization interface { }
Authorization type for an API Destination Connection.
Example:
connection := events.NewConnection(this, jsii.String("Connection"), &ConnectionProps{ Authorization: events.Authorization_ApiKey(jsii.String("x-api-key"), awscdk.SecretValue_SecretsManager(jsii.String("ApiSecretName"))), Description: jsii.String("Connection with API Key x-api-key"), }) destination := events.NewApiDestination(this, jsii.String("Destination"), &ApiDestinationProps{ Connection: Connection, Endpoint: jsii.String("https://example.com"), Description: jsii.String("Calling example.com with API key x-api-key"), }) rule := events.NewRule(this, jsii.String("Rule"), &RuleProps{ Schedule: events.Schedule_Rate(awscdk.Duration_Minutes(jsii.Number(1))), Targets: []iRuleTarget{ targets.NewApiDestination(destination), }, })
func Authorization_ApiKey ¶ added in v2.13.0
func Authorization_ApiKey(apiKeyName *string, apiKeyValue awscdk.SecretValue) Authorization
Use API key authorization.
API key authorization has two components: an API key name and an API key value. What these are depends on the target of your connection.
func Authorization_Basic ¶ added in v2.13.0
func Authorization_Basic(username *string, password awscdk.SecretValue) Authorization
Use username and password authorization.
func Authorization_Oauth ¶ added in v2.13.0
func Authorization_Oauth(props *OAuthAuthorizationProps) Authorization
Use OAuth authorization.
type BaseArchiveProps ¶
type BaseArchiveProps struct { // An event pattern to use to filter events sent to the archive. EventPattern *EventPattern `field:"required" json:"eventPattern" yaml:"eventPattern"` // The name of the archive. // Default: - Automatically generated. // ArchiveName *string `field:"optional" json:"archiveName" yaml:"archiveName"` // A description for the archive. // Default: - none. // Description *string `field:"optional" json:"description" yaml:"description"` // The number of days to retain events for. // // Default value is 0. If set to 0, events are retained indefinitely. // Default: - Infinite. // Retention awscdk.Duration `field:"optional" json:"retention" yaml:"retention"` }
The event archive base properties.
Example:
bus := events.NewEventBus(this, jsii.String("bus"), &EventBusProps{ EventBusName: jsii.String("MyCustomEventBus"), }) bus.archive(jsii.String("MyArchive"), &BaseArchiveProps{ ArchiveName: jsii.String("MyCustomEventBusArchive"), Description: jsii.String("MyCustomerEventBus Archive"), EventPattern: &EventPattern{ Account: []*string{ awscdk.*stack_Of(this).Account, }, }, Retention: awscdk.Duration_Days(jsii.Number(365)), })
type CfnApiDestination ¶
type CfnApiDestination interface { awscdk.CfnResource awscdk.IInspectable // The ARN of the API destination that was created by the request. AttrArn() *string // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // The ARN of the connection to use for the API destination. ConnectionArn() *string SetConnectionArn(val *string) // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // A description for the API destination to create. Description() *string SetDescription(val *string) // The method to use for the request to the HTTP invocation endpoint. HttpMethod() *string SetHttpMethod(val *string) // The URL to the HTTP invocation endpoint for the API destination. InvocationEndpoint() *string SetInvocationEndpoint(val *string) // The maximum number of requests per second to send to the HTTP invocation endpoint. InvocationRateLimitPerSecond() *float64 SetInvocationRateLimitPerSecond(val *float64) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The name for the API destination to create. Name() *string SetName(val *string) // The tree node. Node() constructs.Node // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
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) .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnApiDestination := awscdk.Aws_events.NewCfnApiDestination(this, jsii.String("MyCfnApiDestination"), &CfnApiDestinationProps{ ConnectionArn: jsii.String("connectionArn"), HttpMethod: jsii.String("httpMethod"), InvocationEndpoint: jsii.String("invocationEndpoint"), // the properties below are optional Description: jsii.String("description"), InvocationRateLimitPerSecond: jsii.Number(123), Name: jsii.String("name"), })
func NewCfnApiDestination ¶
func NewCfnApiDestination(scope constructs.Construct, id *string, props *CfnApiDestinationProps) CfnApiDestination
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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-apidestination.html#cfn-events-apidestination-connectionarn // ConnectionArn *string `field:"required" json:"connectionArn" yaml:"connectionArn"` // The method to use for the request to the HTTP invocation endpoint. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-apidestination.html#cfn-events-apidestination-httpmethod // HttpMethod *string `field:"required" json:"httpMethod" yaml:"httpMethod"` // The URL to the HTTP invocation endpoint for the API destination. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-apidestination.html#cfn-events-apidestination-invocationendpoint // InvocationEndpoint *string `field:"required" json:"invocationEndpoint" yaml:"invocationEndpoint"` // A description for the API destination to create. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-apidestination.html#cfn-events-apidestination-description // Description *string `field:"optional" json:"description" yaml:"description"` // The maximum number of requests per second to send to the HTTP invocation endpoint. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-apidestination.html#cfn-events-apidestination-invocationratelimitpersecond // InvocationRateLimitPerSecond *float64 `field:"optional" json:"invocationRateLimitPerSecond" yaml:"invocationRateLimitPerSecond"` // The name for the API destination to create. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-apidestination.html#cfn-events-apidestination-name // Name *string `field:"optional" json:"name" yaml:"name"` }
Properties for defining a `CfnApiDestination`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnApiDestinationProps := &CfnApiDestinationProps{ ConnectionArn: jsii.String("connectionArn"), HttpMethod: jsii.String("httpMethod"), InvocationEndpoint: jsii.String("invocationEndpoint"), // the properties below are optional Description: jsii.String("description"), InvocationRateLimitPerSecond: jsii.Number(123), Name: jsii.String("name"), }
type CfnArchive ¶
type CfnArchive interface { awscdk.CfnResource awscdk.IInspectable // The name for the archive to create. ArchiveName() *string SetArchiveName(val *string) // The ARN of the archive created. AttrArn() *string // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // A description for the archive. Description() *string SetDescription(val *string) // An event pattern to use to filter events sent to the archive. EventPattern() interface{} SetEventPattern(val interface{}) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The tree node. Node() constructs.Node // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The number of days to retain events for. RetentionDays() *float64 SetRetentionDays(val *float64) // The ARN of the event bus that sends events to the archive. SourceArn() *string SetSourceArn(val *string) // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
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.
> Archives and schema discovery are not supported for event buses encrypted using a customer managed key. EventBridge returns an error if: > > - You call `[CreateArchive](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_CreateArchive.html)` on an event bus set to use a customer managed key for encryption. > - You call `[CreateDiscoverer](https://docs.aws.amazon.com/eventbridge/latest/schema-reference/v1-discoverers.html#CreateDiscoverer)` on an event bus set to use a customer managed key for encryption. > - You call `[UpdatedEventBus](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_UpdatedEventBus.html)` to set a customer managed key on an event bus with an archives or schema discovery enabled. > > To enable archives or schema discovery on an event bus, choose to use an AWS owned key . For more information, see [Data encryption in EventBridge](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-encryption.html) in the *Amazon EventBridge User Guide* .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var eventPattern interface{} cfnArchive := awscdk.Aws_events.NewCfnArchive(this, jsii.String("MyCfnArchive"), &CfnArchiveProps{ SourceArn: jsii.String("sourceArn"), // the properties below are optional ArchiveName: jsii.String("archiveName"), Description: jsii.String("description"), EventPattern: eventPattern, RetentionDays: jsii.Number(123), })
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html
func NewCfnArchive ¶
func NewCfnArchive(scope constructs.Construct, id *string, props *CfnArchiveProps) CfnArchive
type CfnArchiveProps ¶
type CfnArchiveProps struct { // The ARN of the event bus that sends events to the archive. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-sourcearn // SourceArn *string `field:"required" json:"sourceArn" yaml:"sourceArn"` // The name for the archive to create. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-archivename // ArchiveName *string `field:"optional" json:"archiveName" yaml:"archiveName"` // A description for the archive. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-description // Description *string `field:"optional" json:"description" yaml:"description"` // An event pattern to use to filter events sent to the archive. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-eventpattern // EventPattern interface{} `field:"optional" json:"eventPattern" yaml:"eventPattern"` // The number of days to retain events for. // // Default value is 0. If set to 0, events are retained indefinitely // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-retentiondays // RetentionDays *float64 `field:"optional" json:"retentionDays" yaml:"retentionDays"` }
Properties for defining a `CfnArchive`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var eventPattern interface{} cfnArchiveProps := &CfnArchiveProps{ SourceArn: jsii.String("sourceArn"), // the properties below are optional ArchiveName: jsii.String("archiveName"), Description: jsii.String("description"), EventPattern: eventPattern, RetentionDays: jsii.Number(123), }
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html
type CfnConnection ¶
type CfnConnection interface { awscdk.CfnResource awscdk.IInspectable // The ARN of the connection that was created by the request. AttrArn() *string // The ARN for the secret created for the connection. AttrSecretArn() *string // The type of authorization to use for the connection. AuthorizationType() *string SetAuthorizationType(val *string) // A `CreateConnectionAuthRequestParameters` object that contains the authorization parameters to use to authorize with the endpoint. AuthParameters() interface{} SetAuthParameters(val interface{}) // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // A description for the connection to create. Description() *string SetDescription(val *string) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The name for the connection to create. Name() *string SetName(val *string) // The tree node. Node() constructs.Node // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
Creates a connection.
A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnConnection := awscdk.Aws_events.NewCfnConnection(this, jsii.String("MyCfnConnection"), &CfnConnectionProps{ AuthorizationType: jsii.String("authorizationType"), // the properties below are optional AuthParameters: &AuthParametersProperty{ ApiKeyAuthParameters: &ApiKeyAuthParametersProperty{ ApiKeyName: jsii.String("apiKeyName"), ApiKeyValue: jsii.String("apiKeyValue"), }, BasicAuthParameters: &BasicAuthParametersProperty{ Password: jsii.String("password"), Username: jsii.String("username"), }, InvocationHttpParameters: &ConnectionHttpParametersProperty{ BodyParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, HeaderParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, QueryStringParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, }, OAuthParameters: &OAuthParametersProperty{ AuthorizationEndpoint: jsii.String("authorizationEndpoint"), ClientParameters: &ClientParametersProperty{ ClientId: jsii.String("clientId"), ClientSecret: jsii.String("clientSecret"), }, HttpMethod: jsii.String("httpMethod"), // the properties below are optional OAuthHttpParameters: &ConnectionHttpParametersProperty{ BodyParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, HeaderParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, QueryStringParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, }, }, }, Description: jsii.String("description"), Name: jsii.String("name"), })
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-connection.html
func NewCfnConnection ¶
func NewCfnConnection(scope constructs.Construct, id *string, props *CfnConnectionProps) CfnConnection
type CfnConnectionProps ¶
type CfnConnectionProps struct { // The type of authorization to use for the connection. // // > OAUTH tokens are refreshed when a 401 or 407 response is returned. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-connection.html#cfn-events-connection-authorizationtype // AuthorizationType *string `field:"required" json:"authorizationType" yaml:"authorizationType"` // A `CreateConnectionAuthRequestParameters` object that contains the authorization parameters to use to authorize with the endpoint. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-connection.html#cfn-events-connection-authparameters // AuthParameters interface{} `field:"optional" json:"authParameters" yaml:"authParameters"` // A description for the connection to create. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-connection.html#cfn-events-connection-description // Description *string `field:"optional" json:"description" yaml:"description"` // The name for the connection to create. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-connection.html#cfn-events-connection-name // Name *string `field:"optional" json:"name" yaml:"name"` }
Properties for defining a `CfnConnection`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnConnectionProps := &CfnConnectionProps{ AuthorizationType: jsii.String("authorizationType"), // the properties below are optional AuthParameters: &AuthParametersProperty{ ApiKeyAuthParameters: &ApiKeyAuthParametersProperty{ ApiKeyName: jsii.String("apiKeyName"), ApiKeyValue: jsii.String("apiKeyValue"), }, BasicAuthParameters: &BasicAuthParametersProperty{ Password: jsii.String("password"), Username: jsii.String("username"), }, InvocationHttpParameters: &ConnectionHttpParametersProperty{ BodyParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, HeaderParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, QueryStringParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, }, OAuthParameters: &OAuthParametersProperty{ AuthorizationEndpoint: jsii.String("authorizationEndpoint"), ClientParameters: &ClientParametersProperty{ ClientId: jsii.String("clientId"), ClientSecret: jsii.String("clientSecret"), }, HttpMethod: jsii.String("httpMethod"), // the properties below are optional OAuthHttpParameters: &ConnectionHttpParametersProperty{ BodyParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, HeaderParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, QueryStringParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, }, }, }, Description: jsii.String("description"), Name: jsii.String("name"), }
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-connection.html
type CfnConnection_ApiKeyAuthParametersProperty ¶ added in v2.15.0
type CfnConnection_ApiKeyAuthParametersProperty struct { // The name of the API key to use for authorization. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-apikeyauthparameters.html#cfn-events-connection-apikeyauthparameters-apikeyname // ApiKeyName *string `field:"required" json:"apiKeyName" yaml:"apiKeyName"` // The value for the API key to use for authorization. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-apikeyauthparameters.html#cfn-events-connection-apikeyauthparameters-apikeyvalue // ApiKeyValue *string `field:"required" json:"apiKeyValue" yaml:"apiKeyValue"` }
Contains the API key authorization parameters for the connection.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" apiKeyAuthParametersProperty := &ApiKeyAuthParametersProperty{ ApiKeyName: jsii.String("apiKeyName"), ApiKeyValue: jsii.String("apiKeyValue"), }
type CfnConnection_AuthParametersProperty ¶ added in v2.15.0
type CfnConnection_AuthParametersProperty struct { // The API Key parameters to use for authorization. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-authparameters.html#cfn-events-connection-authparameters-apikeyauthparameters // ApiKeyAuthParameters interface{} `field:"optional" json:"apiKeyAuthParameters" yaml:"apiKeyAuthParameters"` // The authorization parameters for Basic authorization. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-authparameters.html#cfn-events-connection-authparameters-basicauthparameters // BasicAuthParameters interface{} `field:"optional" json:"basicAuthParameters" yaml:"basicAuthParameters"` // Additional parameters for the connection that are passed through with every invocation to the HTTP endpoint. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-authparameters.html#cfn-events-connection-authparameters-invocationhttpparameters // InvocationHttpParameters interface{} `field:"optional" json:"invocationHttpParameters" yaml:"invocationHttpParameters"` // The OAuth parameters to use for authorization. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-authparameters.html#cfn-events-connection-authparameters-oauthparameters // OAuthParameters interface{} `field:"optional" json:"oAuthParameters" yaml:"oAuthParameters"` }
Contains the authorization parameters to use for the connection.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" authParametersProperty := &AuthParametersProperty{ ApiKeyAuthParameters: &ApiKeyAuthParametersProperty{ ApiKeyName: jsii.String("apiKeyName"), ApiKeyValue: jsii.String("apiKeyValue"), }, BasicAuthParameters: &BasicAuthParametersProperty{ Password: jsii.String("password"), Username: jsii.String("username"), }, InvocationHttpParameters: &ConnectionHttpParametersProperty{ BodyParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, HeaderParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, QueryStringParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, }, OAuthParameters: &OAuthParametersProperty{ AuthorizationEndpoint: jsii.String("authorizationEndpoint"), ClientParameters: &ClientParametersProperty{ ClientId: jsii.String("clientId"), ClientSecret: jsii.String("clientSecret"), }, HttpMethod: jsii.String("httpMethod"), // the properties below are optional OAuthHttpParameters: &ConnectionHttpParametersProperty{ BodyParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, HeaderParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, QueryStringParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, }, }, }
type CfnConnection_BasicAuthParametersProperty ¶ added in v2.15.0
type CfnConnection_BasicAuthParametersProperty struct { // The password associated with the user name to use for Basic authorization. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-basicauthparameters.html#cfn-events-connection-basicauthparameters-password // Password *string `field:"required" json:"password" yaml:"password"` // The user name to use for Basic authorization. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-basicauthparameters.html#cfn-events-connection-basicauthparameters-username // Username *string `field:"required" json:"username" yaml:"username"` }
Contains the Basic authorization parameters for the connection.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" basicAuthParametersProperty := &BasicAuthParametersProperty{ Password: jsii.String("password"), Username: jsii.String("username"), }
type CfnConnection_ClientParametersProperty ¶ added in v2.15.0
type CfnConnection_ClientParametersProperty struct { // The client ID to use for OAuth authorization. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-clientparameters.html#cfn-events-connection-clientparameters-clientid // ClientId *string `field:"required" json:"clientId" yaml:"clientId"` // The client secret assciated with the client ID to use for OAuth authorization. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-clientparameters.html#cfn-events-connection-clientparameters-clientsecret // ClientSecret *string `field:"required" json:"clientSecret" yaml:"clientSecret"` }
Contains the OAuth authorization parameters to use for the connection.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" clientParametersProperty := &ClientParametersProperty{ ClientId: jsii.String("clientId"), ClientSecret: jsii.String("clientSecret"), }
type CfnConnection_ConnectionHttpParametersProperty ¶ added in v2.15.0
type CfnConnection_ConnectionHttpParametersProperty struct { // Contains additional body string parameters for the connection. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-connectionhttpparameters.html#cfn-events-connection-connectionhttpparameters-bodyparameters // BodyParameters interface{} `field:"optional" json:"bodyParameters" yaml:"bodyParameters"` // Contains additional header parameters for the connection. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-connectionhttpparameters.html#cfn-events-connection-connectionhttpparameters-headerparameters // HeaderParameters interface{} `field:"optional" json:"headerParameters" yaml:"headerParameters"` // Contains additional query string parameters for the connection. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-connectionhttpparameters.html#cfn-events-connection-connectionhttpparameters-querystringparameters // QueryStringParameters interface{} `field:"optional" json:"queryStringParameters" yaml:"queryStringParameters"` }
Contains additional parameters for the connection.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" connectionHttpParametersProperty := &ConnectionHttpParametersProperty{ BodyParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, HeaderParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, QueryStringParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, }
type CfnConnection_OAuthParametersProperty ¶ added in v2.15.0
type CfnConnection_OAuthParametersProperty struct { // The URL to the authorization endpoint when OAuth is specified as the authorization type. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-oauthparameters.html#cfn-events-connection-oauthparameters-authorizationendpoint // AuthorizationEndpoint *string `field:"required" json:"authorizationEndpoint" yaml:"authorizationEndpoint"` // A `CreateConnectionOAuthClientRequestParameters` object that contains the client parameters for OAuth authorization. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-oauthparameters.html#cfn-events-connection-oauthparameters-clientparameters // ClientParameters interface{} `field:"required" json:"clientParameters" yaml:"clientParameters"` // The method to use for the authorization request. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-oauthparameters.html#cfn-events-connection-oauthparameters-httpmethod // HttpMethod *string `field:"required" json:"httpMethod" yaml:"httpMethod"` // A `ConnectionHttpParameters` object that contains details about the additional parameters to use for the connection. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-oauthparameters.html#cfn-events-connection-oauthparameters-oauthhttpparameters // OAuthHttpParameters interface{} `field:"optional" json:"oAuthHttpParameters" yaml:"oAuthHttpParameters"` }
Contains the OAuth authorization parameters to use for the connection.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" oAuthParametersProperty := &OAuthParametersProperty{ AuthorizationEndpoint: jsii.String("authorizationEndpoint"), ClientParameters: &ClientParametersProperty{ ClientId: jsii.String("clientId"), ClientSecret: jsii.String("clientSecret"), }, HttpMethod: jsii.String("httpMethod"), // the properties below are optional OAuthHttpParameters: &ConnectionHttpParametersProperty{ BodyParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, HeaderParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, QueryStringParameters: []interface{}{ &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }, }, }, }
type CfnConnection_ParameterProperty ¶ added in v2.15.0
type CfnConnection_ParameterProperty struct { // The key for a query string parameter. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-parameter.html#cfn-events-connection-parameter-key // Key *string `field:"required" json:"key" yaml:"key"` // The value associated with the key for the query string parameter. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-parameter.html#cfn-events-connection-parameter-value // Value *string `field:"required" json:"value" yaml:"value"` // Specifies whether the value is secret. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-parameter.html#cfn-events-connection-parameter-isvaluesecret // IsValueSecret interface{} `field:"optional" json:"isValueSecret" yaml:"isValueSecret"` }
Additional query string parameter for the connection.
You can include up to 100 additional query string parameters per request. Each additional parameter counts towards the event payload size, which cannot exceed 64 KB.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" parameterProperty := &ParameterProperty{ Key: jsii.String("key"), Value: jsii.String("value"), // the properties below are optional IsValueSecret: jsii.Boolean(false), }
type CfnEndpoint ¶ added in v2.21.0
type CfnEndpoint interface { awscdk.CfnResource awscdk.IInspectable // The ARN of the endpoint. AttrArn() *string // The ID of the endpoint. AttrEndpointId() *string // The URL of the endpoint. AttrEndpointUrl() *string // The main Region of the endpoint. AttrState() *string // The reason the endpoint is in its current state. AttrStateReason() *string // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // A description for the endpoint. Description() *string SetDescription(val *string) // The event buses being used by the endpoint. EventBuses() interface{} SetEventBuses(val interface{}) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The name of the endpoint. Name() *string SetName(val *string) // The tree node. Node() constructs.Node // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // Whether event replication was enabled or disabled for this endpoint. ReplicationConfig() interface{} SetReplicationConfig(val interface{}) // The ARN of the role used by event replication for the endpoint. RoleArn() *string SetRoleArn(val *string) // The routing configuration of the endpoint. RoutingConfig() interface{} SetRoutingConfig(val interface{}) // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
A global endpoint used to improve your application's availability by making it regional-fault tolerant.
For more information about global endpoints, see [Making applications Regional-fault tolerant with global endpoints and event replication](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html) in the **Amazon EventBridge User Guide** .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnEndpoint := awscdk.Aws_events.NewCfnEndpoint(this, jsii.String("MyCfnEndpoint"), &CfnEndpointProps{ EventBuses: []interface{}{ &EndpointEventBusProperty{ EventBusArn: jsii.String("eventBusArn"), }, }, RoutingConfig: &RoutingConfigProperty{ FailoverConfig: &FailoverConfigProperty{ Primary: &PrimaryProperty{ HealthCheck: jsii.String("healthCheck"), }, Secondary: &SecondaryProperty{ Route: jsii.String("route"), }, }, }, // the properties below are optional Description: jsii.String("description"), Name: jsii.String("name"), ReplicationConfig: &ReplicationConfigProperty{ State: jsii.String("state"), }, RoleArn: jsii.String("roleArn"), })
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-endpoint.html
func NewCfnEndpoint ¶ added in v2.21.0
func NewCfnEndpoint(scope constructs.Construct, id *string, props *CfnEndpointProps) CfnEndpoint
type CfnEndpointProps ¶ added in v2.21.0
type CfnEndpointProps struct { // The event buses being used by the endpoint. // // *Exactly* : `2`. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-endpoint.html#cfn-events-endpoint-eventbuses // EventBuses interface{} `field:"required" json:"eventBuses" yaml:"eventBuses"` // The routing configuration of the endpoint. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-endpoint.html#cfn-events-endpoint-routingconfig // RoutingConfig interface{} `field:"required" json:"routingConfig" yaml:"routingConfig"` // A description for the endpoint. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-endpoint.html#cfn-events-endpoint-description // Description *string `field:"optional" json:"description" yaml:"description"` // The name of the endpoint. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-endpoint.html#cfn-events-endpoint-name // Name *string `field:"optional" json:"name" yaml:"name"` // Whether event replication was enabled or disabled for this endpoint. // // The default state is `ENABLED` which means you must supply a `RoleArn` . If you don't have a `RoleArn` or you don't want event replication enabled, set the state to `DISABLED` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-endpoint.html#cfn-events-endpoint-replicationconfig // ReplicationConfig interface{} `field:"optional" json:"replicationConfig" yaml:"replicationConfig"` // The ARN of the role used by event replication for the endpoint. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-endpoint.html#cfn-events-endpoint-rolearn // RoleArn *string `field:"optional" json:"roleArn" yaml:"roleArn"` }
Properties for defining a `CfnEndpoint`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnEndpointProps := &CfnEndpointProps{ EventBuses: []interface{}{ &EndpointEventBusProperty{ EventBusArn: jsii.String("eventBusArn"), }, }, RoutingConfig: &RoutingConfigProperty{ FailoverConfig: &FailoverConfigProperty{ Primary: &PrimaryProperty{ HealthCheck: jsii.String("healthCheck"), }, Secondary: &SecondaryProperty{ Route: jsii.String("route"), }, }, }, // the properties below are optional Description: jsii.String("description"), Name: jsii.String("name"), ReplicationConfig: &ReplicationConfigProperty{ State: jsii.String("state"), }, RoleArn: jsii.String("roleArn"), }
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-endpoint.html
type CfnEndpoint_EndpointEventBusProperty ¶ added in v2.21.0
type CfnEndpoint_EndpointEventBusProperty struct { // The ARN of the event bus the endpoint is associated with. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-endpoint-endpointeventbus.html#cfn-events-endpoint-endpointeventbus-eventbusarn // EventBusArn *string `field:"required" json:"eventBusArn" yaml:"eventBusArn"` }
The event buses the endpoint is associated with.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" endpointEventBusProperty := &EndpointEventBusProperty{ EventBusArn: jsii.String("eventBusArn"), }
type CfnEndpoint_FailoverConfigProperty ¶ added in v2.21.0
type CfnEndpoint_FailoverConfigProperty struct { // The main Region of the endpoint. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-endpoint-failoverconfig.html#cfn-events-endpoint-failoverconfig-primary // Primary interface{} `field:"required" json:"primary" yaml:"primary"` // The Region that events are routed to when failover is triggered or event replication is enabled. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-endpoint-failoverconfig.html#cfn-events-endpoint-failoverconfig-secondary // Secondary interface{} `field:"required" json:"secondary" yaml:"secondary"` }
The failover configuration for an endpoint.
This includes what triggers failover and what happens when it's triggered.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" failoverConfigProperty := &FailoverConfigProperty{ Primary: &PrimaryProperty{ HealthCheck: jsii.String("healthCheck"), }, Secondary: &SecondaryProperty{ Route: jsii.String("route"), }, }
type CfnEndpoint_PrimaryProperty ¶ added in v2.21.0
type CfnEndpoint_PrimaryProperty struct { // The ARN of the health check used by the endpoint to determine whether failover is triggered. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-endpoint-primary.html#cfn-events-endpoint-primary-healthcheck // HealthCheck *string `field:"required" json:"healthCheck" yaml:"healthCheck"` }
The primary Region of the endpoint.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" primaryProperty := &PrimaryProperty{ HealthCheck: jsii.String("healthCheck"), }
type CfnEndpoint_ReplicationConfigProperty ¶ added in v2.21.0
type CfnEndpoint_ReplicationConfigProperty struct { // The state of event replication. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-endpoint-replicationconfig.html#cfn-events-endpoint-replicationconfig-state // State *string `field:"required" json:"state" yaml:"state"` }
Endpoints can replicate all events to the secondary Region.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" replicationConfigProperty := &ReplicationConfigProperty{ State: jsii.String("state"), }
type CfnEndpoint_RoutingConfigProperty ¶ added in v2.21.0
type CfnEndpoint_RoutingConfigProperty struct { // The failover configuration for an endpoint. // // This includes what triggers failover and what happens when it's triggered. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-endpoint-routingconfig.html#cfn-events-endpoint-routingconfig-failoverconfig // FailoverConfig interface{} `field:"required" json:"failoverConfig" yaml:"failoverConfig"` }
The routing configuration of the endpoint.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" routingConfigProperty := &RoutingConfigProperty{ FailoverConfig: &FailoverConfigProperty{ Primary: &PrimaryProperty{ HealthCheck: jsii.String("healthCheck"), }, Secondary: &SecondaryProperty{ Route: jsii.String("route"), }, }, }
type CfnEndpoint_SecondaryProperty ¶ added in v2.21.0
type CfnEndpoint_SecondaryProperty struct { // Defines the secondary Region. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-endpoint-secondary.html#cfn-events-endpoint-secondary-route // Route *string `field:"required" json:"route" yaml:"route"` }
The secondary Region that processes events when failover is triggered or replication is enabled.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" secondaryProperty := &SecondaryProperty{ Route: jsii.String("route"), }
type CfnEventBus ¶
type CfnEventBus interface { awscdk.CfnResource awscdk.IInspectable awscdk.ITaggableV2 // The ARN of the event bus, such as `arn:aws:events:us-east-2:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1` . AttrArn() *string // The name of the event bus, such as `PartnerName/acct1/repo1` . AttrName() *string AttrPolicy() *string // Tag Manager which manages the tags for this resource. CdkTagManager() awscdk.TagManager // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // Dead Letter Queue for the event bus. DeadLetterConfig() interface{} SetDeadLetterConfig(val interface{}) // The description of the event bus. Description() *string SetDescription(val *string) // 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 SetEventSourceName(val *string) // Kms Key Identifier used to encrypt events at rest in the event bus. KmsKeyIdentifier() *string SetKmsKeyIdentifier(val *string) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The name of the new event bus. Name() *string SetName(val *string) // The tree node. Node() constructs.Node // The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus. Policy() interface{} SetPolicy(val interface{}) // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Tags to associate with the event bus. Tags() *[]*awscdk.CfnTag SetTags(val *[]*awscdk.CfnTag) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
Specifies an 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.
> As an aid to help you jumpstart developing CloudFormation templates, the EventBridge console enables you to create templates from the existing event buses in your account. For more information, see [Generating CloudFormation templates from an EventBridge event bus](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-generate-event-bus-template.html) in the *Amazon EventBridge User Guide* .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var policy interface{} cfnEventBus := awscdk.Aws_events.NewCfnEventBus(this, jsii.String("MyCfnEventBus"), &CfnEventBusProps{ Name: jsii.String("name"), // the properties below are optional DeadLetterConfig: &DeadLetterConfigProperty{ Arn: jsii.String("arn"), }, Description: jsii.String("description"), EventSourceName: jsii.String("eventSourceName"), KmsKeyIdentifier: jsii.String("kmsKeyIdentifier"), Policy: policy, Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, })
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html
func NewCfnEventBus ¶
func NewCfnEventBus(scope constructs.Construct, id *string, props *CfnEventBusProps) CfnEventBus
type CfnEventBusPolicy ¶
type CfnEventBusPolicy interface { awscdk.CfnResource awscdk.IInspectable // The action that you are enabling the other account to perform. Action() *string SetAction(val *string) AttrId() *string // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // 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. Condition() interface{} SetCondition(val interface{}) // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // The name of the event bus associated with the rule. EventBusName() *string SetEventBusName(val *string) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The tree node. Node() constructs.Node // The 12-digit AWS account ID that you are permitting to put events to your default event bus. Principal() *string SetPrincipal(val *string) // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // A JSON string that describes the permission policy statement. Statement() interface{} SetStatement(val interface{}) // An identifier string for the external account that you are granting permissions to. StatementId() *string SetStatementId(val *string) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
Running `PutPermission` permits the specified AWS account or AWS organization to put events to the specified *event bus* .
Amazon EventBridge 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var statement interface{} cfnEventBusPolicy := awscdk.Aws_events.NewCfnEventBusPolicy(this, jsii.String("MyCfnEventBusPolicy"), &CfnEventBusPolicyProps{ StatementId: jsii.String("statementId"), // the properties below are optional Action: jsii.String("action"), Condition: &ConditionProperty{ Key: jsii.String("key"), Type: jsii.String("type"), Value: jsii.String("value"), }, EventBusName: jsii.String("eventBusName"), Principal: jsii.String("principal"), Statement: statement, })
func NewCfnEventBusPolicy ¶
func NewCfnEventBusPolicy(scope constructs.Construct, id *string, props *CfnEventBusPolicyProps) CfnEventBusPolicy
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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbuspolicy.html#cfn-events-eventbuspolicy-statementid // StatementId *string `field:"required" json:"statementId" yaml:"statementId"` // The action that you are enabling the other account to perform. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbuspolicy.html#cfn-events-eventbuspolicy-action // Action *string `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbuspolicy.html#cfn-events-eventbuspolicy-condition // Condition interface{} `field:"optional" json:"condition" yaml:"condition"` // The name of the event bus associated with the rule. // // If you omit this, the default event bus is used. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbuspolicy.html#cfn-events-eventbuspolicy-eventbusname // EventBusName *string `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbuspolicy.html#cfn-events-eventbuspolicy-principal // Principal *string `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbuspolicy.html#cfn-events-eventbuspolicy-statement // Statement interface{} `field:"optional" json:"statement" yaml:"statement"` }
Properties for defining a `CfnEventBusPolicy`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var statement interface{} cfnEventBusPolicyProps := &CfnEventBusPolicyProps{ StatementId: jsii.String("statementId"), // the properties below are optional Action: jsii.String("action"), Condition: &ConditionProperty{ Key: jsii.String("key"), Type: jsii.String("type"), Value: jsii.String("value"), }, EventBusName: jsii.String("eventBusName"), Principal: jsii.String("principal"), Statement: statement, }
type CfnEventBusPolicy_ConditionProperty ¶
type CfnEventBusPolicy_ConditionProperty struct { // Specifies the key for the condition. // // Currently the only supported key is `aws:PrincipalOrgID` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-eventbuspolicy-condition.html#cfn-events-eventbuspolicy-condition-key // Key *string `field:"optional" json:"key" yaml:"key"` // Specifies the type of condition. // // Currently the only supported value is `StringEquals` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-eventbuspolicy-condition.html#cfn-events-eventbuspolicy-condition-type // Type *string `field:"optional" json:"type" yaml:"type"` // Specifies the value for the key. // // Currently, this must be the ID of the organization. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-eventbuspolicy-condition.html#cfn-events-eventbuspolicy-condition-value // Value *string `field:"optional" 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"}'`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" conditionProperty := &ConditionProperty{ Key: jsii.String("key"), Type: jsii.String("type"), Value: jsii.String("value"), }
type CfnEventBusProps ¶
type CfnEventBusProps struct { // The name of the new event bus. // // Custom event bus names can't contain the `/` character, but you can use the `/` character in partner event bus names. In addition, for partner event buses, the name must exactly match the name of the partner event source that this event bus is matched to. // // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-name // Name *string `field:"required" json:"name" yaml:"name"` // Dead Letter Queue for the event bus. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-deadletterconfig // DeadLetterConfig interface{} `field:"optional" json:"deadLetterConfig" yaml:"deadLetterConfig"` // The description of the event bus. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-description // Description *string `field:"optional" json:"description" yaml:"description"` // If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-eventsourcename // EventSourceName *string `field:"optional" json:"eventSourceName" yaml:"eventSourceName"` // Kms Key Identifier used to encrypt events at rest in the event bus. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-kmskeyidentifier // KmsKeyIdentifier *string `field:"optional" json:"kmsKeyIdentifier" yaml:"kmsKeyIdentifier"` // The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-policy // Policy interface{} `field:"optional" json:"policy" yaml:"policy"` // Tags to associate with the event bus. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html#cfn-events-eventbus-tags // Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnEventBus`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var policy interface{} cfnEventBusProps := &CfnEventBusProps{ Name: jsii.String("name"), // the properties below are optional DeadLetterConfig: &DeadLetterConfigProperty{ Arn: jsii.String("arn"), }, Description: jsii.String("description"), EventSourceName: jsii.String("eventSourceName"), KmsKeyIdentifier: jsii.String("kmsKeyIdentifier"), Policy: policy, Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, }
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html
type CfnEventBus_DeadLetterConfigProperty ¶ added in v2.143.0
type CfnEventBus_DeadLetterConfigProperty struct { // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-eventbus-deadletterconfig.html#cfn-events-eventbus-deadletterconfig-arn // Arn *string `field:"optional" json:"arn" yaml:"arn"` }
Dead Letter Queue for the event bus.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" deadLetterConfigProperty := &DeadLetterConfigProperty{ Arn: jsii.String("arn"), }
type CfnRule ¶
type CfnRule interface { awscdk.CfnResource awscdk.IInspectable // The ARN of the rule, such as `arn:aws:events:us-east-2:123456789012:rule/example` . AttrArn() *string // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // The description of the rule. Description() *string SetDescription(val *string) // The name or ARN of the event bus associated with the rule. EventBusName() *string SetEventBusName(val *string) // The event pattern of the rule. EventPattern() interface{} SetEventPattern(val interface{}) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The name of the rule. Name() *string SetName(val *string) // The tree node. Node() constructs.Node // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The Amazon Resource Name (ARN) of the role that is used for target invocation. RoleArn() *string SetRoleArn(val *string) // The scheduling expression. ScheduleExpression() *string SetScheduleExpression(val *string) // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // The state of the rule. State() *string SetState(val *string) // Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule. Targets() interface{} SetTargets(val interface{}) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
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) .
> As an aid to help you jumpstart developing CloudFormation templates, the EventBridge console enables you to create templates from the existing rules in your account. For more information, see [Generating CloudFormation templates from an EventBridge rule](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-generate-template.html) in the *Amazon EventBridge User Guide* .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var eventPattern interface{} cfnRule := awscdk.Aws_events.NewCfnRule(this, jsii.String("MyCfnRule"), &CfnRuleProps{ Description: jsii.String("description"), EventBusName: jsii.String("eventBusName"), EventPattern: eventPattern, Name: jsii.String("name"), RoleArn: jsii.String("roleArn"), ScheduleExpression: jsii.String("scheduleExpression"), State: jsii.String("state"), Targets: []interface{}{ &TargetProperty{ Arn: jsii.String("arn"), Id: jsii.String("id"), // the properties below are optional AppSyncParameters: &AppSyncParametersProperty{ GraphQlOperation: jsii.String("graphQlOperation"), }, BatchParameters: &BatchParametersProperty{ JobDefinition: jsii.String("jobDefinition"), JobName: jsii.String("jobName"), // the properties below are optional ArrayProperties: &BatchArrayPropertiesProperty{ Size: jsii.Number(123), }, RetryStrategy: &BatchRetryStrategyProperty{ Attempts: jsii.Number(123), }, }, DeadLetterConfig: &DeadLetterConfigProperty{ Arn: jsii.String("arn"), }, EcsParameters: &EcsParametersProperty{ TaskDefinitionArn: jsii.String("taskDefinitionArn"), // the properties below are optional CapacityProviderStrategy: []interface{}{ &CapacityProviderStrategyItemProperty{ CapacityProvider: jsii.String("capacityProvider"), // the properties below are optional Base: jsii.Number(123), Weight: jsii.Number(123), }, }, EnableEcsManagedTags: jsii.Boolean(false), EnableExecuteCommand: jsii.Boolean(false), Group: jsii.String("group"), LaunchType: jsii.String("launchType"), NetworkConfiguration: &NetworkConfigurationProperty{ AwsVpcConfiguration: &AwsVpcConfigurationProperty{ Subnets: []*string{ jsii.String("subnets"), }, // the properties below are optional AssignPublicIp: jsii.String("assignPublicIp"), SecurityGroups: []*string{ jsii.String("securityGroups"), }, }, }, PlacementConstraints: []interface{}{ &PlacementConstraintProperty{ Expression: jsii.String("expression"), Type: jsii.String("type"), }, }, PlacementStrategies: []interface{}{ &PlacementStrategyProperty{ Field: jsii.String("field"), Type: jsii.String("type"), }, }, PlatformVersion: jsii.String("platformVersion"), PropagateTags: jsii.String("propagateTags"), ReferenceId: jsii.String("referenceId"), TagList: []interface{}{ &CfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, TaskCount: jsii.Number(123), }, HttpParameters: &HttpParametersProperty{ HeaderParameters: map[string]*string{ "headerParametersKey": jsii.String("headerParameters"), }, PathParameterValues: []*string{ jsii.String("pathParameterValues"), }, QueryStringParameters: map[string]*string{ "queryStringParametersKey": jsii.String("queryStringParameters"), }, }, Input: jsii.String("input"), InputPath: jsii.String("inputPath"), InputTransformer: &InputTransformerProperty{ InputTemplate: jsii.String("inputTemplate"), // the properties below are optional InputPathsMap: map[string]*string{ "inputPathsMapKey": jsii.String("inputPathsMap"), }, }, KinesisParameters: &KinesisParametersProperty{ PartitionKeyPath: jsii.String("partitionKeyPath"), }, RedshiftDataParameters: &RedshiftDataParametersProperty{ Database: jsii.String("database"), // the properties below are optional DbUser: jsii.String("dbUser"), SecretManagerArn: jsii.String("secretManagerArn"), Sql: jsii.String("sql"), Sqls: []*string{ jsii.String("sqls"), }, StatementName: jsii.String("statementName"), WithEvent: jsii.Boolean(false), }, RetryPolicy: &RetryPolicyProperty{ MaximumEventAgeInSeconds: jsii.Number(123), MaximumRetryAttempts: jsii.Number(123), }, RoleArn: jsii.String("roleArn"), RunCommandParameters: &RunCommandParametersProperty{ RunCommandTargets: []interface{}{ &RunCommandTargetProperty{ Key: jsii.String("key"), Values: []*string{ jsii.String("values"), }, }, }, }, SageMakerPipelineParameters: &SageMakerPipelineParametersProperty{ PipelineParameterList: []interface{}{ &SageMakerPipelineParameterProperty{ Name: jsii.String("name"), Value: jsii.String("value"), }, }, }, SqsParameters: &SqsParametersProperty{ MessageGroupId: jsii.String("messageGroupId"), }, }, }, })
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html
func NewCfnRule ¶
func NewCfnRule(scope constructs.Construct, id *string, props *CfnRuleProps) CfnRule
type CfnRuleProps ¶
type CfnRuleProps struct { // The description of the rule. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-description // Description *string `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventbusname // EventBusName *string `field:"optional" 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** . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventpattern // EventPattern interface{} `field:"optional" json:"eventPattern" yaml:"eventPattern"` // The name of the rule. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-name // Name *string `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-rolearn // RoleArn *string `field:"optional" 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) . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-scheduleexpression // ScheduleExpression *string `field:"optional" json:"scheduleExpression" yaml:"scheduleExpression"` // The state of the rule. // // Valid values include: // // - `DISABLED` : The rule is disabled. EventBridge does not match any events against the rule. // - `ENABLED` : The rule is enabled. EventBridge matches events against the rule, *except* for AWS management events delivered through CloudTrail. // - `ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS` : The rule is enabled for all events, including AWS management events delivered through CloudTrail. // // Management events provide visibility into management operations that are performed on resources in your AWS account. These are also known as control plane operations. For more information, see [Logging management events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events) in the *CloudTrail User Guide* , and [Filtering management events from AWS services](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-cloudtrail) in the **Amazon EventBridge User Guide** . // // This value is only valid for rules on the [default](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is-how-it-works-concepts.html#eb-bus-concepts-buses) event bus or [custom event buses](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-event-bus.html) . It does not apply to [partner event buses](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-saas.html) . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-state // State *string `field:"optional" 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. // // The maximum number of entries per request is 10. // // > Each rule can have up to five (5) targets associated with it at one time. // // For a list of services you can configure as targets for events, see [EventBridge targets](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-targets.html) in the **Amazon EventBridge User Guide** . // // Creating rules with built-in targets is supported only in the AWS Management Console . The built-in targets are: // // - `Amazon EBS CreateSnapshot API call` // - `Amazon EC2 RebootInstances API call` // - `Amazon EC2 StopInstances API call` // - `Amazon 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 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* . // // > If you have an IAM role on a cross-account event bus target, a `PutTargets` call without a role on the same target (same `Id` and `Arn` ) will not remove the role. // // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-targets // Targets interface{} `field:"optional" json:"targets" yaml:"targets"` }
Properties for defining a `CfnRule`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var eventPattern interface{} cfnRuleProps := &CfnRuleProps{ Description: jsii.String("description"), EventBusName: jsii.String("eventBusName"), EventPattern: eventPattern, Name: jsii.String("name"), RoleArn: jsii.String("roleArn"), ScheduleExpression: jsii.String("scheduleExpression"), State: jsii.String("state"), Targets: []interface{}{ &TargetProperty{ Arn: jsii.String("arn"), Id: jsii.String("id"), // the properties below are optional AppSyncParameters: &AppSyncParametersProperty{ GraphQlOperation: jsii.String("graphQlOperation"), }, BatchParameters: &BatchParametersProperty{ JobDefinition: jsii.String("jobDefinition"), JobName: jsii.String("jobName"), // the properties below are optional ArrayProperties: &BatchArrayPropertiesProperty{ Size: jsii.Number(123), }, RetryStrategy: &BatchRetryStrategyProperty{ Attempts: jsii.Number(123), }, }, DeadLetterConfig: &DeadLetterConfigProperty{ Arn: jsii.String("arn"), }, EcsParameters: &EcsParametersProperty{ TaskDefinitionArn: jsii.String("taskDefinitionArn"), // the properties below are optional CapacityProviderStrategy: []interface{}{ &CapacityProviderStrategyItemProperty{ CapacityProvider: jsii.String("capacityProvider"), // the properties below are optional Base: jsii.Number(123), Weight: jsii.Number(123), }, }, EnableEcsManagedTags: jsii.Boolean(false), EnableExecuteCommand: jsii.Boolean(false), Group: jsii.String("group"), LaunchType: jsii.String("launchType"), NetworkConfiguration: &NetworkConfigurationProperty{ AwsVpcConfiguration: &AwsVpcConfigurationProperty{ Subnets: []*string{ jsii.String("subnets"), }, // the properties below are optional AssignPublicIp: jsii.String("assignPublicIp"), SecurityGroups: []*string{ jsii.String("securityGroups"), }, }, }, PlacementConstraints: []interface{}{ &PlacementConstraintProperty{ Expression: jsii.String("expression"), Type: jsii.String("type"), }, }, PlacementStrategies: []interface{}{ &PlacementStrategyProperty{ Field: jsii.String("field"), Type: jsii.String("type"), }, }, PlatformVersion: jsii.String("platformVersion"), PropagateTags: jsii.String("propagateTags"), ReferenceId: jsii.String("referenceId"), TagList: []interface{}{ &CfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, TaskCount: jsii.Number(123), }, HttpParameters: &HttpParametersProperty{ HeaderParameters: map[string]*string{ "headerParametersKey": jsii.String("headerParameters"), }, PathParameterValues: []*string{ jsii.String("pathParameterValues"), }, QueryStringParameters: map[string]*string{ "queryStringParametersKey": jsii.String("queryStringParameters"), }, }, Input: jsii.String("input"), InputPath: jsii.String("inputPath"), InputTransformer: &InputTransformerProperty{ InputTemplate: jsii.String("inputTemplate"), // the properties below are optional InputPathsMap: map[string]*string{ "inputPathsMapKey": jsii.String("inputPathsMap"), }, }, KinesisParameters: &KinesisParametersProperty{ PartitionKeyPath: jsii.String("partitionKeyPath"), }, RedshiftDataParameters: &RedshiftDataParametersProperty{ Database: jsii.String("database"), // the properties below are optional DbUser: jsii.String("dbUser"), SecretManagerArn: jsii.String("secretManagerArn"), Sql: jsii.String("sql"), Sqls: []*string{ jsii.String("sqls"), }, StatementName: jsii.String("statementName"), WithEvent: jsii.Boolean(false), }, RetryPolicy: &RetryPolicyProperty{ MaximumEventAgeInSeconds: jsii.Number(123), MaximumRetryAttempts: jsii.Number(123), }, RoleArn: jsii.String("roleArn"), RunCommandParameters: &RunCommandParametersProperty{ RunCommandTargets: []interface{}{ &RunCommandTargetProperty{ Key: jsii.String("key"), Values: []*string{ jsii.String("values"), }, }, }, }, SageMakerPipelineParameters: &SageMakerPipelineParametersProperty{ PipelineParameterList: []interface{}{ &SageMakerPipelineParameterProperty{ Name: jsii.String("name"), Value: jsii.String("value"), }, }, }, SqsParameters: &SqsParametersProperty{ MessageGroupId: jsii.String("messageGroupId"), }, }, }, }
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html
type CfnRule_AppSyncParametersProperty ¶ added in v2.119.0
type CfnRule_AppSyncParametersProperty struct { // The GraphQL operation; that is, the query, mutation, or subscription to be parsed and executed by the GraphQL service. // // For more information, see [Operations](https://docs.aws.amazon.com/appsync/latest/devguide/graphql-architecture.html#graphql-operations) in the *AWS AppSync User Guide* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-appsyncparameters.html#cfn-events-rule-appsyncparameters-graphqloperation // GraphQlOperation *string `field:"required" json:"graphQlOperation" yaml:"graphQlOperation"` }
Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" appSyncParametersProperty := &AppSyncParametersProperty{ GraphQlOperation: jsii.String("graphQlOperation"), }
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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-awsvpcconfiguration.html#cfn-events-rule-awsvpcconfiguration-subnets // Subnets *[]*string `field:"required" 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` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-awsvpcconfiguration.html#cfn-events-rule-awsvpcconfiguration-assignpublicip // AssignPublicIp *string `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-awsvpcconfiguration.html#cfn-events-rule-awsvpcconfiguration-securitygroups // SecurityGroups *[]*string `field:"optional" 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" awsVpcConfigurationProperty := &AwsVpcConfigurationProperty{ Subnets: []*string{ jsii.String("subnets"), }, // the properties below are optional AssignPublicIp: jsii.String("assignPublicIp"), SecurityGroups: []*string{ jsii.String("securityGroups"), }, }
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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-batcharrayproperties.html#cfn-events-rule-batcharrayproperties-size // Size *float64 `field:"optional" 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" batchArrayPropertiesProperty := &BatchArrayPropertiesProperty{ Size: jsii.Number(123), }
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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-batchparameters.html#cfn-events-rule-batchparameters-jobdefinition // JobDefinition *string `field:"required" json:"jobDefinition" yaml:"jobDefinition"` // The name to use for this execution of the job, if the target is an AWS Batch job. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-batchparameters.html#cfn-events-rule-batchparameters-jobname // JobName *string `field:"required" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-batchparameters.html#cfn-events-rule-batchparameters-arrayproperties // ArrayProperties interface{} `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-batchparameters.html#cfn-events-rule-batchparameters-retrystrategy // RetryStrategy interface{} `field:"optional" json:"retryStrategy" yaml:"retryStrategy"` }
The custom parameters to be used when the target is an AWS Batch job.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" batchParametersProperty := &BatchParametersProperty{ JobDefinition: jsii.String("jobDefinition"), JobName: jsii.String("jobName"), // the properties below are optional ArrayProperties: &BatchArrayPropertiesProperty{ Size: jsii.Number(123), }, RetryStrategy: &BatchRetryStrategyProperty{ Attempts: jsii.Number(123), }, }
type CfnRule_BatchRetryStrategyProperty ¶
type CfnRule_BatchRetryStrategyProperty struct { // The number of times to attempt to retry, if the job fails. // // Valid values are 1–10. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-batchretrystrategy.html#cfn-events-rule-batchretrystrategy-attempts // Attempts *float64 `field:"optional" 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" batchRetryStrategyProperty := &BatchRetryStrategyProperty{ Attempts: jsii.Number(123), }
type CfnRule_CapacityProviderStrategyItemProperty ¶
type CfnRule_CapacityProviderStrategyItemProperty struct { // The short name of the capacity provider. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-capacityproviderstrategyitem.html#cfn-events-rule-capacityproviderstrategyitem-capacityprovider // CapacityProvider *string `field:"required" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-capacityproviderstrategyitem.html#cfn-events-rule-capacityproviderstrategyitem-base // Base *float64 `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-capacityproviderstrategyitem.html#cfn-events-rule-capacityproviderstrategyitem-weight // Weight *float64 `field:"optional" 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" capacityProviderStrategyItemProperty := &CapacityProviderStrategyItemProperty{ CapacityProvider: jsii.String("capacityProvider"), // the properties below are optional Base: jsii.Number(123), Weight: jsii.Number(123), }
type CfnRule_DeadLetterConfigProperty ¶
type CfnRule_DeadLetterConfigProperty struct { // The ARN of the SQS queue specified as the target for the dead-letter queue. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-deadletterconfig.html#cfn-events-rule-deadletterconfig-arn // Arn *string `field:"optional" json:"arn" yaml:"arn"` }
Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).
For more information, see [Event retry policy and using dead-letter queues](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-dlq.html) in the *EventBridge User Guide* .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" deadLetterConfigProperty := &DeadLetterConfigProperty{ Arn: jsii.String("arn"), }
type CfnRule_EcsParametersProperty ¶
type CfnRule_EcsParametersProperty struct { // The ARN of the task definition to use if the event target is an Amazon ECS task. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-taskdefinitionarn // TaskDefinitionArn *string `field:"required" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-capacityproviderstrategy // CapacityProviderStrategy interface{} `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-enableecsmanagedtags // EnableEcsManagedTags interface{} `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-enableexecutecommand // EnableExecuteCommand interface{} `field:"optional" json:"enableExecuteCommand" yaml:"enableExecuteCommand"` // Specifies an ECS task group for the task. // // The maximum length is 255 characters. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-group // Group *string `field:"optional" 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* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-launchtype // LaunchType *string `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-networkconfiguration // NetworkConfiguration interface{} `field:"optional" 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). // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-placementconstraints // PlacementConstraints interface{} `field:"optional" json:"placementConstraints" yaml:"placementConstraints"` // The placement strategy objects to use for the task. // // You can specify a maximum of five strategy rules per task. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-placementstrategies // PlacementStrategies interface{} `field:"optional" 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* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-platformversion // PlatformVersion *string `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-propagatetags // PropagateTags *string `field:"optional" json:"propagateTags" yaml:"propagateTags"` // The reference ID to use for the task. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-referenceid // ReferenceId *string `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-taglist // TagList interface{} `field:"optional" json:"tagList" yaml:"tagList"` // The number of tasks to create based on `TaskDefinition` . // // The default is 1. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html#cfn-events-rule-ecsparameters-taskcount // TaskCount *float64 `field:"optional" json:"taskCount" yaml:"taskCount"` }
The custom parameters to be used when the target is an Amazon ECS task.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" ecsParametersProperty := &EcsParametersProperty{ TaskDefinitionArn: jsii.String("taskDefinitionArn"), // the properties below are optional CapacityProviderStrategy: []interface{}{ &CapacityProviderStrategyItemProperty{ CapacityProvider: jsii.String("capacityProvider"), // the properties below are optional Base: jsii.Number(123), Weight: jsii.Number(123), }, }, EnableEcsManagedTags: jsii.Boolean(false), EnableExecuteCommand: jsii.Boolean(false), Group: jsii.String("group"), LaunchType: jsii.String("launchType"), NetworkConfiguration: &NetworkConfigurationProperty{ AwsVpcConfiguration: &AwsVpcConfigurationProperty{ Subnets: []*string{ jsii.String("subnets"), }, // the properties below are optional AssignPublicIp: jsii.String("assignPublicIp"), SecurityGroups: []*string{ jsii.String("securityGroups"), }, }, }, PlacementConstraints: []interface{}{ &PlacementConstraintProperty{ Expression: jsii.String("expression"), Type: jsii.String("type"), }, }, PlacementStrategies: []interface{}{ &PlacementStrategyProperty{ Field: jsii.String("field"), Type: jsii.String("type"), }, }, PlatformVersion: jsii.String("platformVersion"), PropagateTags: jsii.String("propagateTags"), ReferenceId: jsii.String("referenceId"), TagList: []interface{}{ &CfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, TaskCount: jsii.Number(123), }
type CfnRule_HttpParametersProperty ¶
type CfnRule_HttpParametersProperty struct { // The headers that need to be sent as part of request invoking the API Gateway API or EventBridge ApiDestination. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-httpparameters.html#cfn-events-rule-httpparameters-headerparameters // HeaderParameters interface{} `field:"optional" json:"headerParameters" yaml:"headerParameters"` // The path parameter values to be used to populate API Gateway API or EventBridge ApiDestination path wildcards ("*"). // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-httpparameters.html#cfn-events-rule-httpparameters-pathparametervalues // PathParameterValues *[]*string `field:"optional" json:"pathParameterValues" yaml:"pathParameterValues"` // The query string keys/values that need to be sent as part of request invoking the API Gateway API or EventBridge ApiDestination. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-httpparameters.html#cfn-events-rule-httpparameters-querystringparameters // QueryStringParameters interface{} `field:"optional" json:"queryStringParameters" yaml:"queryStringParameters"` }
These are custom parameter to be used when the target is an API Gateway 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" httpParametersProperty := &HttpParametersProperty{ HeaderParameters: map[string]*string{ "headerParametersKey": jsii.String("headerParameters"), }, PathParameterValues: []*string{ jsii.String("pathParameterValues"), }, QueryStringParameters: map[string]*string{ "queryStringParametersKey": jsii.String("queryStringParameters"), }, }
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* > // // 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>\""}'` // // `}`. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-inputtransformer.html#cfn-events-rule-inputtransformer-inputtemplate // InputTemplate *string `field:"required" 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 ." // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-inputtransformer.html#cfn-events-rule-inputtransformer-inputpathsmap // InputPathsMap interface{} `field:"optional" 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" inputTransformerProperty := &InputTransformerProperty{ InputTemplate: jsii.String("inputTemplate"), // the properties below are optional InputPathsMap: map[string]*string{ "inputPathsMapKey": jsii.String("inputPathsMap"), }, }
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* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-kinesisparameters.html#cfn-events-rule-kinesisparameters-partitionkeypath // PartitionKeyPath *string `field:"required" 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" kinesisParametersProperty := &KinesisParametersProperty{ PartitionKeyPath: jsii.String("partitionKeyPath"), }
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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-networkconfiguration.html#cfn-events-rule-networkconfiguration-awsvpcconfiguration // AwsVpcConfiguration interface{} `field:"optional" json:"awsVpcConfiguration" yaml:"awsVpcConfiguration"` }
This structure specifies the network configuration for an ECS task.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" networkConfigurationProperty := &NetworkConfigurationProperty{ AwsVpcConfiguration: &AwsVpcConfigurationProperty{ Subnets: []*string{ jsii.String("subnets"), }, // the properties below are optional AssignPublicIp: jsii.String("assignPublicIp"), SecurityGroups: []*string{ jsii.String("securityGroups"), }, }, }
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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-placementconstraint.html#cfn-events-rule-placementconstraint-expression // Expression *string `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-placementconstraint.html#cfn-events-rule-placementconstraint-type // Type *string `field:"optional" 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" placementConstraintProperty := &PlacementConstraintProperty{ Expression: jsii.String("expression"), Type: jsii.String("type"), }
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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-placementstrategy.html#cfn-events-rule-placementstrategy-field // Field *string `field:"optional" 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). // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-placementstrategy.html#cfn-events-rule-placementstrategy-type // Type *string `field:"optional" 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" placementStrategyProperty := &PlacementStrategyProperty{ Field: jsii.String("field"), Type: jsii.String("type"), }
type CfnRule_RedshiftDataParametersProperty ¶
type CfnRule_RedshiftDataParametersProperty struct { // The name of the database. // // Required when authenticating using temporary credentials. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-database // Database *string `field:"required" json:"database" yaml:"database"` // The database user name. // // Required when authenticating using temporary credentials. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-dbuser // DbUser *string `field:"optional" json:"dbUser" yaml:"dbUser"` // The name or ARN of the secret that enables access to the database. // // Required when authenticating using AWS Secrets Manager. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-secretmanagerarn // SecretManagerArn *string `field:"optional" json:"secretManagerArn" yaml:"secretManagerArn"` // The SQL statement text to run. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-sql // Sql *string `field:"optional" json:"sql" yaml:"sql"` // One or more SQL statements to run. // // The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-sqls // Sqls *[]*string `field:"optional" json:"sqls" yaml:"sqls"` // The name of the SQL statement. // // You can name the SQL statement when you create it to identify the query. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-statementname // StatementName *string `field:"optional" json:"statementName" yaml:"statementName"` // Indicates whether to send an event back to EventBridge after the SQL statement runs. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-redshiftdataparameters.html#cfn-events-rule-redshiftdataparameters-withevent // WithEvent interface{} `field:"optional" 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" redshiftDataParametersProperty := &RedshiftDataParametersProperty{ Database: jsii.String("database"), // the properties below are optional DbUser: jsii.String("dbUser"), SecretManagerArn: jsii.String("secretManagerArn"), Sql: jsii.String("sql"), Sqls: []*string{ jsii.String("sqls"), }, StatementName: jsii.String("statementName"), WithEvent: jsii.Boolean(false), }
type CfnRule_RetryPolicyProperty ¶
type CfnRule_RetryPolicyProperty struct { // The maximum amount of time, in seconds, to continue to make retry attempts. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-retrypolicy.html#cfn-events-rule-retrypolicy-maximumeventageinseconds // MaximumEventAgeInSeconds *float64 `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-retrypolicy.html#cfn-events-rule-retrypolicy-maximumretryattempts // MaximumRetryAttempts *float64 `field:"optional" json:"maximumRetryAttempts" yaml:"maximumRetryAttempts"` }
A `RetryPolicy` object that includes information about the retry policy settings.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" retryPolicyProperty := &RetryPolicyProperty{ MaximumEventAgeInSeconds: jsii.Number(123), MaximumRetryAttempts: jsii.Number(123), }
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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-runcommandparameters.html#cfn-events-rule-runcommandparameters-runcommandtargets // RunCommandTargets interface{} `field:"required" 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" runCommandParametersProperty := &RunCommandParametersProperty{ RunCommandTargets: []interface{}{ &RunCommandTargetProperty{ Key: jsii.String("key"), Values: []*string{ jsii.String("values"), }, }, }, }
type CfnRule_RunCommandTargetProperty ¶
type CfnRule_RunCommandTargetProperty struct { // Can be either `tag:` *tag-key* or `InstanceIds` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-runcommandtarget.html#cfn-events-rule-runcommandtarget-key // Key *string `field:"required" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-runcommandtarget.html#cfn-events-rule-runcommandtarget-values // Values *[]*string `field:"required" 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" runCommandTargetProperty := &RunCommandTargetProperty{ Key: jsii.String("key"), Values: []*string{ jsii.String("values"), }, }
type CfnRule_SageMakerPipelineParameterProperty ¶ added in v2.11.0
type CfnRule_SageMakerPipelineParameterProperty struct { // Name of parameter to start execution of a SageMaker Model Building Pipeline. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-sagemakerpipelineparameter.html#cfn-events-rule-sagemakerpipelineparameter-name // Name *string `field:"required" json:"name" yaml:"name"` // Value of parameter to start execution of a SageMaker Model Building Pipeline. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-sagemakerpipelineparameter.html#cfn-events-rule-sagemakerpipelineparameter-value // Value *string `field:"required" json:"value" yaml:"value"` }
Name/Value pair of a parameter to start execution of a SageMaker Model Building Pipeline.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" sageMakerPipelineParameterProperty := &SageMakerPipelineParameterProperty{ Name: jsii.String("name"), Value: jsii.String("value"), }
type CfnRule_SageMakerPipelineParametersProperty ¶ added in v2.11.0
type CfnRule_SageMakerPipelineParametersProperty struct { // List of Parameter names and values for SageMaker Model Building Pipeline execution. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-sagemakerpipelineparameters.html#cfn-events-rule-sagemakerpipelineparameters-pipelineparameterlist // PipelineParameterList interface{} `field:"optional" json:"pipelineParameterList" yaml:"pipelineParameterList"` }
These are custom parameters to use when the target is a SageMaker Model Building Pipeline that starts based on EventBridge events.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" sageMakerPipelineParametersProperty := &SageMakerPipelineParametersProperty{ PipelineParameterList: []interface{}{ &SageMakerPipelineParameterProperty{ Name: jsii.String("name"), Value: jsii.String("value"), }, }, }
type CfnRule_SqsParametersProperty ¶
type CfnRule_SqsParametersProperty struct { // The FIFO message group ID to use as the target. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-sqsparameters.html#cfn-events-rule-sqsparameters-messagegroupid // MessageGroupId *string `field:"required" json:"messageGroupId" yaml:"messageGroupId"` }
This structure includes the custom parameter to be used when the target is an SQS FIFO queue.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" sqsParametersProperty := &SqsParametersProperty{ MessageGroupId: jsii.String("messageGroupId"), }
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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-tag.html#cfn-events-rule-tag-key // Key *string `field:"optional" json:"key" yaml:"key"` // The value for the specified tag key. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-tag.html#cfn-events-rule-tag-value // Value *string `field:"optional" 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 .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" tagProperty := &TagProperty{ Key: jsii.String("key"), Value: jsii.String("value"), }
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-tag.html
type CfnRule_TargetProperty ¶
type CfnRule_TargetProperty struct { // The Amazon Resource Name (ARN) of the target. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-arn // Arn *string `field:"required" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-id // Id *string `field:"required" json:"id" yaml:"id"` // Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-appsyncparameters // AppSyncParameters interface{} `field:"optional" json:"appSyncParameters" yaml:"appSyncParameters"` // 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* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-batchparameters // BatchParameters interface{} `field:"optional" json:"batchParameters" yaml:"batchParameters"` // The `DeadLetterConfig` that defines the target queue to send dead-letter queue events to. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-deadletterconfig // DeadLetterConfig interface{} `field:"optional" 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* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-ecsparameters // EcsParameters interface{} `field:"optional" json:"ecsParameters" yaml:"ecsParameters"` // Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination. // // If you specify an API Gateway 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-httpparameters // HttpParameters interface{} `field:"optional" 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) . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-input // Input *string `field:"optional" 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 may use JSON dot notation or bracket notation. For more information about JSON paths, see [JSONPath](https://docs.aws.amazon.com/http://goessner.net/articles/JsonPath/) . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-inputpath // InputPath *string `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-inputtransformer // InputTransformer interface{} `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-kinesisparameters // KinesisParameters interface{} `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-redshiftdataparameters // RedshiftDataParameters interface{} `field:"optional" json:"redshiftDataParameters" yaml:"redshiftDataParameters"` // The `RetryPolicy` object that contains the retry policy configuration to use for the dead-letter queue. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy // RetryPolicy interface{} `field:"optional" 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-rolearn // RoleArn *string `field:"optional" json:"roleArn" yaml:"roleArn"` // Parameters used when you are using the rule to invoke Amazon EC2 Run Command. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-runcommandparameters // RunCommandParameters interface{} `field:"optional" json:"runCommandParameters" yaml:"runCommandParameters"` // Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building Pipeline. // // If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-sagemakerpipelineparameters // SageMakerPipelineParameters interface{} `field:"optional" json:"sageMakerPipelineParameters" yaml:"sageMakerPipelineParameters"` // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-sqsparameters // SqsParameters interface{} `field:"optional" 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* .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" targetProperty := &TargetProperty{ Arn: jsii.String("arn"), Id: jsii.String("id"), // the properties below are optional AppSyncParameters: &AppSyncParametersProperty{ GraphQlOperation: jsii.String("graphQlOperation"), }, BatchParameters: &BatchParametersProperty{ JobDefinition: jsii.String("jobDefinition"), JobName: jsii.String("jobName"), // the properties below are optional ArrayProperties: &BatchArrayPropertiesProperty{ Size: jsii.Number(123), }, RetryStrategy: &BatchRetryStrategyProperty{ Attempts: jsii.Number(123), }, }, DeadLetterConfig: &DeadLetterConfigProperty{ Arn: jsii.String("arn"), }, EcsParameters: &EcsParametersProperty{ TaskDefinitionArn: jsii.String("taskDefinitionArn"), // the properties below are optional CapacityProviderStrategy: []interface{}{ &CapacityProviderStrategyItemProperty{ CapacityProvider: jsii.String("capacityProvider"), // the properties below are optional Base: jsii.Number(123), Weight: jsii.Number(123), }, }, EnableEcsManagedTags: jsii.Boolean(false), EnableExecuteCommand: jsii.Boolean(false), Group: jsii.String("group"), LaunchType: jsii.String("launchType"), NetworkConfiguration: &NetworkConfigurationProperty{ AwsVpcConfiguration: &AwsVpcConfigurationProperty{ Subnets: []*string{ jsii.String("subnets"), }, // the properties below are optional AssignPublicIp: jsii.String("assignPublicIp"), SecurityGroups: []*string{ jsii.String("securityGroups"), }, }, }, PlacementConstraints: []interface{}{ &PlacementConstraintProperty{ Expression: jsii.String("expression"), Type: jsii.String("type"), }, }, PlacementStrategies: []interface{}{ &PlacementStrategyProperty{ Field: jsii.String("field"), Type: jsii.String("type"), }, }, PlatformVersion: jsii.String("platformVersion"), PropagateTags: jsii.String("propagateTags"), ReferenceId: jsii.String("referenceId"), TagList: []interface{}{ &CfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, TaskCount: jsii.Number(123), }, HttpParameters: &HttpParametersProperty{ HeaderParameters: map[string]*string{ "headerParametersKey": jsii.String("headerParameters"), }, PathParameterValues: []*string{ jsii.String("pathParameterValues"), }, QueryStringParameters: map[string]*string{ "queryStringParametersKey": jsii.String("queryStringParameters"), }, }, Input: jsii.String("input"), InputPath: jsii.String("inputPath"), InputTransformer: &InputTransformerProperty{ InputTemplate: jsii.String("inputTemplate"), // the properties below are optional InputPathsMap: map[string]*string{ "inputPathsMapKey": jsii.String("inputPathsMap"), }, }, KinesisParameters: &KinesisParametersProperty{ PartitionKeyPath: jsii.String("partitionKeyPath"), }, RedshiftDataParameters: &RedshiftDataParametersProperty{ Database: jsii.String("database"), // the properties below are optional DbUser: jsii.String("dbUser"), SecretManagerArn: jsii.String("secretManagerArn"), Sql: jsii.String("sql"), Sqls: []*string{ jsii.String("sqls"), }, StatementName: jsii.String("statementName"), WithEvent: jsii.Boolean(false), }, RetryPolicy: &RetryPolicyProperty{ MaximumEventAgeInSeconds: jsii.Number(123), MaximumRetryAttempts: jsii.Number(123), }, RoleArn: jsii.String("roleArn"), RunCommandParameters: &RunCommandParametersProperty{ RunCommandTargets: []interface{}{ &RunCommandTargetProperty{ Key: jsii.String("key"), Values: []*string{ jsii.String("values"), }, }, }, }, SageMakerPipelineParameters: &SageMakerPipelineParametersProperty{ PipelineParameterList: []interface{}{ &SageMakerPipelineParameterProperty{ Name: jsii.String("name"), Value: jsii.String("value"), }, }, }, SqsParameters: &SqsParametersProperty{ MessageGroupId: jsii.String("messageGroupId"), }, }
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html
type Connection ¶ added in v2.13.0
type Connection interface { awscdk.Resource IConnection // The ARN of the connection created. ConnectionArn() *string // The Name for the connection. ConnectionName() *string // The ARN for the secret created for the connection. ConnectionSecretArn() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
Define an EventBridge Connection.
Example:
connection := events.NewConnection(this, jsii.String("Connection"), &ConnectionProps{ Authorization: events.Authorization_ApiKey(jsii.String("x-api-key"), awscdk.SecretValue_SecretsManager(jsii.String("ApiSecretName"))), Description: jsii.String("Connection with API Key x-api-key"), }) destination := events.NewApiDestination(this, jsii.String("Destination"), &ApiDestinationProps{ Connection: Connection, Endpoint: jsii.String("https://example.com"), Description: jsii.String("Calling example.com with API key x-api-key"), }) rule := events.NewRule(this, jsii.String("Rule"), &RuleProps{ Schedule: events.Schedule_Rate(awscdk.Duration_Minutes(jsii.Number(1))), Targets: []iRuleTarget{ targets.NewApiDestination(destination), }, })
func NewConnection ¶ added in v2.13.0
func NewConnection(scope constructs.Construct, id *string, props *ConnectionProps) Connection
type ConnectionAttributes ¶ added in v2.13.0
type ConnectionAttributes struct { // The ARN of the connection created. ConnectionArn *string `field:"required" json:"connectionArn" yaml:"connectionArn"` // The Name for the connection. ConnectionName *string `field:"required" json:"connectionName" yaml:"connectionName"` // The ARN for the secret created for the connection. ConnectionSecretArn *string `field:"required" json:"connectionSecretArn" yaml:"connectionSecretArn"` }
Interface with properties necessary to import a reusable Connection.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" connectionAttributes := &ConnectionAttributes{ ConnectionArn: jsii.String("connectionArn"), ConnectionName: jsii.String("connectionName"), ConnectionSecretArn: jsii.String("connectionSecretArn"), }
type ConnectionProps ¶ added in v2.13.0
type ConnectionProps struct { // The authorization type for the connection. Authorization Authorization `field:"required" json:"authorization" yaml:"authorization"` // Additional string parameters to add to the invocation bodies. // Default: - No additional parameters. // BodyParameters *map[string]HttpParameter `field:"optional" json:"bodyParameters" yaml:"bodyParameters"` // The name of the connection. // Default: - A name is automatically generated. // ConnectionName *string `field:"optional" json:"connectionName" yaml:"connectionName"` // The name of the connection. // Default: - none. // Description *string `field:"optional" json:"description" yaml:"description"` // Additional string parameters to add to the invocation headers. // Default: - No additional parameters. // HeaderParameters *map[string]HttpParameter `field:"optional" json:"headerParameters" yaml:"headerParameters"` // Additional string parameters to add to the invocation query strings. // Default: - No additional parameters. // QueryStringParameters *map[string]HttpParameter `field:"optional" json:"queryStringParameters" yaml:"queryStringParameters"` }
An API Destination Connection.
A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint.
Example:
connection := events.NewConnection(this, jsii.String("Connection"), &ConnectionProps{ Authorization: events.Authorization_ApiKey(jsii.String("x-api-key"), awscdk.SecretValue_SecretsManager(jsii.String("ApiSecretName"))), Description: jsii.String("Connection with API Key x-api-key"), }) destination := events.NewApiDestination(this, jsii.String("Destination"), &ApiDestinationProps{ Connection: Connection, Endpoint: jsii.String("https://example.com"), Description: jsii.String("Calling example.com with API key x-api-key"), }) rule := events.NewRule(this, jsii.String("Rule"), &RuleProps{ Schedule: events.Schedule_Rate(awscdk.Duration_Minutes(jsii.Number(1))), Targets: []iRuleTarget{ targets.NewApiDestination(destination), }, })
type CronOptions ¶
type CronOptions struct { // The day of the month to run this rule at. // Default: - Every day of the month. // Day *string `field:"optional" json:"day" yaml:"day"` // The hour to run this rule at. // Default: - Every hour. // Hour *string `field:"optional" json:"hour" yaml:"hour"` // The minute to run this rule at. // Default: - Every minute. // Minute *string `field:"optional" json:"minute" yaml:"minute"` // The month to run this rule at. // Default: - Every month. // Month *string `field:"optional" json:"month" yaml:"month"` // The day of the week to run this rule at. // Default: - Any day of the week. // WeekDay *string `field:"optional" json:"weekDay" yaml:"weekDay"` // The year to run this rule at. // Default: - Every year. // Year *string `field:"optional" 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.
Example:
import "github.com/aws/aws-cdk-go/awscdk" import targets "github.com/aws/aws-cdk-go/awscdk" var fn function rule := events.NewRule(this, jsii.String("Schedule Rule"), &RuleProps{ Schedule: events.Schedule_Cron(&CronOptions{ Minute: jsii.String("0"), Hour: jsii.String("4"), }), }) rule.AddTarget(targets.NewLambdaFunction(fn))
See: https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions
type EventBus ¶
type EventBus interface { awscdk.Resource IEventBus // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The ARN of the event bus, such as: arn:aws:events:us-east-2:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1. EventBusArn() *string // The physical ID of this event bus resource. EventBusName() *string // The policy for the event bus in JSON form. EventBusPolicy() *string // The name of the partner event source. EventSourceName() *string // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Adds a statement to the IAM resource policy associated with this event bus. AddToResourcePolicy(statement awsiam.PolicyStatement) *awsiam.AddToResourcePolicyResult // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // 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 GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // 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 // Returns a string representation of this construct. ToString() *string }
Define an EventBridge EventBus.
Example:
bus := events.NewEventBus(this, jsii.String("bus"), &EventBusProps{ EventBusName: jsii.String("MyCustomEventBus"), }) bus.archive(jsii.String("MyArchive"), &BaseArchiveProps{ ArchiveName: jsii.String("MyCustomEventBusArchive"), Description: jsii.String("MyCustomerEventBus Archive"), EventPattern: &EventPattern{ Account: []*string{ awscdk.*stack_Of(this).Account, }, }, Retention: awscdk.Duration_Days(jsii.Number(365)), })
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 `field:"required" json:"eventBusArn" yaml:"eventBusArn"` // The physical ID of this event bus resource. EventBusName *string `field:"required" json:"eventBusName" yaml:"eventBusName"` // The JSON policy of this event bus resource. EventBusPolicy *string `field:"required" json:"eventBusPolicy" yaml:"eventBusPolicy"` // The partner event source to associate with this event bus resource. // Default: - no partner event source. // EventSourceName *string `field:"optional" json:"eventSourceName" yaml:"eventSourceName"` }
Interface with properties necessary to import a reusable EventBus.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" eventBusAttributes := &EventBusAttributes{ EventBusArn: jsii.String("eventBusArn"), EventBusName: jsii.String("eventBusName"), EventBusPolicy: jsii.String("eventBusPolicy"), // the properties below are optional EventSourceName: jsii.String("eventSourceName"), }
type EventBusPolicy ¶ added in v2.54.0
type EventBusPolicy interface { awscdk.Resource // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
The policy for an Event Bus.
Policies define the operations that are allowed on this resource.
You almost never need to define this construct directly.
All AWS resources that support resource policies have a method called `addToResourcePolicy()`, which will automatically create a new resource policy if one doesn't exist yet, otherwise it will add to the existing policy.
Prefer to use `addToResourcePolicy()` instead.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var eventBus eventBus var policyStatement policyStatement eventBusPolicy := awscdk.Aws_events.NewEventBusPolicy(this, jsii.String("MyEventBusPolicy"), &EventBusPolicyProps{ EventBus: eventBus, Statement: policyStatement, StatementId: jsii.String("statementId"), })
func NewEventBusPolicy ¶ added in v2.54.0
func NewEventBusPolicy(scope constructs.Construct, id *string, props *EventBusPolicyProps) EventBusPolicy
type EventBusPolicyProps ¶ added in v2.54.0
type EventBusPolicyProps struct { // The event bus to which the policy applies. EventBus IEventBus `field:"required" json:"eventBus" yaml:"eventBus"` // An IAM Policy Statement to apply to the Event Bus. Statement awsiam.PolicyStatement `field:"required" json:"statement" yaml:"statement"` // An identifier string for the external account that you are granting permissions to. StatementId *string `field:"required" json:"statementId" yaml:"statementId"` }
Properties to associate Event Buses with a policy.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var eventBus eventBus var policyStatement policyStatement eventBusPolicyProps := &EventBusPolicyProps{ EventBus: eventBus, Statement: policyStatement, StatementId: jsii.String("statementId"), }
type EventBusProps ¶
type EventBusProps struct { // The name of the event bus you are creating Note: If 'eventSourceName' is passed in, you cannot set this. // Default: - automatically generated name. // EventBusName *string `field:"optional" 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. // Default: - no partner event source. // EventSourceName *string `field:"optional" json:"eventSourceName" yaml:"eventSourceName"` }
Properties to define an event bus.
Example:
import events "github.com/aws/aws-cdk-go/awscdk" eventBus := events.NewEventBus(this, jsii.String("EventBus"), &EventBusProps{ EventBusName: jsii.String("DomainEvents"), }) eventEntry := &EventBridgePutEventsEntry{ EventBus: EventBus, Source: jsii.String("PetService"), Detail: awscdkscheduleralpha.ScheduleTargetInput_FromObject(map[string]*string{ "Name": jsii.String("Fluffy"), }), DetailType: jsii.String("🐶"), } awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Hours(jsii.Number(1))), Target: targets.NewEventBridgePutEvents(eventEntry, &ScheduleTargetBaseProps{ }), })
type EventCommonOptions ¶ added in v2.38.0
type EventCommonOptions struct { // The scope to use if the source of the rule and its target are in different Stacks (but in the same account & region). // // This helps dealing with cycles that often arise in these situations. // Default: - none (the main scope will be used, even for cross-stack Events). // CrossStackScope constructs.Construct `field:"optional" json:"crossStackScope" yaml:"crossStackScope"` // A description of the rule's purpose. // Default: - No description. // Description *string `field:"optional" 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 // // Default: - No additional filtering based on an event pattern. // EventPattern *EventPattern `field:"optional" json:"eventPattern" yaml:"eventPattern"` // A name for the rule. // Default: AWS CloudFormation generates a unique physical ID. // RuleName *string `field:"optional" json:"ruleName" yaml:"ruleName"` }
Common options for Events.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" import constructs "github.com/aws/constructs-go/constructs" var construct construct var detail interface{} eventCommonOptions := &EventCommonOptions{ CrossStackScope: construct, Description: jsii.String("description"), EventPattern: &EventPattern{ Account: []*string{ jsii.String("account"), }, Detail: map[string]interface{}{ "detailKey": detail, }, DetailType: []*string{ jsii.String("detailType"), }, Id: []*string{ jsii.String("id"), }, Region: []*string{ jsii.String("region"), }, Resources: []*string{ jsii.String("resources"), }, Source: []*string{ jsii.String("source"), }, Time: []*string{ jsii.String("time"), }, Version: []*string{ jsii.String("version"), }, }, RuleName: jsii.String("ruleName"), }
type EventField ¶
type EventField interface { awscdk.IResolvable // The creation stack of this resolvable which will be appended to errors thrown during resolution. // // This may return an array with a single informational element indicating how // to get this property populated, if it was skipped for performance reasons. CreationStack() *[]*string // Human readable display hint about the event pattern. DisplayHint() *string // the path to a field in the event pattern. Path() *string // Produce the Token's value at resolution time. Resolve(_ctx awscdk.IResolveContext) interface{} // Convert the path to the field in the event pattern to JSON. ToJSON() *string // Return a string representation of this resolvable object. // // Returns a reversible string representation. ToString() *string }
Represents a field in the event pattern.
Example:
import logs "github.com/aws/aws-cdk-go/awscdk" var logGroup logGroup var rule rule rule.AddTarget(targets.NewCloudWatchLogGroup(logGroup, &LogGroupProps{ LogEvent: targets.LogGroupTargetInput_FromObject(&LogGroupTargetInputOptions{ Timestamp: events.EventField_FromPath(jsii.String("$.time")), Message: events.EventField_*FromPath(jsii.String("$.detail-type")), }), }))
type EventPattern ¶
type EventPattern struct { // The 12-digit number identifying an AWS account. // Default: - No filtering on account. // Account *[]*string `field:"optional" json:"account" yaml:"account"` // A JSON object, whose content is at the discretion of the service originating the event. // Default: - No filtering on detail. // Detail *map[string]interface{} `field:"optional" 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. // Default: - No filtering on detail type. // DetailType *[]*string `field:"optional" 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. // Default: - No filtering on id. // Id *[]*string `field:"optional" json:"id" yaml:"id"` // Identifies the AWS region where the event originated. // Default: - No filtering on region. // Region *[]*string `field:"optional" 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. // Default: - No filtering on resource. // Resources *[]*string `field:"optional" 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 // // Default: - No filtering on source. // Source *[]*string `field:"optional" 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. // Default: - No filtering on time. // Time *[]*string `field:"optional" json:"time" yaml:"time"` // By default, this is set to 0 (zero) in all events. // Default: - No filtering on version. // Version *[]*string `field:"optional" 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.
For custom events, some optional properties are required. For more information, see [Minimum information needed for a valid custom event](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html#eb-custom-event).
Example:
import "github.com/aws/aws-cdk-go/awscdk" fn := lambda.NewFunction(this, jsii.String("MyFunc"), &FunctionProps{ Runtime: lambda.Runtime_NODEJS_LATEST(), Handler: jsii.String("index.handler"), Code: lambda.Code_FromInline(jsii.String("exports.handler = handler.toString()")), }) rule := events.NewRule(this, jsii.String("rule"), &RuleProps{ EventPattern: &EventPattern{ Source: []*string{ jsii.String("aws.ec2"), }, }, }) queue := sqs.NewQueue(this, jsii.String("Queue")) rule.AddTarget(targets.NewLambdaFunction(fn, &LambdaFunctionProps{ DeadLetterQueue: queue, // Optional: add a dead letter queue MaxEventAge: awscdk.Duration_Hours(jsii.Number(2)), // Optional: set the maxEventAge retry policy RetryAttempts: jsii.Number(2), }))
See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html
type HttpMethod ¶ added in v2.13.0
type HttpMethod string
Supported HTTP operations.
const ( // POST. HttpMethod_POST HttpMethod = "POST" // GET. HttpMethod_GET HttpMethod = "GET" // HEAD. HttpMethod_HEAD HttpMethod = "HEAD" // OPTIONS. HttpMethod_OPTIONS HttpMethod = "OPTIONS" // PUT. HttpMethod_PUT HttpMethod = "PUT" // PATCH. HttpMethod_PATCH HttpMethod = "PATCH" // DELETE. HttpMethod_DELETE HttpMethod = "DELETE" )
type HttpParameter ¶ added in v2.13.0
type HttpParameter interface { }
An additional HTTP parameter to send along with the OAuth request.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var secretValue secretValue httpParameter := awscdk.Aws_events.HttpParameter_FromSecret(secretValue)
func HttpParameter_FromSecret ¶ added in v2.13.0
func HttpParameter_FromSecret(value awscdk.SecretValue) HttpParameter
Make an OAuthParameter from a secret.
func HttpParameter_FromString ¶ added in v2.13.0
func HttpParameter_FromString(value *string) HttpParameter
Make an OAuthParameter from a string value.
The value is not treated as a secret.
type IApiDestination ¶ added in v2.13.0
type IApiDestination interface { awscdk.IResource // The ARN of the Api Destination created. ApiDestinationArn() *string // The Name of the Api Destination created. ApiDestinationName() *string }
Interface for API Destinations.
type IConnection ¶ added in v2.13.0
type IConnection interface { awscdk.IResource // The ARN of the connection created. ConnectionArn() *string // The Name for the connection. ConnectionName() *string // The ARN for the secret created for the connection. ConnectionSecretArn() *string }
Interface for EventBus Connections.
func Connection_FromConnectionAttributes ¶ added in v2.13.0
func Connection_FromConnectionAttributes(scope constructs.Construct, id *string, attrs *ConnectionAttributes) IConnection
Import an existing connection resource.
func Connection_FromEventBusArn ¶ added in v2.13.0
func Connection_FromEventBusArn(scope constructs.Construct, id *string, connectionArn *string, connectionSecretArn *string) IConnection
Import an existing connection resource.
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 Match ¶ added in v2.37.0
type Match interface { awscdk.IResolvable // The creation stack of this resolvable which will be appended to errors thrown during resolution. // // This may return an array with a single informational element indicating how // to get this property populated, if it was skipped for performance reasons. CreationStack() *[]*string // A representation of this matcher as a list of strings. AsList() *[]*string // Produce the Token's value at resolution time. Resolve(context awscdk.IResolveContext) interface{} // Return a string representation of this resolvable object. // // Returns a reversible string representation. ToString() *string }
An event pattern matcher.
Example:
rule := events.NewRule(this, jsii.String("rule"), &RuleProps{ EventPattern: &EventPattern{ Detail: map[string]interface{}{ "object": map[string][]*string{ // Matchers may appear at any level "size": events.Match_greaterThan(jsii.Number(1024)), }, // 'OR' condition "source-storage-class": events.Match_anyOf(events.Match_prefix(jsii.String("GLACIER")), events.Match_exactString(jsii.String("DEEP_ARCHIVE"))), }, DetailType: events.Match_EqualsIgnoreCase(jsii.String("object created")), // If you prefer, you can use a low level array of strings, as directly consumed by EventBridge Source: []*string{ jsii.String("aws.s3"), }, Region: events.Match_AnythingButPrefix(jsii.String("us-gov")), }, })
type OAuthAuthorizationProps ¶ added in v2.13.0
type OAuthAuthorizationProps struct { // The URL to the authorization endpoint. AuthorizationEndpoint *string `field:"required" json:"authorizationEndpoint" yaml:"authorizationEndpoint"` // The client ID to use for OAuth authorization for the connection. ClientId *string `field:"required" json:"clientId" yaml:"clientId"` // The client secret associated with the client ID to use for OAuth authorization for the connection. ClientSecret awscdk.SecretValue `field:"required" json:"clientSecret" yaml:"clientSecret"` // The method to use for the authorization request. // // (Can only choose POST, GET or PUT). HttpMethod HttpMethod `field:"required" json:"httpMethod" yaml:"httpMethod"` // Additional string parameters to add to the OAuth request body. // Default: - No additional parameters. // BodyParameters *map[string]HttpParameter `field:"optional" json:"bodyParameters" yaml:"bodyParameters"` // Additional string parameters to add to the OAuth request header. // Default: - No additional parameters. // HeaderParameters *map[string]HttpParameter `field:"optional" json:"headerParameters" yaml:"headerParameters"` // Additional string parameters to add to the OAuth request query string. // Default: - No additional parameters. // QueryStringParameters *map[string]HttpParameter `field:"optional" json:"queryStringParameters" yaml:"queryStringParameters"` }
Properties for `Authorization.oauth()`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var httpParameter httpParameter var secretValue secretValue oAuthAuthorizationProps := &OAuthAuthorizationProps{ AuthorizationEndpoint: jsii.String("authorizationEndpoint"), ClientId: jsii.String("clientId"), ClientSecret: secretValue, HttpMethod: awscdk.Aws_events.HttpMethod_POST, // the properties below are optional BodyParameters: map[string]*httpParameter{ "bodyParametersKey": httpParameter, }, HeaderParameters: map[string]*httpParameter{ "headerParametersKey": httpParameter, }, QueryStringParameters: map[string]*httpParameter{ "queryStringParametersKey": httpParameter, }, }
type OnEventOptions ¶
type OnEventOptions struct { // The scope to use if the source of the rule and its target are in different Stacks (but in the same account & region). // // This helps dealing with cycles that often arise in these situations. // Default: - none (the main scope will be used, even for cross-stack Events). // CrossStackScope constructs.Construct `field:"optional" json:"crossStackScope" yaml:"crossStackScope"` // A description of the rule's purpose. // Default: - No description. // Description *string `field:"optional" 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 // // Default: - No additional filtering based on an event pattern. // EventPattern *EventPattern `field:"optional" json:"eventPattern" yaml:"eventPattern"` // A name for the rule. // Default: AWS CloudFormation generates a unique physical ID. // RuleName *string `field:"optional" json:"ruleName" yaml:"ruleName"` // The target to register for the event. // Default: - No target is added to the rule. Use `addTarget()` to add a target. // Target IRuleTarget `field:"optional" json:"target" yaml:"target"` }
Standard set of options for `onXxx` event handlers on construct.
Example:
// Lambda function containing logic that evaluates compliance with the rule. evalComplianceFn := lambda.NewFunction(this, jsii.String("CustomFunction"), &FunctionProps{ Code: lambda.AssetCode_FromInline(jsii.String("exports.handler = (event) => console.log(event);")), Handler: jsii.String("index.handler"), Runtime: lambda.Runtime_NODEJS_18_X(), }) // A custom rule that runs on configuration changes of EC2 instances customRule := config.NewCustomRule(this, jsii.String("Custom"), &CustomRuleProps{ ConfigurationChanges: jsii.Boolean(true), LambdaFunction: evalComplianceFn, RuleScope: config.RuleScope_FromResource(config.ResourceType_EC2_INSTANCE()), }) // A rule to detect stack drifts driftRule := config.NewCloudFormationStackDriftDetectionCheck(this, jsii.String("Drift")) // Topic to which compliance notification events will be published complianceTopic := sns.NewTopic(this, jsii.String("ComplianceTopic")) // Send notification on compliance change events driftRule.onComplianceChange(jsii.String("ComplianceChange"), &OnEventOptions{ Target: targets.NewSnsTopic(complianceTopic), })
type Rule ¶
type Rule interface { awscdk.Resource IRule // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // 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 // The stack in which this resource is defined. Stack() awscdk.Stack // Adds an event pattern filter to this rule. // // If a pattern was already specified, // these values are merged into the existing pattern. // // For example, if the rule already contains the pattern: // // { // "resources": [ "r1" ], // "detail": { // "hello": [ 1 ] // } // } // // And `addEventPattern` is called with the pattern: // // { // "resources": [ "r2" ], // "detail": { // "foo": [ "bar" ] // } // } // // The resulting event pattern will be: // // { // "resources": [ "r1", "r2" ], // "detail": { // "hello": [ 1 ], // "foo": [ "bar" ] // } // }. AddEventPattern(eventPattern *EventPattern) // Adds a target to the rule. The abstract class RuleTarget can be extended to define new targets. // // No-op if target is undefined. AddTarget(target IRuleTarget) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string ValidateRule() *[]*string }
Defines an EventBridge Rule in this stack.
Example:
import "github.com/aws/aws-cdk-go/awscdk" fn := lambda.NewFunction(this, jsii.String("MyFunc"), &FunctionProps{ Runtime: lambda.Runtime_NODEJS_LATEST(), Handler: jsii.String("index.handler"), Code: lambda.Code_FromInline(jsii.String("exports.handler = handler.toString()")), }) rule := events.NewRule(this, jsii.String("rule"), &RuleProps{ EventPattern: &EventPattern{ Source: []*string{ jsii.String("aws.ec2"), }, }, }) queue := sqs.NewQueue(this, jsii.String("Queue")) rule.AddTarget(targets.NewLambdaFunction(fn, &LambdaFunctionProps{ DeadLetterQueue: queue, // Optional: add a dead letter queue MaxEventAge: awscdk.Duration_Hours(jsii.Number(2)), // Optional: set the maxEventAge retry policy RetryAttempts: jsii.Number(2), }))
type RuleProps ¶
type RuleProps struct { // The scope to use if the source of the rule and its target are in different Stacks (but in the same account & region). // // This helps dealing with cycles that often arise in these situations. // Default: - none (the main scope will be used, even for cross-stack Events). // CrossStackScope constructs.Construct `field:"optional" json:"crossStackScope" yaml:"crossStackScope"` // A description of the rule's purpose. // Default: - No description. // Description *string `field:"optional" 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 // // Default: - No additional filtering based on an event pattern. // EventPattern *EventPattern `field:"optional" json:"eventPattern" yaml:"eventPattern"` // A name for the rule. // Default: AWS CloudFormation generates a unique physical ID. // RuleName *string `field:"optional" json:"ruleName" yaml:"ruleName"` // Indicates whether the rule is enabled. // Default: true. // Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"` // The event bus to associate with this rule. // Default: - The default event bus. // EventBus IEventBus `field:"optional" json:"eventBus" yaml:"eventBus"` // The schedule or rate (frequency) that determines when EventBridge runs the rule. // // You must specify this property, the `eventPattern` property, or both. // // 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 // // Default: - None. // Schedule Schedule `field:"optional" 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])`. // Default: - No targets. // Targets *[]IRuleTarget `field:"optional" json:"targets" yaml:"targets"` }
Properties for defining an EventBridge Rule.
Example:
import "github.com/aws/aws-cdk-go/awscdk" fn := lambda.NewFunction(this, jsii.String("MyFunc"), &FunctionProps{ Runtime: lambda.Runtime_NODEJS_LATEST(), Handler: jsii.String("index.handler"), Code: lambda.Code_FromInline(jsii.String("exports.handler = handler.toString()")), }) rule := events.NewRule(this, jsii.String("rule"), &RuleProps{ EventPattern: &EventPattern{ Source: []*string{ jsii.String("aws.ec2"), }, }, }) queue := sqs.NewQueue(this, jsii.String("Queue")) rule.AddTarget(targets.NewLambdaFunction(fn, &LambdaFunctionProps{ DeadLetterQueue: queue, // Optional: add a dead letter queue MaxEventAge: awscdk.Duration_Hours(jsii.Number(2)), // Optional: set the maxEventAge retry policy RetryAttempts: jsii.Number(2), }))
type RuleTargetConfig ¶
type RuleTargetConfig struct { // The Amazon Resource Name (ARN) of the target. Arn *string `field:"required" json:"arn" yaml:"arn"` // Contains the GraphQL operation to be parsed and executed, if the event target is an AWS AppSync API. // Default: - None. // AppSyncParameters *CfnRule_AppSyncParametersProperty `field:"optional" json:"appSyncParameters" yaml:"appSyncParameters"` // Parameters used when the rule invokes Amazon AWS Batch Job/Queue. // Default: no parameters set. // BatchParameters *CfnRule_BatchParametersProperty `field:"optional" json:"batchParameters" yaml:"batchParameters"` // Contains information about a dead-letter queue configuration. // Default: no dead-letter queue set. // DeadLetterConfig *CfnRule_DeadLetterConfigProperty `field:"optional" 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 `field:"optional" json:"ecsParameters" yaml:"ecsParameters"` // Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination. // Default: - None. // HttpParameters *CfnRule_HttpParametersProperty `field:"optional" json:"httpParameters" yaml:"httpParameters"` // What input to send to the event target. // Default: the entire event. // Input RuleTargetInput `field:"optional" 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 `field:"optional" json:"kinesisParameters" yaml:"kinesisParameters"` // A RetryPolicy object that includes information about the retry policy settings. // Default: EventBridge default retry policy. // RetryPolicy *CfnRule_RetryPolicyProperty `field:"optional" json:"retryPolicy" yaml:"retryPolicy"` // Role to use to invoke this event target. Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command. RunCommandParameters *CfnRule_RunCommandParametersProperty `field:"optional" json:"runCommandParameters" yaml:"runCommandParameters"` // Parameters used when the FIFO sqs queue is used an event target by the rule. SqsParameters *CfnRule_SqsParametersProperty `field:"optional" 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 // // Default: the target is not backed by any resource. // TargetResource constructs.IConstruct `field:"optional" json:"targetResource" yaml:"targetResource"` }
Properties for an event rule target.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import constructs "github.com/aws/constructs-go/constructs" var construct construct var role role var ruleTargetInput ruleTargetInput ruleTargetConfig := &RuleTargetConfig{ Arn: jsii.String("arn"), // the properties below are optional AppSyncParameters: &AppSyncParametersProperty{ GraphQlOperation: jsii.String("graphQlOperation"), }, BatchParameters: &BatchParametersProperty{ JobDefinition: jsii.String("jobDefinition"), JobName: jsii.String("jobName"), // the properties below are optional ArrayProperties: &BatchArrayPropertiesProperty{ Size: jsii.Number(123), }, RetryStrategy: &BatchRetryStrategyProperty{ Attempts: jsii.Number(123), }, }, DeadLetterConfig: &DeadLetterConfigProperty{ Arn: jsii.String("arn"), }, EcsParameters: &EcsParametersProperty{ TaskDefinitionArn: jsii.String("taskDefinitionArn"), // the properties below are optional CapacityProviderStrategy: []interface{}{ &CapacityProviderStrategyItemProperty{ CapacityProvider: jsii.String("capacityProvider"), // the properties below are optional Base: jsii.Number(123), Weight: jsii.Number(123), }, }, EnableEcsManagedTags: jsii.Boolean(false), EnableExecuteCommand: jsii.Boolean(false), Group: jsii.String("group"), LaunchType: jsii.String("launchType"), NetworkConfiguration: &NetworkConfigurationProperty{ AwsVpcConfiguration: &AwsVpcConfigurationProperty{ Subnets: []*string{ jsii.String("subnets"), }, // the properties below are optional AssignPublicIp: jsii.String("assignPublicIp"), SecurityGroups: []*string{ jsii.String("securityGroups"), }, }, }, PlacementConstraints: []interface{}{ &PlacementConstraintProperty{ Expression: jsii.String("expression"), Type: jsii.String("type"), }, }, PlacementStrategies: []interface{}{ &PlacementStrategyProperty{ Field: jsii.String("field"), Type: jsii.String("type"), }, }, PlatformVersion: jsii.String("platformVersion"), PropagateTags: jsii.String("propagateTags"), ReferenceId: jsii.String("referenceId"), TagList: []interface{}{ &CfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, TaskCount: jsii.Number(123), }, HttpParameters: &HttpParametersProperty{ HeaderParameters: map[string]*string{ "headerParametersKey": jsii.String("headerParameters"), }, PathParameterValues: []*string{ jsii.String("pathParameterValues"), }, QueryStringParameters: map[string]*string{ "queryStringParametersKey": jsii.String("queryStringParameters"), }, }, Input: ruleTargetInput, KinesisParameters: &KinesisParametersProperty{ PartitionKeyPath: jsii.String("partitionKeyPath"), }, RetryPolicy: &RetryPolicyProperty{ MaximumEventAgeInSeconds: jsii.Number(123), MaximumRetryAttempts: jsii.Number(123), }, Role: role, RunCommandParameters: &RunCommandParametersProperty{ RunCommandTargets: []interface{}{ &RunCommandTargetProperty{ Key: jsii.String("key"), Values: []*string{ jsii.String("values"), }, }, }, }, SqsParameters: &SqsParametersProperty{ MessageGroupId: jsii.String("messageGroupId"), }, TargetResource: construct, }
type RuleTargetInput ¶
type RuleTargetInput interface { // Return the input properties for this input object. Bind(rule IRule) *RuleTargetInputProperties }
The input to send to the event target.
Example:
import "github.com/aws/aws-cdk-go/awscdk" api := appsync.NewGraphqlApi(this, jsii.String("api"), &GraphqlApiProps{ Name: jsii.String("api"), Definition: appsync.Definition_FromFile(jsii.String("schema.graphql")), AuthorizationConfig: &AuthorizationConfig{ DefaultAuthorization: &AuthorizationMode{ AuthorizationType: appsync.AuthorizationType_IAM, }, }, }) rule := events.NewRule(this, jsii.String("Rule"), &RuleProps{ Schedule: events.Schedule_Rate(cdk.Duration_Hours(jsii.Number(1))), }) rule.AddTarget(targets.NewAppSync(api, &AppSyncGraphQLApiProps{ GraphQLOperation: jsii.String("mutation Publish($message: String!){ publish(message: $message) { message } }"), Variables: events.RuleTargetInput_FromObject(map[string]*string{ "message": jsii.String("hello world"), }), }))
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.
The Rule Target input value will be a single string: the string you pass here. Do not use this method to pass a complex value like a JSON object to a Rule Target. Use `RuleTargetInput.fromObject()` instead.
type RuleTargetInputProperties ¶
type RuleTargetInputProperties struct { // Literal input to the target service (must be valid JSON). // Default: - input for the event target. If the input contains a paths map // values wil be extracted from event and inserted into the `inputTemplate`. // Input *string `field:"optional" json:"input" yaml:"input"` // JsonPath to take input from the input event. // Default: - None. The entire matched event is passed as input // InputPath *string `field:"optional" json:"inputPath" yaml:"inputPath"` // Paths map to extract values from event and insert into `inputTemplate`. // Default: - No values extracted from event. // InputPathsMap *map[string]*string `field:"optional" json:"inputPathsMap" yaml:"inputPathsMap"` // Input template to insert paths map into. // Default: - None. // InputTemplate *string `field:"optional" json:"inputTemplate" yaml:"inputTemplate"` }
The input properties for an event target.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" ruleTargetInputProperties := &RuleTargetInputProperties{ Input: jsii.String("input"), InputPath: jsii.String("inputPath"), InputPathsMap: map[string]*string{ "inputPathsMapKey": jsii.String("inputPathsMap"), }, InputTemplate: jsii.String("inputTemplate"), }
type Schedule ¶
type Schedule interface { // Retrieve the expression for this schedule. ExpressionString() *string }
Schedule for scheduled event rules.
Note that rates cannot be defined in fractions of minutes.
Example:
import ecs "github.com/aws/aws-cdk-go/awscdk" var cluster iCluster var taskDefinition taskDefinition rule := events.NewRule(this, jsii.String("Rule"), &RuleProps{ Schedule: events.Schedule_Rate(cdk.Duration_Hours(jsii.Number(1))), }) rule.AddTarget( targets.NewEcsTask(&EcsTaskProps{ Cluster: cluster, TaskDefinition: taskDefinition, PropagateTags: ecs.PropagatedTagSource_TASK_DEFINITION, Tags: []tag{ &tag{ Key: jsii.String("my-tag"), Value: jsii.String("my-tag-value"), }, }, }))
See: https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html
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.
Rates may be defined with any unit of time, but when converted into minutes, the duration must be a positive whole number of minutes.
Source Files ¶
- ApiDestination.go
- ApiDestinationAttributes.go
- ApiDestinationProps.go
- ApiDestination__checks.go
- Archive.go
- ArchiveProps.go
- Archive__checks.go
- Authorization.go
- Authorization__checks.go
- BaseArchiveProps.go
- CfnApiDestination.go
- CfnApiDestinationProps.go
- CfnApiDestination__checks.go
- CfnArchive.go
- CfnArchiveProps.go
- CfnArchive__checks.go
- CfnConnection.go
- CfnConnectionProps.go
- CfnConnection_ApiKeyAuthParametersProperty.go
- CfnConnection_AuthParametersProperty.go
- CfnConnection_BasicAuthParametersProperty.go
- CfnConnection_ClientParametersProperty.go
- CfnConnection_ConnectionHttpParametersProperty.go
- CfnConnection_OAuthParametersProperty.go
- CfnConnection_ParameterProperty.go
- CfnConnection__checks.go
- CfnEndpoint.go
- CfnEndpointProps.go
- CfnEndpoint_EndpointEventBusProperty.go
- CfnEndpoint_FailoverConfigProperty.go
- CfnEndpoint_PrimaryProperty.go
- CfnEndpoint_ReplicationConfigProperty.go
- CfnEndpoint_RoutingConfigProperty.go
- CfnEndpoint_SecondaryProperty.go
- CfnEndpoint__checks.go
- CfnEventBus.go
- CfnEventBusPolicy.go
- CfnEventBusPolicyProps.go
- CfnEventBusPolicy_ConditionProperty.go
- CfnEventBusPolicy__checks.go
- CfnEventBusProps.go
- CfnEventBus_DeadLetterConfigProperty.go
- CfnEventBus__checks.go
- CfnRule.go
- CfnRuleProps.go
- CfnRule_AppSyncParametersProperty.go
- CfnRule_AwsVpcConfigurationProperty.go
- CfnRule_BatchArrayPropertiesProperty.go
- CfnRule_BatchParametersProperty.go
- CfnRule_BatchRetryStrategyProperty.go
- CfnRule_CapacityProviderStrategyItemProperty.go
- CfnRule_DeadLetterConfigProperty.go
- CfnRule_EcsParametersProperty.go
- CfnRule_HttpParametersProperty.go
- CfnRule_InputTransformerProperty.go
- CfnRule_KinesisParametersProperty.go
- CfnRule_NetworkConfigurationProperty.go
- CfnRule_PlacementConstraintProperty.go
- CfnRule_PlacementStrategyProperty.go
- CfnRule_RedshiftDataParametersProperty.go
- CfnRule_RetryPolicyProperty.go
- CfnRule_RunCommandParametersProperty.go
- CfnRule_RunCommandTargetProperty.go
- CfnRule_SageMakerPipelineParameterProperty.go
- CfnRule_SageMakerPipelineParametersProperty.go
- CfnRule_SqsParametersProperty.go
- CfnRule_TagProperty.go
- CfnRule_TargetProperty.go
- CfnRule__checks.go
- Connection.go
- ConnectionAttributes.go
- ConnectionProps.go
- Connection__checks.go
- CronOptions.go
- EventBus.go
- EventBusAttributes.go
- EventBusPolicy.go
- EventBusPolicyProps.go
- EventBusPolicy__checks.go
- EventBusProps.go
- EventBus__checks.go
- EventCommonOptions.go
- EventField.go
- EventField__checks.go
- EventPattern.go
- HttpMethod.go
- HttpParameter.go
- HttpParameter__checks.go
- IApiDestination.go
- IConnection.go
- IEventBus.go
- IEventBus__checks.go
- IRule.go
- IRuleTarget.go
- IRuleTarget__checks.go
- Match.go
- Match__checks.go
- OAuthAuthorizationProps.go
- OnEventOptions.go
- Rule.go
- RuleProps.go
- RuleTargetConfig.go
- RuleTargetInput.go
- RuleTargetInputProperties.go
- RuleTargetInput__checks.go
- Rule__checks.go
- Schedule.go
- Schedule__checks.go
- main.go