All Products
Search
Document Center

Compute Nest:CreateService

Last Updated:Oct 23, 2025

Creates a service by specifying parameters, such as the region ID, deployment type, service type, and service name.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

computenestsupplier:CreateService

create

*Service

acs:computenestsupplier:{#regionId}:{#accountId}:service/*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-hangzhou

ClientToken

string

No

A client token used to ensure the idempotence of the request. Generate a unique value for this parameter from your client. `ClientToken` supports only ASCII characters.

10CM943JP0EN9D51H

ServiceId

string

No

The service ID.

service-0e6fca6a51a544xxxxxx

DeployType

string

Yes

The deployment type. Valid values:

  • ros: The service is deployed using ROS.

  • terraform: The service is deployed using Terraform.

  • ack: The service is deployed using ACK.

  • spi: The service is deployed by invoking an SPI.

  • operation: The service is an O&M service.

ros

DeployMetadata

string

No

The deployment configuration of the service. The information stored varies by deployment type. Different deployment types have different data formats. The data is stored in a JSON string.

{\"TemplateConfigs\":[{\"Name\":\"模板1\",\"Url\":\"oss://computenest-test/template" + ".json?RegionId=cn-beijing\",\"PredefinedParameters\":[{\"Name\":\"低配版\"," + "\"Parameters\":{\"InstanceType\":\"ecs.g5.large\",\"DataDiskSize\":40}},{\"Name\":\"高配版\"," + "\"Parameters\":{\"InstanceType\":\"ecs.g5.large\",\"DataDiskSize\":200}}]}]}

ServiceType

string

No

The service type. Valid values:

  • private: The service instance is deployed in the user's account.

  • managed: The service instance is managed in the service provider's account.

  • operation: An O&M service instance.

  • poc: A trial service instance.

private

ServiceInfo

array<object>

No

The service details.

array<object>

No

The service details.

Locale

string

Yes

The language of the service. Valid values:

  • zh-CN: Chinese.

  • en-US: English.

zh-CN

ShortDescription

string

No

A brief description of the service.

TiDB是A公司自主设计、研发的开源分布式关系型数据库。

Image

string

No

The URL of the service icon.

http://img.tidb.oss.url

Name

string

Yes

The service name.

TiDB Database

LongDescriptionUrl

string

No

The detailed description of the service.

http://description.tidb.oss.url

Agreements

array<object>

No

The information about the service agreements.

object

No

The information about the service agreements.

Name

string

No

The name of the agreement.

Name

Url

string

No

The URL of the agreement.

https://aliyun.com/xxxxxxxx.html

Softwares

array<object>

No

The information about the software used in the service.

object

No

The information about the software used in the service.

Name

string

No

The software name.

MySQL

Version

string

No

The software version.

5.7

IsSupportOperated

boolean

No

Specifies whether to enable O&M. Default value: false. Valid values:

  • true: Enabled.

  • false: Disabled.

Note

This parameter is required when `ServiceType` is set to `private`.

false

PolicyNames

string

No

The policy name. The name of a single policy can be up to 128 characters in length. Separate multiple names with commas (,). Only policies related to O&M parameters are supported.

policyName1, policyName2

Duration

integer

No

The O&M duration. Unit: seconds.

0

AlarmMetadata

string

No

The alert configurations for the service.

Note

This configuration takes effect only after an alert-related access policy is configured in `PolicyNames`.

{ "TemplateUrl": "http://template.file.url", // 应用分组级别告警元数据 "ApplicationGroups": [ { "Name": "applicationGroup1", "TemplateUrl": "url1" }, { "Name": "applicationGroup2", "TemplateUrl": "url2" } ] }

ShareType

string

No

The sharing type. Valid values:

  • Public: The service is public. Full and trial deployments are not restricted.

  • Restricted: The service is restricted. Full and trial deployments are restricted.

  • OnlyFormalRestricted: Only full deployments are restricted.

  • OnlyTrailRestricted: Only trial deployments are restricted.

  • Hidden: The service is hidden. It is not visible and you cannot request deployment permissions.

Public

ApprovalType

string

No

The approval type for service usage requests. Valid values:

  • Manual: The request requires manual approval.

  • AutoPass: The request is automatically approved.

Manual

VersionName

string

No

The version name.

Draft

UpgradeMetadata

string

No

The upgrade metadata.

{\"Description\":\"xxx\",\"SupportRollback\":true,\"SupportUpgradeFromVersions\":[],\"UpgradeComponents\":[\"Configuration\"]}

TrialDuration

integer

No

The trial duration. Unit: days. The maximum trial duration is 30 days.

7

Tag

array<object>

No

The custom tags.

object

No

The custom tags.

Key

string

No

The tag key.

Usage

Value

string

No

The tag value.

Web

TenantType

string

No

The tenant type. Valid values:

  • SingleTenant: Single-tenant.

  • MultiTenant: Multitenant.

SingleTenant

LicenseMetadata

string

No

The license metadata.

{\"RetentionDays\":3}

OperationMetadata

string

No

The O&M configuration.

{\"PrometheusConfigMap\":{\"New_Vpc_Ack_And_Jumpserver\":{}}}

ResourceGroupId

string

No

The resource group ID.

rg-aek25refu7r3opq

LogMetadata

string

No

The application log configuration.

{ "Logstores": \[ { "LogstoreName": "access-log", "LogPath": "/home/admin/app/logs", # This parameter is not required for containers. Configure the parameter in the YAML file. "FilePattern": "access.log\*" # This parameter is not required for containers. Configure the parameter in the YAML file. } ] }

SourceServiceId

string

No

The ID of the source service for distribution.

service-70a3b15bb62643xxxxxx

SourceServiceVersion

string

No

The version of the source service for distribution.

1

Resellable

boolean

No

Specifies whether the service can be distributed. Valid values:

  • false: The service cannot be distributed.

  • true: The service can be distributed.

false

BuildParameters

string

No

The parameters for building the service.

{ "ServiceTemplateId": "st-xxxxx"}

DryRun

boolean

No

Specifies whether to perform a dry run to check the request.

true

ComplianceMetadata

object

No

The compliance check metadata.

CompliancePacks

array

No

The selected compliance packages.

string

No

The selected compliance package. Valid value:

  • VpcDataRisk: The compliance package for data security risks in a VPC.

VpcDataRisk

Response elements

Element

Type

Description

Example

object

Status

string

The service status.

Created

RequestId

string

The request ID.

4DB0F536-B3BE-4F0D-BD29-E83FB56D550C

Version

string

The service version.

draft

ServiceId

string

The service ID.

service-0e6fca6a51a544xxxxxx

DryRunResult

object

The check result.

RolePolicy

object

The access policy of the deployment role.

Policy

string

The access policy required for the deployment role.

{ "Statement": [{ "Action": ["oos:CancelExecutions", "oos:DeleteExecutions", "oos:GetTemplate", "oos:ListExecutions", "oos:ListTemplates", "oos:NotifyExecution", "oos:StartExecution"], "Effect": "Allow", "Resource": "*" }, { "Action": ["ram:PassRole"], "Effect": "Allow", "Resource": "*" }, { "Action": ["ros:CreateStack", "ros:GetStack", "ros:UpdateStack", "ros:ListStackEvents", "ros:ListStackResources", "ros:ListStackResources", "ros:DeleteStack", "ram:GetRole"], "Effect": "Allow", "Resource": "*" }], "Version": "1" }

MissingPolicy

array<object>

The missing access policies for the deployment role.

object

The missing access policies for the deployment role.

ServiceName

string

The service name in the access policy.

ecs

Resource

string

The resource in the access policy.

*

Action

array

The operations in the access policy.

string

The operations in the access policy.

CreateStack

Examples

Success response

JSON format

{
  "Status": "Created",
  "RequestId": "4DB0F536-B3BE-4F0D-BD29-E83FB56D550C",
  "Version": "draft",
  "ServiceId": "service-0e6fca6a51a544xxxxxx",
  "DryRunResult": {
    "RolePolicy": {
      "Policy": "{\n\t\"Statement\": [{\n\t\t\"Action\": [\"oos:CancelExecutions\", \"oos:DeleteExecutions\", \"oos:GetTemplate\", \"oos:ListExecutions\", \"oos:ListTemplates\", \"oos:NotifyExecution\", \"oos:StartExecution\"],\n\t\t\"Effect\": \"Allow\",\n\t\t\"Resource\": \"*\"\n\t}, {\n\t\t\"Action\": [\"ram:PassRole\"],\n\t\t\"Effect\": \"Allow\",\n\t\t\"Resource\": \"*\"\n\t}, {\n\t\t\"Action\": [\"ros:CreateStack\", \"ros:GetStack\", \"ros:UpdateStack\", \"ros:ListStackEvents\", \"ros:ListStackResources\", \"ros:ListStackResources\", \"ros:DeleteStack\", \"ram:GetRole\"],\n\t\t\"Effect\": \"Allow\",\n\t\t\"Resource\": \"*\"\n\t}],\n\t\"Version\": \"1\"\n}",
      "MissingPolicy": [
        {
          "ServiceName": "ecs",
          "Resource": "*",
          "Action": [
            "CreateStack"
          ]
        }
      ]
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.