MaxCountRuleProperty Struct
Use the MaxAgeRule property type to specify a max count rule to restrict the number of application versions that 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 the oldest application version when the maximum count is exceeded.
MaxCountRule 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 maxCountRuleProperty: elasticbeanstalk.CfnApplication.MaxCountRuleProperty = {
deleteSourceFromS3: false,
enabled: false,
maxCount: 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_count_rule_property = elasticbeanstalk.CfnApplication.MaxCountRuleProperty(
delete_source_from_s3=False,
enabled=False,
max_count=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.*;
MaxCountRuleProperty maxCountRuleProperty = MaxCountRuleProperty.builder()
.deleteSourceFromS3(false)
.enabled(false)
.maxCount(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 maxCountRuleProperty = new MaxCountRuleProperty {
DeleteSourceFromS3 = false,
Enabled = false,
MaxCount = 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"
maxCountRuleProperty := &MaxCountRuleProperty{
DeleteSourceFromS3: jsii.Boolean(false),
Enabled: jsii.Boolean(false),
MaxCount: 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.
maxCountoptionalnumbermax_countoptionalint | floatmaxCountoptionalNumberMaxCountoptionaldoubleMaxCountoptional*float64 #Specify the maximum number of application versions to retain.