All Products
Search
Document Center

:CreateInstance

Last Updated:Aug 12, 2024

Creates and pays for a Container Registry Enterprise Edition instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action

String

Yes

CreateInstance

The operation that you want to call. Set the value to CreateInstance.

Parameter.1.Code

String

Yes

InstanceType

The name of the first attribute for the Container Registry Enterprise Edition instance. Set this parameter to InstanceType. This attribute specifies the sub-edition of the Container Registry Enterprise Edition instance.

Parameter.1.Value

String

Yes

Standard

The value of the first attribute for the Container Registry Enterprise Edition instance. Valid values:

  • Basic: Basic Edition

  • Standard: Standard Edition

  • Advanced: Advanced Edition

Parameter.2.Code

String

Yes

InstanceName

The name of the second attribute for the Container Registry Enterprise Edition instance. Set this parameter to InstanceName. This attribute specifies the name of the Container Registry Enterprise Edition instance.

Parameter.2.Value

String

Yes

auto-create-instance

The value of the second attribute for the Container Registry Enterprise Edition instance.

The name can be 3 to 30 characters in length and can contain lowercase letters, digits, and delimiters. The name cannot start or end with a delimiter.

Parameter.3.Code

String

Yes

Region

The name of the third attribute for the Container Registry Enterprise Edition instance. Set this parameter to Region. This attribute specifies the region in which you want to create the Container Registry Enterprise Edition instance.

Parameter.3.Value

String

Yes

cn-shanghai

The value of the third attribute for the Container Registry Enterprise Edition instance. Set this parameter to the ID of a region where Container Registry Enterprise Edition is available. For more information about the regions where Container Registry Enterprise Edition is available, see Supported regions.

Parameter.4.Code

String

Yes

DefaultOssBucket

The name of the fourth attribute for the Container Registry Enterprise Edition instance. Set this parameter to DefaultOssBucket. This attribute specifies whether the Container Registry Enterprise Edition instance uses the default Object Storage Service (OSS) bucket.

Parameter.4.Value

String

Yes

true

The value of the fourth attribute for the Container Registry Enterprise Edition instance. Valid values:

  • true: The Container Registry Enterprise Edition instance uses the default OSS bucket.

    Note

    If you set the value to true, the Container Registry Enterprise Edition instance uses the default OSS bucket. You do not need to set the Code and Value of the fifth attribute.

  • false: The Container Registry Enterprise Edition instance uses a custom OSS bucket.

    Note

    If you set the value to false, the Container Registry Enterprise Edition instance uses a custom OSS bucket. In this case, you must set the Code and Value of the fifth attribute.

Parameter.5.Code

String

No

InstanceStorageName

The name of the fifth attribute for the Container Registry Enterprise Edition instance. Set this parameter to InstanceStorageName. This attribute specifies the name of the custom OSS bucket that the Container Registry Enterprise Edition instance uses.

Parameter.5.Value

String

No

my-customized-oss-bucket

The value of the fifth attribute for the Container Registry Enterprise Edition instance.

ProductCode

String

Yes

acr

The code of the service to which the instance belongs.

Set the value to acr.

SubscriptionType

String

Yes

Subscription

The billing method of the instance.

Set the value to Subscription.

ProductType

String

No

acr_ee_public_cn

The type of the instance. Valid values:

Set the value to acr_ee_public_intl for Container Registry Enterprise Edition instances in the international site (alibabacloud.com).

RenewPeriod

Integer

No

12

The auto-renewal period. Unit: month.

Note

You must specify this parameter if you set RenewalStatus to AutoRenewal.

Period

Integer

Yes

12

The subscription period.

Unit: month. If you want to subscribe to the service by year, enter an integral multiple of 12.

Note

You must specify this parameter if you set SubscriptionType to Subscription.

RenewalStatus

String

No

ManualRenewal

The renewal mode. Valid values:

  • AutoRenewal

  • ManualRenewal

Default value: ManualRenewal.

ClientToken

String

No

XJSYHDKALSS****

The client token that is used to ensure the idempotence of the request. The server checks whether a request with the same client token has been received. If yes, the server returns the query result of the last request.

Response parameters

Parameter

Type

Example

Description

Code

String

Success

The status code.

Data

Struct

Struct

The returned information.

InstanceId

String

cri-****

The ID of the created Container Registry Enterprise Edition instance.

OrderId

String

20857****

The ID of the order.

Message

String

Successful!

The returned message that corresponds to the returned status code.

RequestId

String

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

The request ID.

Success

Boolean

true

Indicates whether the request is successful. Valid values:

  • true: The request is successful.

  • false: The request fails.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateInstance
&Parameter.1.Code=InstanceType
&Parameter.1.Value=Standard
&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.