ElasticBeanstalk / Client / update_application_resource_lifecycle
update_application_resource_lifecycle#
- ElasticBeanstalk.Client.update_application_resource_lifecycle(**kwargs)#
- Modifies lifecycle settings for an application. - See also: AWS API Documentation - Request Syntax - response = client.update_application_resource_lifecycle( ApplicationName='string', ResourceLifecycleConfig={ 'ServiceRole': 'string', 'VersionLifecycleConfig': { 'MaxCountRule': { 'Enabled': True|False, 'MaxCount': 123, 'DeleteSourceFromS3': True|False }, 'MaxAgeRule': { 'Enabled': True|False, 'MaxAgeInDays': 123, 'DeleteSourceFromS3': True|False } } } ) - Parameters:
- ApplicationName (string) – - [REQUIRED] - The name of the application. 
- ResourceLifecycleConfig (dict) – - [REQUIRED] - The lifecycle configuration. - ServiceRole (string) – - The ARN of an IAM service role that Elastic Beanstalk has permission to assume. - The - ServiceRoleproperty is required the first time that you provide a- VersionLifecycleConfigfor the application in one of the supporting calls (- CreateApplicationor- UpdateApplicationResourceLifecycle). After you provide it once, in either one of the calls, Elastic Beanstalk persists the Service Role with the application, and you don’t need to specify it again in subsequent- UpdateApplicationResourceLifecyclecalls. You can, however, specify it in subsequent calls to change the Service Role to another value.
- VersionLifecycleConfig (dict) – - Defines lifecycle settings for application versions. - MaxCountRule (dict) – - Specify a max count rule to restrict the number of application versions that are retained for an application. - Enabled (boolean) – [REQUIRED] - Specify - trueto apply the rule, or- falseto disable it.
- MaxCount (integer) – - Specify the maximum number of application versions to retain. 
- DeleteSourceFromS3 (boolean) – - Set to - trueto delete a version’s source bundle from Amazon S3 when Elastic Beanstalk deletes the application version.
 
- MaxAgeRule (dict) – - Specify a max age rule to restrict the length of time that application versions are retained for an application. - Enabled (boolean) – [REQUIRED] - Specify - trueto apply the rule, or- falseto disable it.
- MaxAgeInDays (integer) – - Specify the number of days to retain an application versions. 
- DeleteSourceFromS3 (boolean) – - Set to - trueto delete a version’s source bundle from Amazon S3 when Elastic Beanstalk deletes the application version.
 
 
 
 
- Return type:
- dict 
- Returns:
- Response Syntax - { 'ApplicationName': 'string', 'ResourceLifecycleConfig': { 'ServiceRole': 'string', 'VersionLifecycleConfig': { 'MaxCountRule': { 'Enabled': True|False, 'MaxCount': 123, 'DeleteSourceFromS3': True|False }, 'MaxAgeRule': { 'Enabled': True|False, 'MaxAgeInDays': 123, 'DeleteSourceFromS3': True|False } } } } - Response Structure - (dict) – - ApplicationName (string) – - The name of the application. 
- ResourceLifecycleConfig (dict) – - The lifecycle configuration. - ServiceRole (string) – - The ARN of an IAM service role that Elastic Beanstalk has permission to assume. - The - ServiceRoleproperty is required the first time that you provide a- VersionLifecycleConfigfor the application in one of the supporting calls (- CreateApplicationor- UpdateApplicationResourceLifecycle). After you provide it once, in either one of the calls, Elastic Beanstalk persists the Service Role with the application, and you don’t need to specify it again in subsequent- UpdateApplicationResourceLifecyclecalls. You can, however, specify it in subsequent calls to change the Service Role to another value.
- VersionLifecycleConfig (dict) – - Defines lifecycle settings for application versions. - MaxCountRule (dict) – - Specify a max count rule to restrict the number of application versions that are retained for an application. - Enabled (boolean) – - Specify - trueto apply the rule, or- falseto disable it.
- MaxCount (integer) – - Specify the maximum number of application versions to retain. 
- DeleteSourceFromS3 (boolean) – - Set to - trueto delete a version’s source bundle from Amazon S3 when Elastic Beanstalk deletes the application version.
 
- MaxAgeRule (dict) – - Specify a max age rule to restrict the length of time that application versions are retained for an application. - Enabled (boolean) – - Specify - trueto apply the rule, or- falseto disable it.
- MaxAgeInDays (integer) – - Specify the number of days to retain an application versions. 
- DeleteSourceFromS3 (boolean) – - Set to - trueto delete a version’s source bundle from Amazon S3 when Elastic Beanstalk deletes the application version.
 
 
 
 
 
 - Exceptions - ElasticBeanstalk.Client.exceptions.InsufficientPrivilegesException