/AWS1/IF_ECR=>CREATEPULLTHROUGHCACHERULE()¶
About CreatePullThroughCacheRule¶
Creates a pull through cache rule. A pull through cache rule provides a way to cache images from an upstream registry source in your Amazon ECR private registry. For more information, see Using pull through cache rules in the Amazon Elastic Container Registry User Guide.
Method Signature¶
METHODS /AWS1/IF_ECR~CREATEPULLTHROUGHCACHERULE
IMPORTING
!IV_ECRREPOSITORYPREFIX TYPE /AWS1/ECRPULLTHRUCACHERLREPO00 OPTIONAL
!IV_UPSTREAMREGISTRYURL TYPE /AWS1/ECRURL OPTIONAL
!IV_REGISTRYID TYPE /AWS1/ECRREGISTRYID OPTIONAL
!IV_UPSTREAMREGISTRY TYPE /AWS1/ECRUPSTREAMREGISTRY OPTIONAL
!IV_CREDENTIALARN TYPE /AWS1/ECRCREDENTIALARN OPTIONAL
!IV_CUSTOMROLEARN TYPE /AWS1/ECRCUSTOMROLEARN OPTIONAL
!IV_UPSTREAMREPOSITORYPREFIX TYPE /AWS1/ECRPULLTHRUCACHERLREPO00 OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ecrcrepullthrucache01
RAISING
/AWS1/CX_ECRINVALIDPARAMETEREX
/AWS1/CX_ECRLIMITEXCEEDEDEX
/AWS1/CX_ECRPULLTHRUCACHERLA00
/AWS1/CX_ECRSECRETNOTFOUNDEX
/AWS1/CX_ECRSERVEREXCEPTION
/AWS1/CX_ECRUNABLETOACCSECRE00
/AWS1/CX_ECRUNABLETODECRYPTS00
/AWS1/CX_ECRUNSUPPEDUPSTRMRE00
/AWS1/CX_ECRVALIDATIONEX
/AWS1/CX_ECRCLIENTEXC
/AWS1/CX_ECRSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_ecrrepositoryprefix TYPE /AWS1/ECRPULLTHRUCACHERLREPO00 /AWS1/ECRPULLTHRUCACHERLREPO00¶
The repository name prefix to use when caching images from the source registry.
There is always an assumed
/applied to the end of the prefix. If you specifyecr-publicas the prefix, Amazon ECR treats that asecr-public/.
iv_upstreamregistryurl TYPE /AWS1/ECRURL /AWS1/ECRURL¶
The registry URL of the upstream public registry to use as the source for the pull through cache rule. The following is the syntax to use for each supported upstream registry.
Amazon ECR (
ecr) –.dkr.ecr. .amazonaws.com Amazon ECR Public (
ecr-public) –public.ecr.awsDocker Hub (
docker-hub) –registry-1.docker.ioGitHub Container Registry (
github-container-registry) –ghcr.ioGitLab Container Registry (
gitlab-container-registry) –registry.gitlab.comKubernetes (
k8s) –registry.k8s.ioMicrosoft Azure Container Registry (
azure-container-registry) –.azurecr.io Quay (
quay) –quay.io
Optional arguments:¶
iv_registryid TYPE /AWS1/ECRREGISTRYID /AWS1/ECRREGISTRYID¶
The Amazon Web Services account ID associated with the registry to create the pull through cache rule for. If you do not specify a registry, the default registry is assumed.
iv_upstreamregistry TYPE /AWS1/ECRUPSTREAMREGISTRY /AWS1/ECRUPSTREAMREGISTRY¶
The name of the upstream registry.
iv_credentialarn TYPE /AWS1/ECRCREDENTIALARN /AWS1/ECRCREDENTIALARN¶
The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that identifies the credentials to authenticate to the upstream registry.
iv_customrolearn TYPE /AWS1/ECRCUSTOMROLEARN /AWS1/ECRCUSTOMROLEARN¶
Amazon Resource Name (ARN) of the IAM role to be assumed by Amazon ECR to authenticate to the ECR upstream registry. This role must be in the same account as the registry that you are configuring.
iv_upstreamrepositoryprefix TYPE /AWS1/ECRPULLTHRUCACHERLREPO00 /AWS1/ECRPULLTHRUCACHERLREPO00¶
The repository name prefix of the upstream registry to match with the upstream repository name. When this field isn't specified, Amazon ECR will use the
ROOT.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ecrcrepullthrucache01 /AWS1/CL_ECRCREPULLTHRUCACHE01¶
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->createpullthroughcacherule(
iv_credentialarn = |string|
iv_customrolearn = |string|
iv_ecrrepositoryprefix = |string|
iv_registryid = |string|
iv_upstreamregistry = |string|
iv_upstreamregistryurl = |string|
iv_upstreamrepositoryprefix = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_pullthroughcacherulerep = lo_result->get_ecrrepositoryprefix( ).
lv_url = lo_result->get_upstreamregistryurl( ).
lv_creationtimestamp = lo_result->get_createdat( ).
lv_registryid = lo_result->get_registryid( ).
lv_upstreamregistry = lo_result->get_upstreamregistry( ).
lv_credentialarn = lo_result->get_credentialarn( ).
lv_customrolearn = lo_result->get_customrolearn( ).
lv_pullthroughcacherulerep = lo_result->get_upstreamrepositoryprefix( ).
ENDIF.