/AWS1/IF_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¶
METHODS /AWS1/IF_EBN~UPDATEENVIRONMENT
IMPORTING
!IV_APPLICATIONNAME TYPE /AWS1/EBNAPPLICATIONNAME OPTIONAL
!IV_ENVIRONMENTID TYPE /AWS1/EBNENVIRONMENTID OPTIONAL
!IV_ENVIRONMENTNAME TYPE /AWS1/EBNENVIRONMENTNAME OPTIONAL
!IV_GROUPNAME TYPE /AWS1/EBNGROUPNAME OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/EBNDESCRIPTION OPTIONAL
!IO_TIER TYPE REF TO /AWS1/CL_EBNENVIRONMENTTIER OPTIONAL
!IV_VERSIONLABEL TYPE /AWS1/EBNVERSIONLABEL OPTIONAL
!IV_TEMPLATENAME TYPE /AWS1/EBNCONFTEMPLATENAME OPTIONAL
!IV_SOLUTIONSTACKNAME TYPE /AWS1/EBNSOLUTIONSTACKNAME OPTIONAL
!IV_PLATFORMARN TYPE /AWS1/EBNPLATFORMARN OPTIONAL
!IT_OPTIONSETTINGS TYPE /AWS1/CL_EBNCONFOPTIONSETTING=>TT_CONFOPTIONSETTINGSLIST OPTIONAL
!IT_OPTIONSTOREMOVE TYPE /AWS1/CL_EBNOPTIONSPEC=>TT_OPTIONSSPECIFIERLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ebnenvironmentdesc
RAISING
/AWS1/CX_EBNINSUFFICIENTPRIV00
/AWS1/CX_EBNTOOMANYBUCKETSEX
/AWS1/CX_EBNCLIENTEXC
/AWS1/CX_EBNSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
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
InvalidParameterValueerror.Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns
MissingRequiredParametererror.
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
InvalidParameterValueerror.Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns
MissingRequiredParametererror.
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
InvalidParameterValueerror.
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
InvalidParameterValueerror.
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
InvalidParameterValueerror.
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->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
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
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( ).
lo_environmentresourcesdes = lo_result->get_resources( ).
IF lo_environmentresourcesdes IS NOT INITIAL.
lo_loadbalancerdescription = lo_environmentresourcesdes->get_loadbalancer( ).
IF lo_loadbalancerdescription IS NOT INITIAL.
lv_string = lo_loadbalancerdescription->get_loadbalancername( ).
lv_string = lo_loadbalancerdescription->get_domain( ).
LOOP AT lo_loadbalancerdescription->get_listeners( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_protocol( ).
lv_integer = lo_row_1->get_port( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lo_environmenttier = lo_result->get_tier( ).
IF lo_environmenttier IS NOT INITIAL.
lv_string = lo_environmenttier->get_name( ).
lv_string = lo_environmenttier->get_type( ).
lv_string = lo_environmenttier->get_version( ).
ENDIF.
LOOP AT lo_result->get_environmentlinks( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_linkname( ).
lv_string = lo_row_3->get_environmentname( ).
ENDIF.
ENDLOOP.
lv_environmentarn = lo_result->get_environmentarn( ).
lv_operationsrole = lo_result->get_operationsrole( ).
ENDIF.
To configure option settings¶
The following operation configures several options in the aws:elb:loadbalancer namespace:
DATA(lo_result) = lo_client->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->updateenvironment(
iv_environmentname = |my-env|
iv_versionlabel = |v2|
).