MaxAgeRuleProperty Struct
Use the MaxAgeRule property type to specify a max age rule to restrict the length of time that application versions are retained for an AWS Elastic Beanstalk application when defining an AWS::ElasticBeanstalk::Application resource in an AWS CloudFormation template.
A lifecycle rule that deletes application versions after the specified number of days.
MaxAgeRule is a property of the ApplicationVersionLifecycleConfig property type.
| 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_elasticbeanstalk as elasticbeanstalk } from 'aws-cdk-lib';
const maxAgeRuleProperty: elasticbeanstalk.CfnApplication.MaxAgeRuleProperty = {
deleteSourceFromS3: false,
enabled: false,
maxAgeInDays: 123,
};
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_elasticbeanstalk as elasticbeanstalk
max_age_rule_property = elasticbeanstalk.CfnApplication.MaxAgeRuleProperty(
delete_source_from_s3=False,
enabled=False,
max_age_in_days=123
)
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.elasticbeanstalk.*;
MaxAgeRuleProperty maxAgeRuleProperty = MaxAgeRuleProperty.builder()
.deleteSourceFromS3(false)
.enabled(false)
.maxAgeInDays(123)
.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.ElasticBeanstalk;
var maxAgeRuleProperty = new MaxAgeRuleProperty {
DeleteSourceFromS3 = false,
Enabled = false,
MaxAgeInDays = 123
};
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"
maxAgeRuleProperty := &MaxAgeRuleProperty{
DeleteSourceFromS3: jsii.Boolean(false),
Enabled: jsii.Boolean(false),
MaxAgeInDays: jsii.Number(123),
}
Properties
deleteSourceFromS3optionalboolean | IResolvabledelete_source_from_s3optionaltyping.Union[bool, IResolvable]deleteSourceFromS3optionalBooleanDeleteSourceFromS3optionalboolDeleteSourceFromS3optionalinterface{} #Set to `true` to delete a version's source bundle from Amazon S3 when Elastic Beanstalk deletes the application version.
enabledoptionalboolean | IResolvableenabledoptionaltyping.Union[bool, IResolvable]enabledoptionalBooleanEnabledoptionalboolEnabledoptionalinterface{} #Specify `true` to apply the rule, or `false` to disable it.
maxAgeInDaysoptionalnumbermax_age_in_daysoptionalint | floatmaxAgeInDaysoptionalNumberMaxAgeInDaysoptionaldoubleMaxAgeInDaysoptional*float64 #Specify the number of days to retain an application versions.