All Products
Search
Document Center

Compute Nest:UpdateService

Last Updated:Oct 22, 2025

Updates a service.

Operation description

Only approved services can be published.

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:UpdateService

update

*Service

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

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-hangzhou

DeployType

string

No

The deployment type. Valid values:

  • ros: The service is deployed using ROS.

  • terraform: The service is deployed using Terraform.

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

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

  • container: The service is deployed using containers.

  • pkg: The service is a package service.

ros

DeployMetadata

string

No

The information about the service deployment configuration. The data format varies based on the deployment type. The value is a JSON string.

{\"EstimateTime\":null,\"SupplierDeployMetadata\":{\"DeployTimeout\":7200},\"EnableVnc\":false}

AlarmMetadata

string

No

The alert configurations for the service.

Note

This configuration takes effect only after you configure an alert-related access policy for PolicyNames.

{\"CmsTemplateId\":1162921,\"TemplateUrl\":\"https://service-info-private.oss-cn-hangzhou.aliyuncs.com/1760465342xxxxxx/template/c072ef50-6c03-4d9c-8f0e-d1c440xxxxxx.json\"}

ClientToken

string

No

A client token to ensure that the request is idempotent. You can use a client to generate the token. Make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

788E7CP0EN9D51P

ServiceId

string

Yes

The service ID.

service-1dda29c3eca648xxxxxx

ServiceType

string

No

The service type. Valid values:

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

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

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

  • poc: The service instance is a trial instance.

private

ServiceInfo

array<object>

No

The service details.

array<object>

No

The service details.

Locale

string

No

The language of the service. Valid values:

  • zh-CN: Chinese.

  • en-US: English.

zh-CN

ShortDescription

string

No

The description of the service.

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

Image

string

No

The URL of the service icon.

http://img.tidb.oss.url

Name

string

No

The service name.

B数据库

LongDescriptionUrl

string

No

The URL of the detailed description of the service.

http://description.tidb.oss.url

Agreements

array

No

The information about the service agreements.

object

No

The information about the service agreements.

Name

string

No

The name of the agreement document.

Name

Url

string

No

The URL of the agreement.

https://aliyun.com/xxxxxxxx.html

Softwares

array

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: enables O&M.

  • false: disables O&M.

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. If you specify multiple policies, separate them with commas (,). Only O&M-related policies are supported.

policyName1, policyName2

Duration

integer

No

The O&M duration. Unit: seconds.

259200

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

ServiceVersion

string

No

The service version.

1

TenantType

string

No

The tenant type. Valid values:

  • SingleTenant: The service is single-tenant.

  • MultiTenant: The service is multi-tenant.

SingleTenant

LicenseMetadata

string

No

The license metadata.

{\"PayType\":\"CustomFixTime\",\"DefaultLicenseDays\":7,\"CustomMetadata\":[{\"TemplateName\":\"模板1\",\"SpecificationName\":\"bandwith-0\",\"CustomData\":\"1\"}]}

OperationMetadata

string

No

The O&M configuration.

{\"PrometheusConfigMap\":{\"Custom_Image_Ecs\":{\"EnablePrometheus\":false}}}

LogMetadata

string

No

The application log configurations.

{ "Logstores": [ { "LogstoreName": "access-log", "LogPath": "/home/admin/app/logs", # 对容器不需要,在YAML中配置 "FilePattern": "access.log*" # 对容器不需要,在YAML中配置 } ] }

Resellable

boolean

No

Specifies whether to enable distribution. Valid values:

  • false: Distribution is not enabled.

  • true: Distribution is enabled.

false

UpdateOption

object

No

The update options.

UpdateFrom

string

No

The update option. Valid values:

  • CODE: code.

  • PARAMETERS: parameters.

PARAMETERS

UpdateArtifact

boolean

No

Specifies whether to update the deployment file.

true

Commodity

object

No

The commodity information.

SpecificationMappings

array

No

The mapping between commodity specifications and templates or packages. This parameter is used in the subscription scenario of Alibaba Cloud Marketplace.

object

No

The mapping between commodity specifications and templates or packages. This parameter is used in the subscription scenario of Alibaba Cloud Marketplace.

TemplateName

string

No

The template name.

模板1

SpecificationName

string

No

The package name.

低配版

SpecificationCode

string

No

The specification code.

yuncode5767800001

MeteringEntityMappings

array

No

The mapping between templates or packages and metering dimensions. This parameter is used in the pay-as-you-go scenario of Alibaba Cloud Marketplace.

object

No

The mapping between templates or packages and metering dimensions. This parameter is used in the pay-as-you-go scenario of Alibaba Cloud Marketplace.

TemplateName

string

No

The template name.

模板1

SpecificationName

string

No

The package name.

低配版

EntityIds

array

No

The metering item ID.

string

No

The metering item ID.

cmgj0006xxxx-Memory-1

MeteringEntityExtraInfos

array

No

The configuration information of the metering item. This parameter is used in the pay-as-you-go scenario of Alibaba Cloud Marketplace.

object

No

The configuration information of the metering item.

EntityId

string

No

The metering item ID.

cmgj0006xxxx-Memory-1

Type

string

No

The type. Valid values:

  • Custom

  • ComputeNestBill

  • ComputeNestPrometheus

  • ComputeNestTime

Custom

MetricName

string

No

The metric name. This parameter is required when Type is set to ComputeNestBill or ComputeNestPrometheus.

VirtualCpu/ecs.InstanceType

Promql

string

No

The Prometheus statement.

avg_over_time(sum(rate(container_cpu_usage_seconds_total{namespace=~"ALIYUN::StackName"}[2m]))[1h:10s])

ComponentsMappings

array

No

This parameter is not available.

array<object>

No

This parameter is not available.

TemplateName

string

No

This parameter is not available.

此参数不对外开放

Mappings

object

No

This parameter is not available.

此参数不对外开放

string

No

This parameter is not available.

此参数不对外开放

SaasBoostConfig

string

No

The configuration of Software as a Service (SaaS) Boost.

{}

ShareType

string

No

The sharing type. Valid values:

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

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

  • OnlyFormalRestricted: Only formal deployments are restricted.

  • OnlyTrailRestricted: Only trial deployments are restricted.

  • Hidden: The service is hidden. You cannot view the service or request deployment permissions.

Public

ApprovalType

string

No

The approval type for service usage requests. Valid values:

  • Manual: The request is manually approved.

  • AutoPass: The request is automatically approved.

Manual

DryRun

boolean

No

Specifies whether to perform a dry run for the request. A dry run checks the permissions and the instance status. Valid values:

  • true: sends the request but does not update the service.

  • false: sends the request. If the check is successful, the service is updated.

false

ComplianceMetadata

object

No

The compliance check metadata.

CompliancePacks

array

No

The selected compliance package.

string

No

The selected compliance package.

VpcDataRisk

BuildParameters

string

No

The parameters for building the service.

{ "ServiceTemplateId": "st-xxxxx"}

ServiceLocaleConfigs

array<object>

No

The multilingual configurations of the service.

object

No

The multilingual configurations of the service.

OriginalValue

string

No

The raw data value of the business information.

Service Name

ZhValue

string

No

The Chinese value of the business information.

服务名称

EnValue

string

No

The English value of the business information.

Service Name

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

DF0F666F-FBBC-55C3-A368-C955DE7B4839

DryRunResult

object

The check result. This parameter is returned only when DryRun is set to true.

RolePolicy

object

The access policy of the deployment role.

Policy

string

The access policy that is 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 access policy that is missing for the deployment role.

object

The access policy that is missing 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 operation in the access policy.

string

The operation in the access policy.

CreateStack

Examples

Success response

JSON format

{
  "RequestId": "DF0F666F-FBBC-55C3-A368-C955DE7B4839",
  "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.