Class CfnArchive

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:36.938Z") @Stability(Stable) public class CfnArchive extends CfnResource implements IInspectable
A CloudFormation AWS::Events::Archive.

Creates an archive of events with the specified settings. When you create an archive, incoming events might not immediately start being sent to the archive. Allow a short period of time for changes to take effect. If you do not specify a pattern to filter events sent to the archive, all events are sent to the archive except replayed events. Replayed events are not sent to an archive.

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();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnArchiveProps props)
      Create a new AWS::Events::Archive.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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
    • getEventPattern

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

      @Stability(Stable) public void setEventPattern(@NotNull Object value)
      An event pattern to use to filter events sent to the archive.
    • 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.
    • getRetentionDays

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

      Default value is 0. If set to 0, events are retained indefinitely

    • setRetentionDays

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

      Default value is 0. If set to 0, events are retained indefinitely