/AWS1/IF_FNT=>UPDATECACHEPOLICY()¶
About UpdateCachePolicy¶
Updates a cache policy configuration.
When you update a cache policy configuration, all the fields are updated with the values provided in the request. You cannot update some fields independent of others. To update a cache policy configuration:
-
Use
GetCachePolicyConfigto get the current configuration. -
Locally modify the fields in the cache policy configuration that you want to update.
-
Call
UpdateCachePolicyby providing the entire cache policy configuration, including the fields that you modified and those that you didn't.
If your minimum TTL is greater than 0, CloudFront will cache content for at least the duration specified in the cache policy's minimum TTL, even if the Cache-Control: no-cache, no-store, or private directives are present in the origin headers.
Method Signature¶
METHODS /AWS1/IF_FNT~UPDATECACHEPOLICY
IMPORTING
!IO_CACHEPOLICYCONFIG TYPE REF TO /AWS1/CL_FNTCACHEPOLICYCONFIG OPTIONAL
!IV_ID TYPE /AWS1/FNTSTRING OPTIONAL
!IV_IFMATCH TYPE /AWS1/FNTSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_fntupdatecacheplyrslt
RAISING
/AWS1/CX_FNTACCESSDENIED
/AWS1/CX_FNTCACHEPLYALRDYEX
/AWS1/CX_FNTILLEGALUPDATE
/AWS1/CX_FNTINCONSISTENTQUAN00
/AWS1/CX_FNTINVALIDARGUMENT
/AWS1/CX_FNTINVALIDIFMATCHVRS
/AWS1/CX_FNTNOSUCHCACHEPOLICY
/AWS1/CX_FNTPRECONDITIONFAILED
/AWS1/CX_FNTTOOMANYCOOKIESIN00
/AWS1/CX_FNTTOOMANYHEADERSIN02
/AWS1/CX_FNTTOOMANYQUERYSTRS00
/AWS1/CX_FNTCLIENTEXC
/AWS1/CX_FNTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
io_cachepolicyconfig TYPE REF TO /AWS1/CL_FNTCACHEPOLICYCONFIG /AWS1/CL_FNTCACHEPOLICYCONFIG¶
A cache policy configuration.
iv_id TYPE /AWS1/FNTSTRING /AWS1/FNTSTRING¶
The unique identifier for the cache policy that you are updating. The identifier is returned in a cache behavior's
CachePolicyIdfield in the response toGetDistributionConfig.
Optional arguments:¶
iv_ifmatch TYPE /AWS1/FNTSTRING /AWS1/FNTSTRING¶
The version of the cache policy that you are updating. The version is returned in the cache policy's
ETagfield in the response toGetCachePolicyConfig.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_fntupdatecacheplyrslt /AWS1/CL_FNTUPDATECACHEPLYRSLT¶
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->updatecachepolicy(
io_cachepolicyconfig = new /aws1/cl_fntcachepolicyconfig(
io_prmsincachekeyandforwar00 = new /aws1/cl_fntprmsincachekeyan00(
io_cookiesconfig = new /aws1/cl_fntcacheplycookiescfg(
io_cookies = new /aws1/cl_fntcookienames(
it_items = VALUE /aws1/cl_fntcookienamelist_w=>tt_cookienamelist(
( new /aws1/cl_fntcookienamelist_w( |string| ) )
)
iv_quantity = 123
)
iv_cookiebehavior = |string|
)
io_headersconfig = new /aws1/cl_fntcacheplyheaderscfg(
io_headers = new /aws1/cl_fntheaders(
it_items = VALUE /aws1/cl_fntheaderlist_w=>tt_headerlist(
( new /aws1/cl_fntheaderlist_w( |string| ) )
)
iv_quantity = 123
)
iv_headerbehavior = |string|
)
io_querystringsconfig = new /aws1/cl_fntcacheplyquerystr00(
io_querystrings = new /aws1/cl_fntquerystringnames(
it_items = VALUE /aws1/cl_fntquerystrnameslst_w=>tt_querystringnameslist(
( new /aws1/cl_fntquerystrnameslst_w( |string| ) )
)
iv_quantity = 123
)
iv_querystringbehavior = |string|
)
iv_enableaccencodingbrotli = ABAP_TRUE
iv_enableacceptencodinggzip = ABAP_TRUE
)
iv_comment = |string|
iv_defaultttl = 123
iv_maxttl = 123
iv_minttl = 123
iv_name = |string|
)
iv_id = |string|
iv_ifmatch = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_cachepolicy = lo_result->get_cachepolicy( ).
IF lo_cachepolicy IS NOT INITIAL.
lv_string = lo_cachepolicy->get_id( ).
lv_timestamp = lo_cachepolicy->get_lastmodifiedtime( ).
lo_cachepolicyconfig = lo_cachepolicy->get_cachepolicyconfig( ).
IF lo_cachepolicyconfig IS NOT INITIAL.
lv_string = lo_cachepolicyconfig->get_comment( ).
lv_string = lo_cachepolicyconfig->get_name( ).
lv_long = lo_cachepolicyconfig->get_defaultttl( ).
lv_long = lo_cachepolicyconfig->get_maxttl( ).
lv_long = lo_cachepolicyconfig->get_minttl( ).
lo_parametersincachekeyand = lo_cachepolicyconfig->get_prmsincachekeyandforwa00( ).
IF lo_parametersincachekeyand IS NOT INITIAL.
lv_boolean = lo_parametersincachekeyand->get_enableacceptencodinggzip( ).
lv_boolean = lo_parametersincachekeyand->get_enableaccencodingbrotli( ).
lo_cachepolicyheadersconfi = lo_parametersincachekeyand->get_headersconfig( ).
IF lo_cachepolicyheadersconfi IS NOT INITIAL.
lv_cachepolicyheaderbehavi = lo_cachepolicyheadersconfi->get_headerbehavior( ).
lo_headers = lo_cachepolicyheadersconfi->get_headers( ).
IF lo_headers IS NOT INITIAL.
lv_integer = lo_headers->get_quantity( ).
LOOP AT lo_headers->get_items( ) 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.
ENDIF.
lo_cachepolicycookiesconfi = lo_parametersincachekeyand->get_cookiesconfig( ).
IF lo_cachepolicycookiesconfi IS NOT INITIAL.
lv_cachepolicycookiebehavi = lo_cachepolicycookiesconfi->get_cookiebehavior( ).
lo_cookienames = lo_cachepolicycookiesconfi->get_cookies( ).
IF lo_cookienames IS NOT INITIAL.
lv_integer = lo_cookienames->get_quantity( ).
LOOP AT lo_cookienames->get_items( ) 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.
ENDIF.
lo_cachepolicyquerystrings = lo_parametersincachekeyand->get_querystringsconfig( ).
IF lo_cachepolicyquerystrings IS NOT INITIAL.
lv_cachepolicyquerystringb = lo_cachepolicyquerystrings->get_querystringbehavior( ).
lo_querystringnames = lo_cachepolicyquerystrings->get_querystrings( ).
IF lo_querystringnames IS NOT INITIAL.
lv_integer = lo_querystringnames->get_quantity( ).
LOOP AT lo_querystringnames->get_items( ) 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.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
lv_string = lo_result->get_etag( ).
ENDIF.