Updates a service.
Operation description
Only approved services can be published.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
computenestsupplier:UpdateService |
update |
*Service
|
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 |
| 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 |
| 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 |
| 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:
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 |
| 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 |
| UpdateOption |
object |
No |
The update options. |
|
| UpdateFrom |
string |
No |
The update option. Valid values:
|
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 |
| 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 |
| ApprovalType |
string |
No |
The approval type for service usage requests. Valid values:
|
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:
|
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.