Skip to content

/AWS1/IF_DOA=>UPDATEASSOCIATION()

About UpdateAssociation

Partially updates the configuration of an existing service association for an AgentSpace. Present fields are fully replaced; absent fields are left unchanged. Returns 200 OK on success.

Method Signature

METHODS /AWS1/IF_DOA~UPDATEASSOCIATION
  IMPORTING
    !IV_AGENTSPACEID TYPE /AWS1/DOAAGENTSPACEID OPTIONAL
    !IV_ASSOCIATIONID TYPE /AWS1/DOAASSOCIATIONID OPTIONAL
    !IO_CONFIGURATION TYPE REF TO /AWS1/CL_DOASERVICECONF OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_doaupdateassocoutput
  RAISING
    /AWS1/CX_DOAACCESSDENIEDEX
    /AWS1/CX_DOACONFLICTEXCEPTION
    /AWS1/CX_DOACONTENTSIZEEXCDEX
    /AWS1/CX_DOAINTERNALSERVEREX
    /AWS1/CX_DOAINVALIDPARAMETEREX
    /AWS1/CX_DOARESOURCENOTFOUNDEX
    /AWS1/CX_DOASERVICEQUOTAEXCDEX
    /AWS1/CX_DOATHROTTLINGEX
    /AWS1/CX_DOAVLDTNEXCEPTION
    /AWS1/CX_DOACLIENTEXC
    /AWS1/CX_DOASERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_agentspaceid TYPE /AWS1/DOAAGENTSPACEID /AWS1/DOAAGENTSPACEID

The unique identifier of the AgentSpace

iv_associationid TYPE /AWS1/DOAASSOCIATIONID /AWS1/DOAASSOCIATIONID

The unique identifier of the given association.

io_configuration TYPE REF TO /AWS1/CL_DOASERVICECONF /AWS1/CL_DOASERVICECONF

The configuration that directs how AgentSpace interacts with the given service. The entire configuration is replaced on update.

RETURNING

