ApplicationResourceLifecycleConfigProperty Struct
Use the ApplicationResourceLifecycleConfig property type to specify lifecycle settings for resources that belong to an AWS Elastic Beanstalk application when defining an AWS::ElasticBeanstalk::Application resource in an AWS CloudFormation template.
The resource lifecycle configuration for an application. Defines lifecycle settings for resources that belong to the application, and the service role that Elastic Beanstalk assumes in order to apply lifecycle settings. The version lifecycle configuration defines lifecycle settings for application versions.
ApplicationResourceLifecycleConfig is a property of the AWS::ElasticBeanstalk::Application resource.
| Source | |
|---|---|
| Type last changed |
Example
// 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 applicationResourceLifecycleConfigProperty: elasticbeanstalk.CfnApplication.ApplicationResourceLifecycleConfigProperty = {
serviceRole: 'serviceRole',
versionLifecycleConfig: {
maxAgeRule: {
deleteSourceFromS3: false,
enabled: false,
maxAgeInDays: 123,
},
maxCountRule: {
deleteSourceFromS3: false,
enabled: false,
maxCount: 123,
},
},
};
# 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
application_resource_lifecycle_config_property = elasticbeanstalk.CfnApplication.ApplicationResourceLifecycleConfigProperty(
service_role="serviceRole",
version_lifecycle_config=elasticbeanstalk.CfnApplication.ApplicationVersionLifecycleConfigProperty(
max_age_rule=elasticbeanstalk.CfnApplication.MaxAgeRuleProperty(
delete_source_from_s3=False,
enabled=False,
max_age_in_days=123
),
max_count_rule=elasticbeanstalk.CfnApplication.MaxCountRuleProperty(
delete_source_from_s3=False,
enabled=False,
max_count=123
)
)
)
// 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.*;
ApplicationResourceLifecycleConfigProperty applicationResourceLifecycleConfigProperty = ApplicationResourceLifecycleConfigProperty.builder()
.serviceRole("serviceRole")
.versionLifecycleConfig(ApplicationVersionLifecycleConfigProperty.builder()
.maxAgeRule(MaxAgeRuleProperty.builder()
.deleteSourceFromS3(false)
.enabled(false)
.maxAgeInDays(123)
.build())
.maxCountRule(MaxCountRuleProperty.builder()
.deleteSourceFromS3(false)
.enabled(false)
.maxCount(123)
.build())
.build())
.build();
// 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 applicationResourceLifecycleConfigProperty = new ApplicationResourceLifecycleConfigProperty {
ServiceRole = "serviceRole",
VersionLifecycleConfig = new ApplicationVersionLifecycleConfigProperty {
MaxAgeRule = new MaxAgeRuleProperty {
DeleteSourceFromS3 = false,
Enabled = false,
MaxAgeInDays = 123
},
MaxCountRule = new MaxCountRuleProperty {
DeleteSourceFromS3 = false,
Enabled = false,
MaxCount = 123
}
}
};
// 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"
applicationResourceLifecycleConfigProperty := &ApplicationResourceLifecycleConfigProperty{
ServiceRole: jsii.String("serviceRole"),
VersionLifecycleConfig: &ApplicationVersionLifecycleConfigProperty{
MaxAgeRule: &MaxAgeRuleProperty{
DeleteSourceFromS3: jsii.Boolean(false),
Enabled: jsii.Boolean(false),
MaxAgeInDays: jsii.Number(123),
},
MaxCountRule: &MaxCountRuleProperty{
DeleteSourceFromS3: jsii.Boolean(false),
Enabled: jsii.Boolean(false),
MaxCount: jsii.Number(123),
},
},
}
Properties
serviceRoleoptionalstringservice_roleoptionalstrserviceRoleoptionalStringServiceRoleoptionalstringServiceRoleoptional*string #notes
The ServiceRole property is required the first time that you provide a ResourceLifecycleConfig for the application. After you provide it once, Elastic Beanstalk persists the Service Role with the application, and you don't need to specify it again. You can, however, specify it in subsequent updates to change the Service Role to another value.
versionLifecycleConfigoptionalIResolvable | CfnApplication.version_lifecycle_configoptionaltyping.Union[IResolvable, ApplicationVersionLifecycleConfigProperty]versionLifecycleConfigoptionalIResolvableVersionLifecycleConfigoptionalIResolvableVersionLifecycleConfigoptionalinterface{} #