/AWS1/IF_CGP=>UPDATETERMS()
¶
About UpdateTerms¶
Modifies existing terms documents for the requested app client. When Terms and conditions and Privacy policy documents are configured, the app client displays links to them in the sign-up page of managed login for the app client.
You can provide URLs for terms documents in the languages that are supported by managed login localization. Amazon Cognito directs users to the terms documents for
their current language, with fallback to default
if no document exists for
the language.
Each request accepts one type of terms document and a map of language-to-link for that document type. You must provide both types of terms documents in at least one language before Amazon Cognito displays your terms documents. Supply each type in separate requests.
For more information, see Terms documents.
Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.
Learn more
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_termsid
TYPE /AWS1/CGPTERMSIDTYPE
/AWS1/CGPTERMSIDTYPE
¶
The ID of the terms document that you want to update.
iv_userpoolid
TYPE /AWS1/CGPUSERPOOLIDTYPE
/AWS1/CGPUSERPOOLIDTYPE
¶
The ID of the user pool that contains the terms that you want to update.
Optional arguments:¶
iv_termsname
TYPE /AWS1/CGPTERMSNAMETYPE
/AWS1/CGPTERMSNAMETYPE
¶
The new name that you want to apply to the requested terms documents.
iv_termssource
TYPE /AWS1/CGPTERMSSOURCETYPE
/AWS1/CGPTERMSSOURCETYPE
¶
This parameter is reserved for future use and currently accepts only one value.
iv_enforcement
TYPE /AWS1/CGPTERMSENFORCEMENTTYPE
/AWS1/CGPTERMSENFORCEMENTTYPE
¶
This parameter is reserved for future use and currently accepts only one value.
it_links
TYPE /AWS1/CL_CGPLINKSTYPE_W=>TT_LINKSTYPE
TT_LINKSTYPE
¶
A map of URLs to languages. For each localized language that will view the requested
TermsName
, assign a URL. A selection ofcognito:default
displays for all languages that don't have a language-specific URL.For example,
"cognito:default": "https://terms.example.com", "cognito:spanish": "https://terms.example.com/es"
.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_cgpupdatetermsrsp
/AWS1/CL_CGPUPDATETERMSRSP
¶
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_cgp~updateterms(
it_links = VALUE /aws1/cl_cgplinkstype_w=>tt_linkstype(
(
VALUE /aws1/cl_cgplinkstype_w=>ts_linkstype_maprow(
value = new /aws1/cl_cgplinkstype_w( |string| )
key = |string|
)
)
)
iv_enforcement = |string|
iv_termsid = |string|
iv_termsname = |string|
iv_termssource = |string|
iv_userpoolid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_termstype = lo_result->get_terms( ).
IF lo_termstype IS NOT INITIAL.
lv_termsidtype = lo_termstype->get_termsid( ).
lv_userpoolidtype = lo_termstype->get_userpoolid( ).
lv_clientidtype = lo_termstype->get_clientid( ).
lv_termsnametype = lo_termstype->get_termsname( ).
lv_termssourcetype = lo_termstype->get_termssource( ).
lv_termsenforcementtype = lo_termstype->get_enforcement( ).
LOOP AT lo_termstype->get_links( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv_linkurltype = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv_datetype = lo_termstype->get_creationdate( ).
lv_datetype = lo_termstype->get_lastmodifieddate( ).
ENDIF.
ENDIF.