DeprecateRuleProperty Struct
[Custom AMI policies only] Specifies an AMI deprecation rule for AMIs created by an AMI lifecycle policy.
For age-based schedules, you must specify Interval and IntervalUnit . For count-based schedules, you must specify Count .
| 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_dlm as dlm } from 'aws-cdk-lib';
const deprecateRuleProperty: dlm.CfnLifecyclePolicy.DeprecateRuleProperty = {
count: 123,
interval: 123,
intervalUnit: 'intervalUnit',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_dlm as dlm
deprecate_rule_property = dlm.CfnLifecyclePolicy.DeprecateRuleProperty(
count=123,
interval=123,
interval_unit="intervalUnit"
)
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.dlm.*;
DeprecateRuleProperty deprecateRuleProperty = DeprecateRuleProperty.builder()
.count(123)
.interval(123)
.intervalUnit("intervalUnit")
.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.DLM;
var deprecateRuleProperty = new DeprecateRuleProperty {
Count = 123,
Interval = 123,
IntervalUnit = "intervalUnit"
};
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"
deprecateRuleProperty := &DeprecateRuleProperty{
Count: jsii.Number(123),
Interval: jsii.Number(123),
IntervalUnit: jsii.String("intervalUnit"),
}
Properties
countoptionalnumbercountoptionalint | floatcountoptionalNumberCountoptionaldoubleCountoptional*float64 #If the schedule has a count-based retention rule, this parameter specifies the number of oldest AMIs to deprecate.
The count must be less than or equal to the schedule's retention count, and it can't be greater than 1000.
intervaloptionalnumberintervaloptionalint | floatintervaloptionalNumberIntervaloptionaldoubleIntervaloptional*float64 #If the schedule has an age-based retention rule, this parameter specifies the period after which to deprecate AMIs created by the schedule.
The period must be less than or equal to the schedule's retention period, and it can't be greater than 10 years. This is equivalent to 120 months, 520 weeks, or 3650 days.
intervalUnitoptionalstringinterval_unitoptionalstrintervalUnitoptionalStringIntervalUnitoptionalstringIntervalUnitoptional*string #The unit of time in which to measure the *Interval* .