Skip to content

/AWS1/CL_EBN=>VALIDATECONFSETTINGS()

About ValidateConfigurationSettings

Takes a set of configuration settings and either a configuration template or environment, and determines whether those values are valid.

This action returns a list of messages indicating any errors or warnings associated with the selection of option values.

Method Signature

IMPORTING

Required arguments:

iv_applicationname TYPE /AWS1/EBNAPPLICATIONNAME /AWS1/EBNAPPLICATIONNAME

The name of the application that the configuration template or environment belongs to.

it_optionsettings TYPE /AWS1/CL_EBNCONFOPTIONSETTING=>TT_CONFOPTIONSETTINGSLIST TT_CONFOPTIONSETTINGSLIST

A list of the options and desired values to evaluate.

Optional arguments:

iv_templatename TYPE /AWS1/EBNCONFTEMPLATENAME /AWS1/EBNCONFTEMPLATENAME

The name of the configuration template to validate the settings against.

Condition: You cannot specify both this and an environment name.

iv_environmentname TYPE /AWS1/EBNENVIRONMENTNAME /AWS1/EBNENVIRONMENTNAME

The name of the environment to validate the settings against.

Condition: You cannot specify both this and a configuration template name.

RETURNING

oo_output TYPE REF TO /aws1/cl_ebnconfstgsvalidati00 /AWS1/CL_EBNCONFSTGSVALIDATI00

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~validateconfsettings(
  it_optionsettings = VALUE /aws1/cl_ebnconfoptionsetting=>tt_confoptionsettingslist(
    (
      new /aws1/cl_ebnconfoptionsetting(
        iv_namespace = |string|
        iv_optionname = |string|
        iv_resourcename = |string|
        iv_value = |string|
      )
    )
  )
  iv_applicationname = |string|
  iv_environmentname = |string|
  iv_templatename = |string|
).

This is an example of reading all possible response values

LOOP AT lo_result->get_messages( ) into lo_row.
  lv_validationmessagestring = lo_row_1->get_message( ).
  lv_validationseverity = lo_row_1->get_severity( ).
  lv_optionnamespace = lo_row_1->get_namespace( ).
  lv_configurationoptionname = lo_row_1->get_optionname( ).
ENDLOOP.

To validate configuration settings

The following operation validates a CloudWatch custom metrics config document:

DATA(lo_result) = lo_client->/aws1/if_ebn~validateconfsettings(
  it_optionsettings = VALUE /aws1/cl_ebnconfoptionsetting=>tt_confoptionsettingslist(
    (
      new /aws1/cl_ebnconfoptionsetting(
        iv_namespace = |aws:elasticbeanstalk:healthreporting:system|
        iv_optionname = |ConfigDocument|
        iv_value = |{"CloudWatchMetrics": {"Environment": {"ApplicationLatencyP99.9": null,"InstancesSevere": 60,"ApplicationLatencyP90": 60,"ApplicationLatencyP99": null,"ApplicationLatencyP95": 60,"InstancesUnknown": 60,"ApplicationLatencyP85": 60,"InstancesInfo": null,"ApplicationRequests2xx": null,"InstancesDegraded": null,"InstancesWarning": 60,"ApplicationLatencyP50": 60,"ApplicationRequestsTotal": null,"InstancesNoData": null,"InstancesPending": 60,"ApplicationLatencyP10": null,"ApplicationRequests5xx": null,"ApplicationLatencyP75": null,"InstancesOk": 60,"ApplicationRequests3xx": null,"ApplicationRequests4xx": null},"Instance": {"ApplicationLatencyP99.9": null,"ApplicationLatencyP90": 60,"ApplicationLatencyP99": null,"ApplicationLatencyP95": null,"ApplicationLatencyP85": null,"CPUUser": 60,"ApplicationRequests2xx": null,"CPUIdle": null,"ApplicationLatencyP50": null,"ApplicationRequestsTotal": 60,"RootFilesystemUtil": null,"LoadAverage1min": null,"CPUIrq": null,"CPUNice": 60,"CPUIowait": 60,"ApplicationLatencyP10": null,"LoadAverage5min": null,"ApplicationRequests5xx": null,"ApplicationLatencyP75": 60,"CPUSystem": 60,"ApplicationRequests3xx": 60,"ApplicationRequests4xx": null,"InstanceHealth": null,"CPUSoftirq": 60}},"Version": 1}|
      )
    )
  )
  iv_applicationname = |my-app|
  iv_environmentname = |my-env|
).