Skip to content

/AWS1/IF_XDD=>PUTCLUSTERPOLICY()

About PutClusterPolicy

Attaches a resource-based policy to a cluster. This policy defines access permissions and conditions for the cluster, allowing you to control which principals can perform actions on the cluster.

Method Signature

METHODS /AWS1/IF_XDD~PUTCLUSTERPOLICY
  IMPORTING
    !IV_IDENTIFIER TYPE /AWS1/XDDCLUSTERID OPTIONAL
    !IV_POLICY TYPE /AWS1/XDDPOLICYDOCUMENT OPTIONAL
    !IV_BYPASSPLYLOCKOUTSAFETYCHK TYPE /AWS1/XDDBYPASSPLYLKOUTSAFET00 OPTIONAL
    !IV_EXPECTEDPOLICYVERSION TYPE /AWS1/XDDPOLICYVERSION OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/XDDCLIENTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_xddputclustplyoutput
  RAISING
    /AWS1/CX_XDDACCESSDENIEDEX
    /AWS1/CX_XDDINTERNALSERVEREX
    /AWS1/CX_XDDTHROTTLINGEX
    /AWS1/CX_XDDVALIDATIONEX
    /AWS1/CX_XDDCONFLICTEXCEPTION
    /AWS1/CX_XDDRESOURCENOTFOUNDEX
    /AWS1/CX_XDDCLIENTEXC
    /AWS1/CX_XDDSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_identifier TYPE /AWS1/XDDCLUSTERID /AWS1/XDDCLUSTERID

identifier

iv_policy TYPE /AWS1/XDDPOLICYDOCUMENT /AWS1/XDDPOLICYDOCUMENT

The resource-based policy document to attach to the cluster. This should be a valid JSON policy document that defines permissions and conditions.

Optional arguments:

iv_bypassplylockoutsafetychk TYPE /AWS1/XDDBYPASSPLYLKOUTSAFET00 /AWS1/XDDBYPASSPLYLKOUTSAFET00

A flag that allows you to bypass the policy lockout safety check. When set to true, this parameter allows you to apply a policy that might lock you out of the cluster. Use with caution.

iv_expectedpolicyversion TYPE /AWS1/XDDPOLICYVERSION /AWS1/XDDPOLICYVERSION

The expected version of the current policy. This parameter ensures that you're updating the correct version of the policy and helps prevent concurrent modification conflicts.

iv_clienttoken TYPE /AWS1/XDDCLIENTTOKEN /AWS1/XDDCLIENTTOKEN

clientToken

RETURNING

oo_output TYPE REF TO /aws1/cl_xddputclustplyoutput /AWS1/CL_XDDPUTCLUSTPLYOUTPUT

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->putclusterpolicy(
  iv_bypassplylockoutsafetychk = ABAP_TRUE
  iv_clienttoken = |string|
  iv_expectedpolicyversion = |string|
  iv_identifier = |string|
  iv_policy = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_policyversion = lo_result->get_policyversion( ).
ENDIF.