/AWS1/IF_NWS=>UPDATEDEPLOYMENT()¶
About UpdateDeployment¶
Updates the specified deployment. To prevent conflicting concurrent updates, provide the current updateToken. Use isPublished to publish the update or keep the deployment as a draft.
Method Signature¶
METHODS /AWS1/IF_NWS~UPDATEDEPLOYMENT
IMPORTING
!IV_DEPLOYMENTIDENTIFIER TYPE /AWS1/NWSDEPLOYMENTIDENTIFIER OPTIONAL
!IV_UPDATETOKEN TYPE /AWS1/NWSUPDATETOKEN OPTIONAL
!IV_DEPLOYMENTDESCRIPTION TYPE /AWS1/NWSDESCRIPTION OPTIONAL
!IO_DEPLOYMENTCONFIGURATION TYPE REF TO /AWS1/CL_NWSDEPLOYMENTCONF OPTIONAL
!IT_ASSOCIATEDPOLICYLIST TYPE /AWS1/CL_NWSPOLICYREFERENCE=>TT_POLICYREFERENCELIST OPTIONAL
!IT_ASSOCIATEDSCOPELIST TYPE /AWS1/CL_NWSSCOPEREFERENCE=>TT_SCOPEREFERENCELIST OPTIONAL
!IV_ISPUBLISHED TYPE /AWS1/NWSISPUBLISHED OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/NWSIDEMPOTENCYTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_nwsupdatedeployoutput
RAISING
/AWS1/CX_NWSACCESSDENIEDEX
/AWS1/CX_NWSCONFLICTEXCEPTION
/AWS1/CX_NWSINTERNALSERVEREX
/AWS1/CX_NWSRESOURCENOTFOUNDEX
/AWS1/CX_NWSSERVICEQUOTAEXCDEX
/AWS1/CX_NWSTHROTTLINGEX
/AWS1/CX_NWSVLDTNEXCEPTION
/AWS1/CX_NWSCLIENTEXC
/AWS1/CX_NWSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_deploymentidentifier TYPE /AWS1/NWSDEPLOYMENTIDENTIFIER /AWS1/NWSDEPLOYMENTIDENTIFIER¶
The identifier of the deployment. This is the deployment's Amazon Resource Name (ARN).
iv_updatetoken TYPE /AWS1/NWSUPDATETOKEN /AWS1/NWSUPDATETOKEN¶
A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.
iv_ispublished TYPE /AWS1/NWSISPUBLISHED /AWS1/NWSISPUBLISHED¶
Specifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT).
Optional arguments:¶
iv_deploymentdescription TYPE /AWS1/NWSDESCRIPTION /AWS1/NWSDESCRIPTION¶
A description of the deployment.
io_deploymentconfiguration TYPE REF TO /AWS1/CL_NWSDEPLOYMENTCONF /AWS1/CL_NWSDEPLOYMENTCONF¶
The configuration settings for the deployment.
it_associatedpolicylist TYPE /AWS1/CL_NWSPOLICYREFERENCE=>TT_POLICYREFERENCELIST TT_POLICYREFERENCELIST¶
The policies associated with the deployment.
it_associatedscopelist TYPE /AWS1/CL_NWSSCOPEREFERENCE=>TT_SCOPEREFERENCELIST TT_SCOPEREFERENCELIST¶
The scope associated with the deployment. A deployment has exactly one scope.
iv_clienttoken TYPE /AWS1/NWSIDEMPOTENCYTOKEN /AWS1/NWSIDEMPOTENCYTOKEN¶
A unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_nwsupdatedeployoutput /AWS1/CL_NWSUPDATEDEPLOYOUTPUT¶
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->updatedeployment(
io_deploymentconfiguration = new /aws1/cl_nwsdeploymentconf( ABAP_TRUE )
it_associatedpolicylist = VALUE /aws1/cl_nwspolicyreference=>tt_policyreferencelist(
( new /aws1/cl_nwspolicyreference( |string| ) )
)
it_associatedscopelist = VALUE /aws1/cl_nwsscopereference=>tt_scopereferencelist(
( new /aws1/cl_nwsscopereference( |string| ) )
)
iv_clienttoken = |string|
iv_deploymentdescription = |string|
iv_deploymentidentifier = |string|
iv_ispublished = ABAP_TRUE
iv_updatetoken = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_deploymentid = lo_result->get_deploymentid( ).
lv_deploymentarn = lo_result->get_deploymentarn( ).
lv_deploymentname = lo_result->get_deploymentname( ).
lv_description = lo_result->get_deploymentdescription( ).
lv_entitystatus = lo_result->get_status( ).
lo_deploymentconfiguration = lo_result->get_deploymentconfiguration( ).
IF lo_deploymentconfiguration IS NOT INITIAL.
lv_enablecrossaccountvisib = lo_deploymentconfiguration->get_enablecrossaccountvis( ).
ENDIF.
LOOP AT lo_result->get_associatedpolicylist( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_policyarn = lo_row_1->get_policyarn( ).
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_associatedscopelist( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_scopearn = lo_row_3->get_scopearn( ).
ENDIF.
ENDLOOP.
lv_entityversion = lo_result->get_version( ).
lv_updatetoken = lo_result->get_updatetoken( ).
lv_issnapshot = lo_result->get_issnapshot( ).
lv_haspublishedversion = lo_result->get_haspublishedversion( ).
LOOP AT lo_result->get_deploymentcoverage( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_policyfirewalltype = lo_row_5->get_firewalltype( ).
LOOP AT lo_row_5->get_policyarns( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_policyarn = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_row_5->get_inscoperesourcetypes( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_scoperesourcetype = lo_row_9->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_warnings( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_string = lo_row_11->get_code( ).
lv_policyarn = lo_row_11->get_policyarn( ).
lv_string = lo_row_11->get_message( ).
ENDIF.
ENDLOOP.
lv_datetimestamp = lo_result->get_updatedat( ).
ENDIF.
Update a deployment and publish it¶
Updates the deployment's associations and publishes the change. The response includes deploymentCoverage showing which resource types the associated policies can protect. The updateToken from the most recent read is required for optimistic locking.
DATA(lo_result) = lo_client->updatedeployment(
io_deploymentconfiguration = new /aws1/cl_nwsdeploymentconf( ABAP_TRUE )
it_associatedpolicylist = VALUE /aws1/cl_nwspolicyreference=>tt_policyreferencelist(
( new /aws1/cl_nwspolicyreference( |arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789| ) )
)
it_associatedscopelist = VALUE /aws1/cl_nwsscopereference=>tt_scopereferencelist(
( new /aws1/cl_nwsscopereference( |arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123| ) )
)
iv_deploymentdescription = |Production deployment for US East 1 region - updated|
iv_deploymentidentifier = |arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456|
iv_ispublished = ABAP_TRUE
iv_updatetoken = |f4a5b6c7-7d8e-4f9a-8b1c-1d2e3f4a5b6c|
).