CreateInstance

Updated at:

Creates a Container Registry Enterprise Edition instance and automatically completes the payment.

Debugging

Run this API directly in OpenAPI Explorer. OpenAPI Explorer eliminates the need to calculate signatures and automatically generates SDK code examples after a successful call.

Request parameters

Name

Type

Required

Example

Description

Action

String

Yes

CreateInstance

The operation to perform. Set the value to CreateInstance.

Parameter.1.Code

String

Yes

InstanceType

The instance type parameter key. Set the value to InstanceType.

Parameter.1.Value

String

Yes

Standard

The instance type. Valid values: Basic (Basic instance) and Advanced

Economy: An instance of the Economy edition.

Standard: Standard instance.

(Premium Edition instance).

Parameter.2.Code

String

Yes

InstanceName

The instance name parameter key. Set the value to InstanceName.

Parameter.2.Value

String

Yes

auto-create-instance

The instance name. The name must be 3–30 characters and can contain lowercase letters, digits, and delimiters. It cannot start or end with a delimiter.

Parameter.3.Code

String

Yes

Region

The region parameter key. Set the value to Region.

Parameter.3.Value

String

Yes

cn-shanghai

The region where the instance is deployed. For supported regions, see Supported regions.

Parameter.4.Code

String

Yes

DefaultOssBucket

The OSS bucket configuration key. Set the value to DefaultOssBucket.

Parameter.4.Value

String

Yes

true

Specifies whether to use the default Object Storage Service (OSS) bucket. Valid values: true (use the default OSS bucket) and false (use a custom OSS bucket).

Parameter.5.Code

String

No

InstanceStorageName

The custom OSS bucket name parameter key. Set the value to InstanceStorageName. Required when Parameter.4.Value is false.

Parameter.5.Value

String

No

my-customized-oss-bucket

The name of the custom OSS bucket. Required when Parameter.4.Value is false.

Parameter.6.Code

String

No

image_scanner

The image scanning engine parameter key. Set the value to image_scanner.

Parameter.6.Value

String

No

ACR

The image scanning engine. Valid values: ACR (default Trivy scan engine) and SAS (Security Center scan engine with enhanced capabilities).

Parameter.7.Code

String

No

NamespaceQuota

The additional namespace quota parameter key. Set the value to NamespaceQuota.

Parameter.7.Value

String

No

10

The number of additional namespace quotas to purchase.

Parameter.8.Code

String

No

RepoQuota

The additional repository quota parameter key. Set the value to RepoQuota.

Parameter.8.Value

String

No

1000

The number of additional repository quotas to purchase.

Parameter.9.Code

String

No

vpc_num

The Virtual Private Cloud (VPC) access control quota parameter key. Set the value to vpc_num.

Parameter.9.Value

String

No

10

The number of VPC access control quotas to purchase.

ProductCode

String

Yes

acr

The product code. Set the value to acr for Container Registry Enterprise Edition instances.

SubscriptionType

String

Yes

Subscription

The billing method. Set the value to Subscription.

ProductType

String

No

acr_ee_public_cn

The product type. For instances on the Alibaba Cloud International site, set the value to acr_ee_public_intl.

For Container Registry Enterprise Edition instances on the Alibaba Cloud China Website (www.aliyun.com), the product type is acr_ee_public_cn.

RenewPeriod

Integer

No

12

The auto-renewal period. Unit: month. Required when RenewalStatus is AutoRenewal.

Period

Integer

Yes

12

The subscription period. Unit: month. For annual subscriptions, use a multiple of 12. When RenewalStatus is AutoRenewal, this value must be greater than 0.

RenewalStatus

String

No

AutoRenewal

The renewal method. Valid values: AutoRenewal (auto-renewal) and ManualRenewal (manual renewal). Default value: ManualRenewal.

ClientToken

String

No

XJSYHDKALSS\*\*\*\*

The client token used to ensure idempotence. If the server receives a request with the same token, it returns the result of the original request.

Response parameters

Name

Type

Example

Description

Code

String

Success

The status code.

Data

Struct

The response data.

InstanceId

String

cri-\*\*\*\*

The instance ID.

OrderId

String

20857\*\*\*\*

The order ID.

Message

String

Successful!

The message corresponding to Code.

RequestId

String

A555455B-EA70-4114-AB0D-A35E75F8\*\*\*\*

The request ID.

Success

Boolean

true

Indicates whether the request succeeded. Valid values: true (success) and false (failure).

Examples

Sample request:

http(s)://[Endpoint]/?Action=CreateInstance
&Parameter.1.Code=InstanceType
&Parameter.1.Value=Advanced
&Parameter.2.Code=InstanceName
&Parameter.2.Value=auto-create-instance
&Parameter.3.Code=Region
&Parameter.3.Value=cn-shanghai
&Parameter.4.Code=DefaultOssBucket
&Parameter.4.Value=true
&Parameter.5.Code=InstanceStorageName
&Parameter.5.Value=my-customized-oss-bucket
&ProductCode=acr
&SubscriptionType=Subscription
&ProductType=acr_ee_public_cn
&RenewPeriod=12
&Period=12
&RenewalStatus=ManualRenewal
&ClientToken=XJSYHDKALSS****
&<Common request parameters>

Sample success responses:

XML format:

<code>Success</code>
<IsSuccess>true</IsSuccess>
<data>
    <instanceId>cri-****</instanceId>
    <orderId>214*****</orderId>
</data>
<message>Successful!</message>
<requestId>00AE3C85-048C-575E-A599-***********</requestId>
<success>true</success>

JSON format:

{
    "code": "Success",
    "IsSuccess": true,
    "data": {
        "instanceId": "cri-****",
        "orderId": "214*****"
    },
    "message": "Successful!",
    "requestId": "00AE3C85-048C-575E-A599-***********",
    "success": true
}

Error codes

For a list of error codes, see Service error codes.