This topic describes how to call Container Registry API operations by using graphical interfaces, OpenAPI Explorer, Alibaba Cloud SDKs, and Resource Orchestration Service (ROS).
Overview of OpenAPI Explorer
Alibaba Cloud provides OpenAPI Explorer for developers to understand and use the API operations of Alibaba Cloud services in a quick and efficient manner. OpenAPI Explorer integrates multiple features related to API operations, including intelligent search, documentation, online debugging, SDK download, sample code, error diagnosis, and call statistics. In OpenAPI Explorer, you can call API operations of Alibaba Cloud services and view API requests and responses. In addition, OpenAPI Explorer automatically generates corresponding SDK sample code to facilitate the use of Alibaba Cloud services. For more information, see What is an API?
Version description
API version | Description |
Recommended |
Online debugging
Container Registry provides API debugging in OpenAPI Explorer. Before you call an API operation, you must understand the versions, endpoint description, and integration methods provided by Container Registry.
Debugging page
The URL for API debugging is https://next.api.aliyun.com/api/cr/2018-12-01/GetInstance.
Endpoint description
The management services of Container Registry are available in multiple regions. The endpoint of your Container Registry instance can contain the region ID of the instance. Format: cr.{regionId}.aliyuncs.com
. If you want faster responses, you can use a virtual private cloud (VPC) endpoint. Format: cr-vpc.{regionId}.aliyuncs.com
. For more information about endpoints, see Endpoints.
Identities
After you log on to OpenAPI Explorer by using your Alibaba Cloud account, OpenAPI Explorer uses your Alibaba Cloud account to debug API operations online by default. An Alibaba Cloud account has permissions on all API operations. Security risks may arise if you use an Alibaba Cloud account to call API operations. We recommend that you call API operations or perform routine O&M as a Resource Access Management (RAM) user. Before you call API operations by using a RAM user, grant the required permissions to the RAM user based on your business requirements. The RAM user must have permissions to operate Container Registry resources. For more information, see Attach system policies to the RAM user.
Identity | Supported |
Yes | |
RAM user (recommended) | Yes |
RAM role (recommended) | Yes |
Integration methods
SDKs can be easily integrated with your applications and cover the widest range of operations. We recommend that you use SDKs to call API operations.
Overview of calling methods
Calling method | Supported |
(Recommended) Alibaba Cloud SDKs | Yes |
Yes | |
Yes | |
Yes | |
Yes |
Alibaba Cloud SDKs
Alibaba Cloud provides SDKs in multiple programming languages, including Java, C#, Go, Python, TypeScript, Node.js, PHP, and C++. You can integrate SDKs into your applications to directly call API operations. The SDKs encapsulate information such as the signature logic, timeout mechanism, and retry mechanism and return structured response objects based on specifications. This provides convenience for developers. For more information, see Alibaba Cloud SDKs.
You can call Container Registry API operations in OpenAPI Explorer by using Alibaba Cloud SDK. For more information about supported languages and how to install dependencies, see Container Registry SDK.
Alibaba Cloud CLI
You can run aliyun
commands to interact with Alibaba Cloud services and manage cloud service resources. For more information, see What is Alibaba Cloud CLI?
Terraform
Terraform is an open source tool that is used to preview, configure, and manage cloud infrastructure and resources in a secure and efficient manner. Terraform works in a similar way as ROS. Terraform calls API operations by interpreting templates. For more information, see What is Terraform?
For more information about how to use Terraform to orchestrate Container Registry, see Terraform usage examples.
The following table shows the Alibaba Cloud Resource Names (ARNs) of Container Registry that Terraform can orchestrate.
ARNs
Description
Creates synchronization rules of Container Registry Enterprise Edition.
Creates Container Registry Enterprise Edition instances.
Creates namespaces of Container Registry Enterprise Edition instances.
Creates image repositories of Container Registry Enterprise Edition instances.
Configures image pipeline resources.
Configures chart namespace resources.
Configures chart repository resources.
Manage network access control.
Configures the integration of Container Registry Enterprise Edition and Virtual Private Cloud (VPC).
Custom API encapsulation
To make native HTTP calls, you must create custom requests and sign the requests. For more information about the signature mechanism, see Custom encapsulation.