/AWS1/IF_EKS=>CREATECAPABILITY()¶
About CreateCapability¶
Creates a managed capability resource for an Amazon EKS cluster.
Capabilities provide fully managed capabilities to build and scale with Kubernetes. When you create a capability, Amazon EKSprovisions and manages the infrastructure required to run the capability outside of your cluster. This approach reduces operational overhead and preserves cluster resources.
You can only create one Capability of each type on a given Amazon EKS cluster. Valid types are Argo CD for declarative GitOps deployment, Amazon Web Services Controllers for Kubernetes (ACK) for resource management, and Kube Resource Orchestrator (KRO) for Kubernetes custom resource orchestration.
For more information, see EKS Capabilities in the Amazon EKS User Guide.
Method Signature¶
METHODS /AWS1/IF_EKS~CREATECAPABILITY
IMPORTING
!IV_CAPABILITYNAME TYPE /AWS1/EKSSTRING OPTIONAL
!IV_CLUSTERNAME TYPE /AWS1/EKSSTRING OPTIONAL
!IV_CLIENTREQUESTTOKEN TYPE /AWS1/EKSSTRING OPTIONAL
!IV_TYPE TYPE /AWS1/EKSCAPABILITYTYPE OPTIONAL
!IV_ROLEARN TYPE /AWS1/EKSSTRING OPTIONAL
!IO_CONFIGURATION TYPE REF TO /AWS1/CL_EKSCAPABILITYCONFREQ OPTIONAL
!IT_TAGS TYPE /AWS1/CL_EKSTAGMAP_W=>TT_TAGMAP OPTIONAL
!IV_DELETEPROPAGATIONPOLICY TYPE /AWS1/EKSCAPABILITYDELPROPPLY OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ekscrecapabilityrsp
RAISING
/AWS1/CX_EKSACCESSDENIEDEX
/AWS1/CX_EKSINVALIDPARAMETEREX
/AWS1/CX_EKSINVALIDREQUESTEX
/AWS1/CX_EKSRESOURCEINUSEEX
/AWS1/CX_EKSRESRCLIMITEXCDEX
/AWS1/CX_EKSSERVEREXCEPTION
/AWS1/CX_EKSTHROTTLINGEX
/AWS1/CX_EKSCLIENTEXC
/AWS1/CX_EKSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_capabilityname TYPE /AWS1/EKSSTRING /AWS1/EKSSTRING¶
A unique name for the capability. The name must be unique within your cluster and can contain alphanumeric characters, hyphens, and underscores.
iv_clustername TYPE /AWS1/EKSSTRING /AWS1/EKSSTRING¶
The name of the Amazon EKS cluster where you want to create the capability.
iv_type TYPE /AWS1/EKSCAPABILITYTYPE /AWS1/EKSCAPABILITYTYPE¶
The type of capability to create. Valid values are:
ACK– Amazon Web Services Controllers for Kubernetes (ACK), which lets you manage resources directly from Kubernetes.
ARGOCD– Argo CD for GitOps-based continuous delivery.
KRO– Kube Resource Orchestrator (KRO) for composing and managing custom Kubernetes resources.
iv_rolearn TYPE /AWS1/EKSSTRING /AWS1/EKSSTRING¶
The Amazon Resource Name (ARN) of the IAM role that the capability uses to interact with Amazon Web Services services. This role must have a trust policy that allows the EKS service principal to assume it, and it must have the necessary permissions for the capability type you're creating.
For ACK capabilities, the role needs permissions to manage the resources you want to control through Kubernetes. For Argo CD capabilities, the role needs permissions to access Git repositories and Secrets Manager. For KRO capabilities, the role needs permissions based on the resources you'll be orchestrating.
iv_deletepropagationpolicy TYPE /AWS1/EKSCAPABILITYDELPROPPLY /AWS1/EKSCAPABILITYDELPROPPLY¶
Specifies how Kubernetes resources managed by the capability should be handled when the capability is deleted. Currently, the only supported value is
RETAINwhich retains all Kubernetes resources managed by the capability when the capability is deleted.Because resources are retained, all Kubernetes resources created by the capability should be deleted from the cluster before deleting the capability itself. After the capability is deleted, these resources become difficult to manage because the controller is no longer available.
Optional arguments:¶
iv_clientrequesttoken TYPE /AWS1/EKSSTRING /AWS1/EKSSTRING¶
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is valid for 24 hours after creation. If you retry a request with the same client request token and the same parameters after the original request has completed successfully, the result of the original request is returned.
io_configuration TYPE REF TO /AWS1/CL_EKSCAPABILITYCONFREQ /AWS1/CL_EKSCAPABILITYCONFREQ¶
The configuration settings for the capability. The structure of this object varies depending on the capability type. For Argo CD capabilities, you can configure IAM Identity CenterIAM; Identity Center integration, RBAC role mappings, and network access settings.
it_tags TYPE /AWS1/CL_EKSTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
tags
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ekscrecapabilityrsp /AWS1/CL_EKSCRECAPABILITYRSP¶
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->createcapability(
io_configuration = new /aws1/cl_ekscapabilityconfreq(
io_argocd = new /aws1/cl_eksargocdconfigreq(
io_awsidc = new /aws1/cl_eksargocdawsidccfgreq(
iv_idcinstancearn = |string|
iv_idcregion = |string|
)
io_networkaccess = new /aws1/cl_eksargocdnetacccfgreq(
it_vpceids = VALUE /aws1/cl_eksstringlist_w=>tt_stringlist(
( new /aws1/cl_eksstringlist_w( |string| ) )
)
)
it_rbacrolemappings = VALUE /aws1/cl_eksargocdrolemapping=>tt_argocdrolemappinglist(
(
new /aws1/cl_eksargocdrolemapping(
it_identities = VALUE /aws1/cl_eksssoidentity=>tt_ssoidentitylist(
(
new /aws1/cl_eksssoidentity(
iv_id = |string|
iv_type = |string|
)
)
)
iv_role = |string|
)
)
)
iv_namespace = |string|
)
)
it_tags = VALUE /aws1/cl_ekstagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_ekstagmap_w=>ts_tagmap_maprow(
key = |string|
value = new /aws1/cl_ekstagmap_w( |string| )
)
)
)
iv_capabilityname = |string|
iv_clientrequesttoken = |string|
iv_clustername = |string|
iv_deletepropagationpolicy = |string|
iv_rolearn = |string|
iv_type = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_capability = lo_result->get_capability( ).
IF lo_capability IS NOT INITIAL.
lv_string = lo_capability->get_capabilityname( ).
lv_string = lo_capability->get_arn( ).
lv_string = lo_capability->get_clustername( ).
lv_capabilitytype = lo_capability->get_type( ).
lv_string = lo_capability->get_rolearn( ).
lv_capabilitystatus = lo_capability->get_status( ).
lv_string = lo_capability->get_version( ).
lo_capabilityconfiguration = lo_capability->get_configuration( ).
IF lo_capabilityconfiguration IS NOT INITIAL.
lo_argocdconfigresponse = lo_capabilityconfiguration->get_argocd( ).
IF lo_argocdconfigresponse IS NOT INITIAL.
lv_string = lo_argocdconfigresponse->get_namespace( ).
lo_argocdawsidcconfigrespo = lo_argocdconfigresponse->get_awsidc( ).
IF lo_argocdawsidcconfigrespo IS NOT INITIAL.
lv_string = lo_argocdawsidcconfigrespo->get_idcinstancearn( ).
lv_string = lo_argocdawsidcconfigrespo->get_idcregion( ).
lv_string = lo_argocdawsidcconfigrespo->get_idcmanagedapplicationarn( ).
ENDIF.
LOOP AT lo_argocdconfigresponse->get_rbacrolemappings( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_argocdrole = lo_row_1->get_role( ).
LOOP AT lo_row_1->get_identities( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_id( ).
lv_ssoidentitytype = lo_row_3->get_type( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lo_argocdnetworkaccessconf = lo_argocdconfigresponse->get_networkaccess( ).
IF lo_argocdnetworkaccessconf IS NOT INITIAL.
LOOP AT lo_argocdnetworkaccessconf->get_vpceids( ) 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.
lv_string = lo_argocdconfigresponse->get_serverurl( ).
ENDIF.
ENDIF.
LOOP AT lo_capability->get_tags( ) into ls_row_6.
lv_key = ls_row_6-key.
lo_value = ls_row_6-value.
IF lo_value IS NOT INITIAL.
lv_tagvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lo_capabilityhealth = lo_capability->get_health( ).
IF lo_capabilityhealth IS NOT INITIAL.
LOOP AT lo_capabilityhealth->get_issues( ) into lo_row_7.
lo_row_8 = lo_row_7.
IF lo_row_8 IS NOT INITIAL.
lv_capabilityissuecode = lo_row_8->get_code( ).
lv_string = lo_row_8->get_message( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_timestamp = lo_capability->get_createdat( ).
lv_timestamp = lo_capability->get_modifiedat( ).
lv_capabilitydeletepropaga = lo_capability->get_deletepropagationpolicy( ).
ENDIF.
ENDIF.