oo_output TYPE REF TO /aws1/cl_doaupdateassocoutput /AWS1/CL_DOAUPDATEASSOCOUTPUT

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->updateassociation(
  io_configuration = new /aws1/cl_doaserviceconf(
    io_aws = new /aws1/cl_doaawsconfiguration(
      iv_accountid = |string|
      iv_accounttype = |string|
      iv_assumablerolearn = |string|
    )
    io_azure = new /aws1/cl_doaazureconfiguration( |string| )
    io_azuredevops = new /aws1/cl_doaazuredevopsconf(
      iv_organizationname = |string|
      iv_projectid = |string|
      iv_projectname = |string|
    )
    io_dynatrace = new /aws1/cl_doadynatraceconf(
      it_resources = VALUE /aws1/cl_doadynaresourcelist_w=>tt_dynatraceresourcelist(
        ( new /aws1/cl_doadynaresourcelist_w( |string| ) )
      )
      iv_envid = |string|
    )
    io_eventchannel = new /aws1/cl_doaeventchannelconf( )
    io_github = new /aws1/cl_doagithubconf(
      iv_instanceidentifier = |string|
      iv_owner = |string|
      iv_ownertype = |string|
      iv_repoid = |string|
      iv_reponame = |string|
    )
    io_gitlab = new /aws1/cl_doagitlabconf(
      iv_instanceidentifier = |string|
      iv_projectid = |string|
      iv_projectpath = |string|
    )
    io_mcpserver = new /aws1/cl_doamcpserverconf(
      it_tools = VALUE /aws1/cl_doamcptoolslist_w=>tt_mcptoolslist(
        ( new /aws1/cl_doamcptoolslist_w( |string| ) )
      )
    )
    io_mcpserverdatadog = new /aws1/cl_doamcpsrvdatadogconf( )
    io_mcpservergrafana = new /aws1/cl_doamcpsrvgrafnaconf(
      it_tools = VALUE /aws1/cl_doamcptoolslist_w=>tt_mcptoolslist(
        ( new /aws1/cl_doamcptoolslist_w( |string| ) )
      )
      iv_endpoint = |string|
      iv_organizationid = |string|
    )
    io_mcpservernewrelic = new /aws1/cl_doamcpsrvnewrelicconf(
      iv_accountid = |string|
      iv_endpoint = |string|
    )
    io_mcpserversplunk = new /aws1/cl_doamcpsrvsplunkconf( )
    io_pagerduty = new /aws1/cl_doapagerdutyconf(
      it_services = VALUE /aws1/cl_doapagerdutysvcslst_w=>tt_pagerdutyserviceslist(
        ( new /aws1/cl_doapagerdutysvcslst_w( |string| ) )
      )
      iv_customeremail = |string|
    )
    io_servicenow = new /aws1/cl_doaservicenowconf(
      it_authscopes = VALUE /aws1/cl_doasvcnowauthscopel00=>tt_svcnowauthntctnscopelist(
        ( new /aws1/cl_doasvcnowauthscopel00( |string| ) )
      )
      iv_instanceid = |string|
    )
    io_slack = new /aws1/cl_doaslackconfiguration(
      io_transmissiontarget = new /aws1/cl_doaslacktranstarget(
        io_opsoncalltarget = new /aws1/cl_doaslackchannel(
          iv_channelid = |string|
          iv_channelname = |string|
        )
        io_opssretarget = new /aws1/cl_doaslackchannel(
          iv_channelid = |string|
          iv_channelname = |string|
        )
      )
      iv_workspaceid = |string|
      iv_workspacename = |string|
    )
    io_sourceaws = new /aws1/cl_doasourceawsconf(
      iv_accountid = |string|
      iv_accounttype = |string|
      iv_assumablerolearn = |string|
      iv_externalid = |string|
    )
  )
  iv_agentspaceid = |string|
  iv_associationid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_association = lo_result->get_association( ).
  IF lo_association IS NOT INITIAL.
    lv_agentspaceid = lo_association->get_agentspaceid( ).
    lv_timestamp = lo_association->get_createdat( ).
    lv_timestamp = lo_association->get_updatedat( ).
    lv_validationstatus = lo_association->get_status( ).
    lv_associationid = lo_association->get_associationid( ).
    lv_serviceid = lo_association->get_serviceid( ).
    lo_serviceconfiguration = lo_association->get_configuration( ).
    IF lo_serviceconfiguration IS NOT INITIAL.
      lo_sourceawsconfiguration = lo_serviceconfiguration->get_sourceaws( ).
      IF lo_sourceawsconfiguration IS NOT INITIAL.
        lv_string = lo_sourceawsconfiguration->get_accountid( ).
        lv_sourceaccounttype = lo_sourceawsconfiguration->get_accounttype( ).
        lv_rolearn = lo_sourceawsconfiguration->get_assumablerolearn( ).
        lv_string = lo_sourceawsconfiguration->get_externalid( ).
      ENDIF.
      lo_awsconfiguration = lo_serviceconfiguration->get_aws( ).
      IF lo_awsconfiguration IS NOT INITIAL.
        lv_rolearn = lo_awsconfiguration->get_assumablerolearn( ).
        lv_string = lo_awsconfiguration->get_accountid( ).
        lv_monitoraccounttype = lo_awsconfiguration->get_accounttype( ).
      ENDIF.
      lo_githubconfiguration = lo_serviceconfiguration->get_github( ).
      IF lo_githubconfiguration IS NOT INITIAL.
        lv_string = lo_githubconfiguration->get_reponame( ).
        lv_string = lo_githubconfiguration->get_repoid( ).
        lv_string = lo_githubconfiguration->get_owner( ).
        lv_githubrepoownertype = lo_githubconfiguration->get_ownertype( ).
        lv_string = lo_githubconfiguration->get_instanceidentifier( ).
      ENDIF.
      lo_slackconfiguration = lo_serviceconfiguration->get_slack( ).
      IF lo_slackconfiguration IS NOT INITIAL.
        lv_string = lo_slackconfiguration->get_workspaceid( ).
        lv_string = lo_slackconfiguration->get_workspacename( ).
        lo_slacktransmissiontarget = lo_slackconfiguration->get_transmissiontarget( ).
        IF lo_slacktransmissiontarget IS NOT INITIAL.
          lo_slackchannel = lo_slacktransmissiontarget->get_opsoncalltarget( ).
          IF lo_slackchannel IS NOT INITIAL.
            lv_string = lo_slackchannel->get_channelname( ).
            lv_string = lo_slackchannel->get_channelid( ).
          ENDIF.
          lo_slackchannel = lo_slacktransmissiontarget->get_opssretarget( ).
          IF lo_slackchannel IS NOT INITIAL.
            lv_string = lo_slackchannel->get_channelname( ).
            lv_string = lo_slackchannel->get_channelid( ).
          ENDIF.
        ENDIF.
      ENDIF.
      lo_dynatraceconfiguration = lo_serviceconfiguration->get_dynatrace( ).
      IF lo_dynatraceconfiguration IS NOT INITIAL.
        lv_string = lo_dynatraceconfiguration->get_envid( ).
        LOOP AT lo_dynatraceconfiguration->get_resources( ) into lo_row.
          lo_row_1 = lo_row.
          IF lo_row_1 IS NOT INITIAL.
            lv_string = lo_row_1->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_servicenowconfiguration = lo_serviceconfiguration->get_servicenow( ).
      IF lo_servicenowconfiguration IS NOT INITIAL.
        lv_string = lo_servicenowconfiguration->get_instanceid( ).
        LOOP AT lo_servicenowconfiguration->get_authscopes( ) into lo_row_2.
          lo_row_3 = lo_row_2.
          IF lo_row_3 IS NOT INITIAL.
            lv_string = lo_row_3->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_mcpservernewrelicconfig = lo_serviceconfiguration->get_mcpservernewrelic( ).
      IF lo_mcpservernewrelicconfig IS NOT INITIAL.
        lv_string = lo_mcpservernewrelicconfig->get_accountid( ).
        lv_string = lo_mcpservernewrelicconfig->get_endpoint( ).
      ENDIF.
      lo_mcpserverdatadogconfigu = lo_serviceconfiguration->get_mcpserverdatadog( ).
      IF lo_mcpserverdatadogconfigu IS NOT INITIAL.
      ENDIF.
      lo_mcpserverconfiguration = lo_serviceconfiguration->get_mcpserver( ).
      IF lo_mcpserverconfiguration IS NOT INITIAL.
        LOOP AT lo_mcpserverconfiguration->get_tools( ) into lo_row_4.
          lo_row_5 = lo_row_4.
          IF lo_row_5 IS NOT INITIAL.
            lv_string = lo_row_5->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_gitlabconfiguration = lo_serviceconfiguration->get_gitlab( ).
      IF lo_gitlabconfiguration IS NOT INITIAL.
        lv_string = lo_gitlabconfiguration->get_projectid( ).
        lv_string = lo_gitlabconfiguration->get_projectpath( ).
        lv_string = lo_gitlabconfiguration->get_instanceidentifier( ).
      ENDIF.
      lo_mcpserversplunkconfigur = lo_serviceconfiguration->get_mcpserversplunk( ).
      IF lo_mcpserversplunkconfigur IS NOT INITIAL.
      ENDIF.
      lo_eventchannelconfigurati = lo_serviceconfiguration->get_eventchannel( ).
      IF lo_eventchannelconfigurati IS NOT INITIAL.
      ENDIF.
      lo_azureconfiguration = lo_serviceconfiguration->get_azure( ).
      IF lo_azureconfiguration IS NOT INITIAL.
        lv_string = lo_azureconfiguration->get_subscriptionid( ).
      ENDIF.
      lo_azuredevopsconfiguratio = lo_serviceconfiguration->get_azuredevops( ).
      IF lo_azuredevopsconfiguratio IS NOT INITIAL.
        lv_string = lo_azuredevopsconfiguratio->get_organizationname( ).
        lv_string = lo_azuredevopsconfiguratio->get_projectid( ).
        lv_string = lo_azuredevopsconfiguratio->get_projectname( ).
      ENDIF.
      lo_mcpservergrafanaconfigu = lo_serviceconfiguration->get_mcpservergrafana( ).
      IF lo_mcpservergrafanaconfigu IS NOT INITIAL.
        lv_string = lo_mcpservergrafanaconfigu->get_endpoint( ).
        lv_string = lo_mcpservergrafanaconfigu->get_organizationid( ).
        LOOP AT lo_mcpservergrafanaconfigu->get_tools( ) into lo_row_4.
          lo_row_5 = lo_row_4.
          IF lo_row_5 IS NOT INITIAL.
            lv_string = lo_row_5->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_pagerdutyconfiguration = lo_serviceconfiguration->get_pagerduty( ).
      IF lo_pagerdutyconfiguration IS NOT INITIAL.
        LOOP AT lo_pagerdutyconfiguration->get_services( ) into lo_row_6.
          lo_row_7 = lo_row_6.
          IF lo_row_7 IS NOT INITIAL.
            lv_string = lo_row_7->get_value( ).
          ENDIF.
        ENDLOOP.
        lv_emailaddress = lo_pagerdutyconfiguration->get_customeremail( ).
      ENDIF.
    ENDIF.
  ENDIF.
  lo_genericwebhook = lo_result->get_webhook( ).
  IF lo_genericwebhook IS NOT INITIAL.
    lv_string = lo_genericwebhook->get_webhookurl( ).
    lv_string = lo_genericwebhook->get_webhookid( ).
    lv_webhooktype = lo_genericwebhook->get_webhooktype( ).
    lv_webhooksecret = lo_genericwebhook->get_webhooksecret( ).
    lv_apikeyvalue = lo_genericwebhook->get_apikey( ).
  ENDIF.
ENDIF.