/AWS1/CL_EBN=>UPDATEENVIRONMENT()
¶
About UpdateEnvironment¶
Updates the environment description, deploys a new application version, updates the configuration settings to an entirely new configuration template, or updates select configuration option values in the running environment.
Attempting to update both the release and configuration is not allowed and AWS Elastic
Beanstalk returns an InvalidParameterCombination
error.
When updating the configuration settings to a new template or individual settings, a
draft configuration is created and DescribeConfigurationSettings for this
environment returns two setting descriptions with different DeploymentStatus
values.
Method Signature¶
IMPORTING¶
Optional arguments:¶
iv_applicationname
TYPE /AWS1/EBNAPPLICATIONNAME
/AWS1/EBNAPPLICATIONNAME
¶
The name of the application with which the environment is associated.
iv_environmentid
TYPE /AWS1/EBNENVIRONMENTID
/AWS1/EBNENVIRONMENTID
¶
The ID of the environment to update.
If no environment with this ID exists, AWS Elastic Beanstalk returns an
InvalidParameterValue
error.Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns
MissingRequiredParameter
error.
iv_environmentname
TYPE /AWS1/EBNENVIRONMENTNAME
/AWS1/EBNENVIRONMENTNAME
¶
The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an
InvalidParameterValue
error.Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns
MissingRequiredParameter
error.
iv_groupname
TYPE /AWS1/EBNGROUPNAME
/AWS1/EBNGROUPNAME
¶
The name of the group to which the target environment belongs. Specify a group name only if the environment's name is specified in an environment manifest and not with the environment name or environment ID parameters. See Environment Manifest (env.yaml) for details.
iv_description
TYPE /AWS1/EBNDESCRIPTION
/AWS1/EBNDESCRIPTION
¶
If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.
io_tier
TYPE REF TO /AWS1/CL_EBNENVIRONMENTTIER
/AWS1/CL_EBNENVIRONMENTTIER
¶
This specifies the tier to use to update the environment.
Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns
InvalidParameterValue
error.
iv_versionlabel
TYPE /AWS1/EBNVERSIONLABEL
/AWS1/EBNVERSIONLABEL
¶
If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an
InvalidParameterValue
error.
iv_templatename
TYPE /AWS1/EBNCONFTEMPLATENAME
/AWS1/EBNCONFTEMPLATENAME
¶
If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an
InvalidParameterValue
error.
iv_solutionstackname
TYPE /AWS1/EBNSOLUTIONSTACKNAME
/AWS1/EBNSOLUTIONSTACKNAME
¶
This specifies the platform version that the environment will run after the environment is updated.
iv_platformarn
TYPE /AWS1/EBNPLATFORMARN
/AWS1/EBNPLATFORMARN
¶
The ARN of the platform, if used.
it_optionsettings
TYPE /AWS1/CL_EBNCONFOPTIONSETTING=>TT_CONFOPTIONSETTINGSLIST
TT_CONFOPTIONSETTINGSLIST
¶
If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.
it_optionstoremove
TYPE /AWS1/CL_EBNOPTIONSPEC=>TT_OPTIONSSPECIFIERLIST
TT_OPTIONSSPECIFIERLIST
¶
A list of custom user-defined configuration options to remove from the configuration set for this environment.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_ebnenvironmentdesc
/AWS1/CL_EBNENVIRONMENTDESC
¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->/aws1/if_ebn~updateenvironment(
io_tier = new /aws1/cl_ebnenvironmenttier(
iv_name = |string|
iv_type = |string|
iv_version = |string|
)
it_optionsettings = VALUE /aws1/cl_ebnconfoptionsetting=>tt_confoptionsettingslist(
(
new /aws1/cl_ebnconfoptionsetting(
iv_namespace = |string|
iv_optionname = |string|
iv_resourcename = |string|
iv_value = |string|
)
)
)
it_optionstoremove = VALUE /aws1/cl_ebnoptionspec=>tt_optionsspecifierlist(
(
new /aws1/cl_ebnoptionspec(
iv_namespace = |string|
iv_optionname = |string|
iv_resourcename = |string|
)
)
)
iv_applicationname = |string|
iv_description = |string|
iv_environmentid = |string|
iv_environmentname = |string|
iv_groupname = |string|
iv_platformarn = |string|
iv_solutionstackname = |string|
iv_templatename = |string|
iv_versionlabel = |string|
).
This is an example of reading all possible response values
lv_environmentname = lo_result->get_environmentname( ).
lv_environmentid = lo_result->get_environmentid( ).
lv_applicationname = lo_result->get_applicationname( ).
lv_versionlabel = lo_result->get_versionlabel( ).
lv_solutionstackname = lo_result->get_solutionstackname( ).
lv_platformarn = lo_result->get_platformarn( ).
lv_configurationtemplatena = lo_result->get_templatename( ).
lv_description = lo_result->get_description( ).
lv_endpointurl = lo_result->get_endpointurl( ).
lv_dnscname = lo_result->get_cname( ).
lv_creationdate = lo_result->get_datecreated( ).
lv_updatedate = lo_result->get_dateupdated( ).
lv_environmentstatus = lo_result->get_status( ).
lv_abortableoperationinpro = lo_result->get_abortableopinprogress( ).
lv_environmenthealth = lo_result->get_health( ).
lv_environmenthealthstatus = lo_result->get_healthstatus( ).
lv_string = lo_loadbalancerdescription->get_loadbalancername( ).
lv_string = lo_loadbalancerdescription->get_domain( ).
LOOP AT lo_loadbalancerdescription->get_listeners( ) into lo_row.
lv_string = lo_row_1->get_protocol( ).
lv_integer = lo_row_1->get_port( ).
ENDLOOP.
lv_string = lo_environmenttier->get_name( ).
lv_string = lo_environmenttier->get_type( ).
lv_string = lo_environmenttier->get_version( ).
LOOP AT lo_result->get_environmentlinks( ) into lo_row_2.
lv_string = lo_row_3->get_linkname( ).
lv_string = lo_row_3->get_environmentname( ).
ENDLOOP.
lv_environmentarn = lo_result->get_environmentarn( ).
lv_operationsrole = lo_result->get_operationsrole( ).
To configure option settings¶
The following operation configures several options in the aws:elb:loadbalancer namespace:
DATA(lo_result) = lo_client->/aws1/if_ebn~updateenvironment(
it_optionsettings = VALUE /aws1/cl_ebnconfoptionsetting=>tt_confoptionsettingslist(
(
new /aws1/cl_ebnconfoptionsetting(
iv_namespace = |aws:elb:healthcheck|
iv_optionname = |Interval|
iv_value = |15|
)
)
(
new /aws1/cl_ebnconfoptionsetting(
iv_namespace = |aws:elb:healthcheck|
iv_optionname = |Timeout|
iv_value = |8|
)
)
(
new /aws1/cl_ebnconfoptionsetting(
iv_namespace = |aws:elb:healthcheck|
iv_optionname = |HealthyThreshold|
iv_value = |2|
)
)
(
new /aws1/cl_ebnconfoptionsetting(
iv_namespace = |aws:elb:healthcheck|
iv_optionname = |UnhealthyThreshold|
iv_value = |3|
)
)
)
iv_environmentname = |my-env|
).
To update an environment to a new version¶
The following operation updates an environment named "my-env" to version "v2" of the application to which it belongs:
DATA(lo_result) = lo_client->/aws1/if_ebn~updateenvironment(
iv_environmentname = |my-env|
iv_versionlabel = |v2|
).