CfnInstanceEventWindowProps Struct
Properties for defining a CfnInstanceEventWindow.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnInstanceEventWindowProps: ec2.CfnInstanceEventWindowProps = {
cronExpression: 'cronExpression',
name: 'name',
tags: [{
key: 'key',
value: 'value',
}],
timeRanges: [{
endHour: 123,
endWeekDay: 'endWeekDay',
startHour: 123,
startWeekDay: 'startWeekDay',
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
cfn_instance_event_window_props = ec2.CfnInstanceEventWindowProps(
cron_expression="cronExpression",
name="name",
tags=[CfnTag(
key="key",
value="value"
)],
time_ranges=[ec2.CfnInstanceEventWindow.TimeRangeProperty(
end_hour=123,
end_week_day="endWeekDay",
start_hour=123,
start_week_day="startWeekDay"
)]
)
java
// 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.*;
CfnInstanceEventWindowProps cfnInstanceEventWindowProps = CfnInstanceEventWindowProps.builder()
.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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var cfnInstanceEventWindowProps = new CfnInstanceEventWindowProps {
CronExpression = "cronExpression",
Name = "name",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TimeRanges = new [] { new TimeRangeProperty {
EndHour = 123,
EndWeekDay = "endWeekDay",
StartHour = 123,
StartWeekDay = "startWeekDay"
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// 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"
cfnInstanceEventWindowProps := &CfnInstanceEventWindowProps{
CronExpression: jsii.String("cronExpression"),
Name: jsii.String("name"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
TimeRanges: []interface{}{
&TimeRangeProperty{
EndHour: jsii.Number(123),
EndWeekDay: jsii.String("endWeekDay"),
StartHour: jsii.Number(123),
StartWeekDay: jsii.String("startWeekDay"),
},
},
}
Properties
cronExpressionoptionalstringcron_expressionoptionalstrcronExpressionoptionalStringCronExpressionoptionalstringCronExpressionoptional*string #The cron expression defined for the event window.
Exactly one of TimeRanges or CronExpression must be specified.
The name of the event window.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #The tags applied to the event window.
timeRangesoptionalIResolvable | IResolvable | CfnInstanceEventWindow.time_rangesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, TimeRangeProperty]]]timeRangesoptionalIResolvableTimeRangesoptionalIResolvableTimeRangesoptionalinterface{} #The time ranges of the event window.
Exactly one of TimeRanges or CronExpression must be specified.