Class CfnArchive

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:02.172Z") @Stability(Stable) public class CfnArchive extends CfnResource implements IInspectable
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 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 software.amazon.awscdk.services.events.*;
 Object eventPattern;
 CfnArchive cfnArchive = CfnArchive.Builder.create(this, "MyCfnArchive")
         .sourceArn("sourceArn")
         // the properties below are optional
         .archiveName("archiveName")
         .description("description")
         .eventPattern(eventPattern)
         .retentionDays(123)
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnArchive

      protected CfnArchive(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnArchive

      protected CfnArchive(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnArchive

      @Stability(Stable) public CfnArchive(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnArchiveProps props)
      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

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The ARN of the archive created.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getSourceArn

      @Stability(Stable) @NotNull public String getSourceArn()
      The ARN of the event bus that sends events to the archive.
    • setSourceArn

      @Stability(Stable) public void setSourceArn(@NotNull String value)
      The ARN of the event bus that sends events to the archive.
    • getArchiveName

      @Stability(Stable) @Nullable public String getArchiveName()
      The name for the archive to create.
    • setArchiveName

      @Stability(Stable) public void setArchiveName(@Nullable String value)
      The name for the archive to create.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description for the archive.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description for the archive.
    • getEventPattern

      @Stability(Stable) @Nullable public Object getEventPattern()
      An event pattern to use to filter events sent to the archive.
    • setEventPattern

      @Stability(Stable) public void setEventPattern(@Nullable Object value)
      An event pattern to use to filter events sent to the archive.
    • getRetentionDays

      @Stability(Stable) @Nullable public Number getRetentionDays()
      The number of days to retain events for.
    • setRetentionDays

      @Stability(Stable) public void setRetentionDays(@Nullable Number value)
      The number of days to retain events for.