Class CfnInstanceEventWindow

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IInstanceEventWindowRef, 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:50.023Z") @Stability(Stable) public class CfnInstanceEventWindow extends CfnResource implements IInspectable, IInstanceEventWindowRef, ITaggableV2
Resource type definition for AWS::EC2::InstanceEventWindow.

An event window defines a recurring set of time ranges, or a cron expression, during which AWS-initiated maintenance events may be scheduled for the associated Amazon EC2 instances or Dedicated Hosts.

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.ec2.*;
 CfnInstanceEventWindow cfnInstanceEventWindow = CfnInstanceEventWindow.Builder.create(this, "MyCfnInstanceEventWindow")
         .cronExpression("cronExpression")
         .name("name")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .timeRanges(List.of(TimeRangeProperty.builder()
                 .endHour(123)
                 .endWeekDay("endWeekDay")
                 .startHour(123)
                 .startWeekDay("startWeekDay")
                 .build()))
         .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

    • CfnInstanceEventWindow

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

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

      @Stability(Stable) public CfnInstanceEventWindow(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnInstanceEventWindowProps props)
      Create a new AWS::EC2::InstanceEventWindow.

      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.
    • CfnInstanceEventWindow

      @Stability(Stable) public CfnInstanceEventWindow(@NotNull software.constructs.Construct scope, @NotNull String id)
      Create a new AWS::EC2::InstanceEventWindow.

      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.
  • Method Details

    • arnForInstanceEventWindow

      @Stability(Stable) @NotNull public static String arnForInstanceEventWindow(@NotNull IInstanceEventWindowRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnInstanceEventWindow

      @Stability(Stable) @NotNull public static Boolean isCfnInstanceEventWindow(@NotNull Object x)
      Checks whether the given object is a CfnInstanceEventWindow.

      Parameters:
      x - This parameter is required.
    • 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 Amazon Resource Name (ARN) of the event window.
    • getAttrInstanceEventWindowId

      @Stability(Stable) @NotNull public String getAttrInstanceEventWindowId()
      The ID of the event window.
    • getAttrState

      @Stability(Stable) @NotNull public String getAttrState()
      The current state of the event window.

      Observed values include creating, active, modifying, deleting and deleted.

    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

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

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getInstanceEventWindowRef

      @Stability(Stable) @NotNull public InstanceEventWindowReference getInstanceEventWindowRef()
      A reference to a InstanceEventWindow resource.
      Specified by:
      getInstanceEventWindowRef in interface IInstanceEventWindowRef
    • getCronExpression

      @Stability(Stable) @Nullable public String getCronExpression()
      The cron expression defined for the event window.
    • setCronExpression

      @Stability(Stable) public void setCronExpression(@Nullable String value)
      The cron expression defined for the event window.
    • getName

      @Stability(Stable) @Nullable public String getName()
      The name of the event window.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The name of the event window.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      The tags applied to the event window.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      The tags applied to the event window.
    • getTimeRanges

      @Stability(Stable) @Nullable public Object getTimeRanges()
      The time ranges of the event window.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnInstanceEventWindow.TimeRangeProperty>

    • setTimeRanges

      @Stability(Stable) public void setTimeRanges(@Nullable IResolvable value)
      The time ranges of the event window.
    • setTimeRanges

      @Stability(Stable) public void setTimeRanges(@Nullable List<Object> value)
      The time ranges of the event window.