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 perform. 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 instance type 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:
|
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. Set this parameter to the name of the Container Registry Enterprise Edition instance. The name can be 3 to 30 characters in length and can contain lowercase letters, digits, and hyphens (-). The name cannot start or end with a hyphen (-). |
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:
|
Parameter.5.Code | String | Yes | 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.
|
Parameter.5.Value | String | Yes | my-customized-oss-bucket | The value of the fifth attribute for the Container Registry Enterprise Edition instance.
Set this parameter to the name of the custom OSS bucket.
Note If the value of the fourth attribute is
false , the Container Registry Enterprise Edition instance uses a custom OSS bucket. In
this case, this parameter is required.
|
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 |
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. |
RenewPeriod | Integer | No | 12 |
The auto-renewal period. Unit: month. Note This parameter is required if the
RenewalStatus parameter is set to AutoRenewal .
|
Period | Integer | Yes | 12 | The subscription period.
Unit: month. The value must be an integral multiple of 12. Note This parameter is required if you create a subscription instance.
|
RenewalStatus | String | No | ManualRenewal | The renewal method. Valid values:
Default value: |
ClientToken | String | No | XJSYHDKALSS**** | The client token that is used to ensure the idempotence of the request. The server checks whether a request that uses the same client token has been received. If a request that uses the same client token has been received, the server returns the same request result as the previous request. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | Success | The returned code. |
Data | Struct | Struct | The returned information. |
InstanceId | String | cri-**** | The ID of the created Container Registry Enterprise Edition instance. |
OrderId | String | 20857**** | The order ID of the created Container Registry Enterprise Edition instance. |
Message | String | Successful | The returned message that corresponds to the returned code. |
RequestId | String | A555455B-EA70-4114-AB0D-A35E75F8**** | The ID of the request. |
Success | Boolean | true | Indicates whether the call was successful. Valid values:
|
Examples
Sample request
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, visit the API Error Center.