Class CfnEventSource
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.eventsv2.CfnEventSource
- All Implemented Interfaces:
IInspectable,IEventSourceRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)",
date="2026-09-30T11:04:52.400Z")
@Stability(Stable)
public class CfnEventSource
extends CfnResource
implements IInspectable, IEventSourceRef, ITaggableV2
Resource schema for AWS::EventsV2::EventSource.
A managed event source that forwards AWS service events or partner events onto a custom event bus.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.eventsv2.*;
CfnEventSource cfnEventSource = CfnEventSource.Builder.create(this, "MyCfnEventSource")
.configuration(EventSourceConfigurationProperty.builder()
.awsServiceEventsConfiguration(AwsServiceEventsConfigurationProperty.builder()
.awsService("awsService")
// the properties below are optional
.onFailureConfiguration(OnFailureConfigurationProperty.builder()
.arn("arn")
.build())
.pattern("pattern")
.build())
.partnerEventsConfiguration(PartnerEventsConfigurationProperty.builder()
.partnerEventSourceArn("partnerEventSourceArn")
// the properties below are optional
.onFailureConfiguration(OnFailureConfigurationProperty.builder()
.arn("arn")
.build())
.partnerBusKmsKeyIdentifier("partnerBusKmsKeyIdentifier")
.pattern("pattern")
.build())
.build())
.eventBusArn("eventBusArn")
.name("name")
// the properties below are optional
.description("description")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceForward a single AWS service's events from the account's default event bus.static final classA fluent builder forCfnEventSource.static interfaceEvent source configuration.static interfaceThe destination for events that could not be forwarded by the managed forwarding target or, for partner event sources, the managed partner event bus.static interfaceForward a partner event source's events through a managed partner event bus.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.eventsv2.IEventSourceRef
IEventSourceRef.Jsii$Default, IEventSourceRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnEventSource(software.amazon.jsii.JsiiObjectRef objRef) CfnEventSource(software.constructs.Construct scope, String id, CfnEventSourceProps props) Create a newAWS::EventsV2::EventSource. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForEventSource(IEventSourceRef resource) The time the event source was created, as an ISO 8601 timestamp.The Amazon Resource Name (ARN) of the event source.The time the event source was last modified, as an ISO 8601 timestamp.Whether the event bus owner has revoked this event source.The lifecycle state of the event source: CREATING, ACTIVE, UPDATING, CREATE_FAILED, UPDATE_FAILED, DELETING, or DELETE_FAILED.Tag Manager which manages the tags for this resource.Event source configuration.A description of the event source.The ARN of the custom event bus the event source forwards onto.A reference to a EventSource resource.getName()The name of the event source.getTags()The tags assigned to the event source.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnEventSource.renderProperties(Map<String, Object> props) voidsetConfiguration(IResolvable value) Event source configuration.voidEvent source configuration.voidsetDescription(String value) A description of the event source.voidsetEventBusArn(String value) The ARN of the custom event bus the event source forwards onto.voidThe name of the event source.voidThe tags assigned to the event source.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, addResourceDependency, addResourceDependency, applyCrossStackReferenceStrength, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, cfnPropertyName, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, removeDependency, removeResourceDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId, withMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnEventSource
protected CfnEventSource(software.amazon.jsii.JsiiObjectRef objRef) -
CfnEventSource
protected CfnEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnEventSource
@Stability(Stable) public CfnEventSource(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnEventSourceProps props) Create a newAWS::EventsV2::EventSource.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForEventSource
@Stability(Stable) @NotNull public static String arnForEventSource(@NotNull IEventSourceRef resource) - Parameters:
resource- This parameter is required.
-
isCfnEventSource
Checks whether the given object is a CfnEventSource.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrCreationTime
The time the event source was created, as an ISO 8601 timestamp. -
getAttrEventSourceArn
The Amazon Resource Name (ARN) of the event source.Its resource segment has the form event-sourcev2/
/ / . The type segment is set by the service (aws.service for AWS service events, aws.partner for partner events) and is not part of the event source name. The id segment is a 25-character identifier generated by the service. -
getAttrLastModifiedTime
The time the event source was last modified, as an ISO 8601 timestamp. -
getAttrRevoked
Whether the event bus owner has revoked this event source.Revocation is permanent: a revoked event source cannot be updated, but it can be deleted.
-
getAttrState
The lifecycle state of the event source: CREATING, ACTIVE, UPDATING, CREATE_FAILED, UPDATE_FAILED, DELETING, or DELETE_FAILED.Revocation by the event bus owner is reported by the Revoked property, not by the state.
-
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getCfnPropertyNames
- Overrides:
getCfnPropertyNamesin classCfnResource
-
getEventSourceRef
A reference to a EventSource resource.- Specified by:
getEventSourceRefin interfaceIEventSourceRef
-
getConfiguration
Event source configuration.Returns union: either
IResolvableorCfnEventSource.EventSourceConfigurationProperty -
setConfiguration
Event source configuration. -
setConfiguration
@Stability(Stable) public void setConfiguration(@NotNull CfnEventSource.EventSourceConfigurationProperty value) Event source configuration. -
getEventBusArn
The ARN of the custom event bus the event source forwards onto. -
setEventBusArn
The ARN of the custom event bus the event source forwards onto. -
getName
The name of the event source. -
setName
The name of the event source. -
getDescription
A description of the event source. -
setDescription
A description of the event source. -
getTags
The tags assigned to the event source. -
setTags
The tags assigned to the event source.
-