UpdateAppOrchestration - Update application orchestration
Edition | Centralized and regional |
Endpoints and authorization
Get an endpoint: Replace {domain} in the API request syntax.
Get organizationId: For Central Edition only, find the organization ID on the basic information page in the organization management console.
Product | Resource | Permissions |
application delivery | application orchestration | read/write |
Request syntax
Central
PUT https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps/{appName}/orchestrations/{sn}Region
PUT https://{domain}/oapi/v1/appstack/apps/{appName}/orchestrations/{sn}Request header
Parameter | Type | Required | Description | Example value |
x-yunxiao-token | string | Yes | The personal access token for Alibaba Cloud DevOps. | pt-0fh3****0fbG_35af****0484 |
Parameters
Parameter | Type | Position | Required | Description | Example value |
appName | string | path | Yes | The application name. | my-web-service |
organizationId | string | path |
| The organization ID. | organization-id-xxx |
sn | string | path | Yes | The unique serial number of the application orchestration. | my-web-service@KUBERNETES |
| - | object | body | No | The request body for updating the orchestration. | |
branchName | string | body | No | The orchestration branch for this commit. If not specified, the default | master |
commitMessage | string | body | No | The message for this commit. | Sample commit message |
description | string | body | No | The orchestration description. | demo description |
fromRevisionSha | string | body | No | The SHA value of the baseline version for this commit. | sha-xxxx |
name | string | body | Yes | The orchestration name. | demo-name |
| spec | object | body | No | The request body for updating built-in orchestration details. | |
| componentList | array | body | No | A list of components. | |
| - | object | body | No | An orchestration component. | |
content | string | body | Yes | The component's content, formatted as a Go standard library text/template. | ---\napiVersion: v1\nkind: Service\nmetadata:\n name: prod-sidecar-test-{{ .AppStack.envName }}\n # Namespace configuration:\n # We recommend using a different Kubernetes namespace for each environment to achieve environment isolation.\n # During deployment, Alibaba Cloud DevOps replaces the placeholder {{ .Values.namespace }} with the actual value you set.\n namespace: {{ .Values.namespace }}\nspec:\n selector:\n run: prod-sidecar-test-{{ .AppStack.envName }}\n ports:\n - protocol: TCP\n port: 80\n targetPort: 8080 |
description | string | body | Yes | The component description. | Sample description |
kind | string | body | Yes | The component type. For Kubernetes, use the | Service |
name | string | body | Yes | The component name. | demo-service |
priority | integer | body | Yes | The priority of the component, starting from 1. During deployment, components are deployed in ascending order of priority. | 1 |
type | string | body | Yes | The deployment architecture, such as Kubernetes or host. Valid values: | KUBERNETES |
groupNameMap | object | body | No | A map of release stage names, where the key is the zero-based stage index and the value is the stage name. If not specified, the default naming rule is used. | |
| labels | array | body | No | A list of labels for the orchestration. These labels control which deployments use the orchestration changes from this commit. | |
| - | object | body | No | An orchestration label. | |
displayName | string | body | No | The display name of the label. It is for descriptive purposes only and is not used in label matching. | Test label key |
displayValue | string | body | No | The display value of the label. It is for descriptive purposes only and is not used in label matching. | Test label value |
extraMap | object | body | No | A map for storing custom attributes for the label. | {} |
name | string | body | No | The name of the label. It can only contain lowercase letters, hyphens (-), and numbers, and must start and end with a lowercase letter or a number. | demo-label |
namespace | string | body | No | The namespace of the label, which defines its scope. | default |
value | string | body | No | The value of the label. It can only contain lowercase letters, hyphens (-), and numbers, and must start and end with a lowercase letter or a number. | demo-label-value |
| placeholderList | array | body | No | A list of placeholders. | |
| - | object | body | No | A placeholder. | |
description | string | body | No | The placeholder description. | Memory limit |
name | string | body | Yes | The placeholder name. | memoryLimit |
overridable | boolean | body | Yes | Specifies whether the placeholder can be modified during deployment. | true |
predefined | boolean | body | No | Specifies whether the placeholder is predefined. | false |
rsType | string | body | Yes | The deployment architecture, such as Kubernetes or host. Valid values: | KUBERNETES |
rule | string | body | No | An optional validation rule for the placeholder value. | "" |
type | string | body | Yes | The placeholder type. Valid values: | string |
value | string | body | Yes | The placeholder value. | 1024Mi |
valueSource | string | body | No | The data source type for the placeholder value. Valid values: | CONSTANT |
type | string | body | Yes | The orchestration type. |
Request example
Central edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/appstack/organizations/organization-id-xxx/apps/my-web-service/orchestrations/my-web-service@KUBERNETES' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"branchName": "master",
"commitMessage": "Example commit message",
"description": "demo description",
"fromRevisionSha": "sha-xxxx",
"name": "demo-name",
"spec": {
"componentList": [
{
"content": "---\napiVersion: v1\nkind: Service\nmetadata:\n name: prod-sidecar-test-{{ .AppStack.envName }}\n # Namespace configuration:\n # To ensure isolation, use a different Kubernetes namespace for each environment.\n # During deployment, Alibaba Cloud DevOps replaces the {{ .Values.namespace }} placeholder with the namespace configured for the target environment.\n namespace: {{ .Values.namespace }}\nspec:\n selector:\n run: prod-sidecar-test-{{ .AppStack.envName }}\n ports:\n - protocol: TCP\n port: 80\n targetPort: 8080",
"description": "Example description",
"kind": "Service",
"name": "demo-service",
"priority": 1,
"type": "KUBERNETES"
}
],
"groupNameMap": {
},
"labels": [
{
"displayName": "Test label key",
"displayValue": "Test label value",
"extraMap": {},
"name": "demo-label",
"namespace": "default",
"value": "demo-label-value"
}
],
"placeholderList": [
{
"description": "The memory limit for the container.",
"name": "memoryLimit",
"overridable": true,
"predefined": false,
"rsType": "KUBERNETES",
"rule": "\"\"",
"type": "string",
"value": "1024Mi",
"valueSource": "CONSTANT"
}
],
"type": ""
}
}'Region edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/appstack/apps/my-web-service/orchestrations/my-web-service@KUBERNETES' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"branchName": "master",
"commitMessage": "Example commit message",
"description": "demo description",
"fromRevisionSha": "sha-xxxx",
"name": "demo-name",
"spec": {
"componentList": [
{
"content": "---\napiVersion: v1\nkind: Service\nmetadata:\n name: prod-sidecar-test-{{ .AppStack.envName }}\n # Namespace configuration:\n # To ensure isolation, use a different Kubernetes namespace for each environment.\n # During deployment, Alibaba Cloud DevOps replaces the {{ .Values.namespace }} placeholder with the namespace configured for the target environment.\n namespace: {{ .Values.namespace }}\nspec:\n selector:\n run: prod-sidecar-test-{{ .AppStack.envName }}\n ports:\n - protocol: TCP\n port: 80\n targetPort: 8080",
"description": "Example description",
"kind": "Service",
"name": "demo-service",
"priority": 1,
"type": "KUBERNETES"
}
],
"groupNameMap": {
},
"labels": [
{
"displayName": "Test label key",
"displayValue": "Test label value",
"extraMap": {},
"name": "demo-label",
"namespace": "default",
"value": "demo-label-value"
}
],
"placeholderList": [
{
"description": "The memory limit for the container.",
"name": "memoryLimit",
"overridable": true,
"predefined": false,
"rsType": "KUBERNETES",
"rule": "\"\"",
"type": "string",
"value": "1024Mi",
"valueSource": "CONSTANT"
}
],
"type": ""
}
}'Return parameters
Parameter | Type | Description | Example value |
| - | object | The built-in application orchestration. | |
| app | object | The application. | |
creatorId | string | The creator of the application. | user-xxxx |
description | string | The description of the application. | app-description-xxx |
favoured | boolean | Indicates whether the application is favorited. | false |
gmtCreate | string | The time when the application was created. | 2024-09-01 00:00:00 |
| labelList | array | A list of application labels. | |
| - | object | An AppStack label. | |
displayName | string | The display name of the label. This name is for descriptive purposes only and is not used in label matching. | Test label key |
displayValue | string | The display value of the label. This value is for descriptive purposes only and is not used in label matching. | Test label value |
extraMap | object | A map of extended attributes for the label. Used to store custom attribute fields when you define a label. | {} |
name | string | The name of the label. The name can contain only lowercase letters, hyphens (-), and digits, and must start and end with a lowercase letter or a digit. | demo-label |
namespace | string | The namespace of the label, which determines its scope. | default |
value | string | The value of the label. The value can contain only lowercase letters, hyphens (-), and digits, and must start and end with a lowercase letter or a digit. | demo-label-value |
name | string | The name of the application. | app-name-xxx |
type | string | The type of the application. Possible values: | APP |
| componentList | array | A list of components. | |
| - | object | An orchestration component. | |
content | string | The content of the component, formatted as a Go standard library text/template. | ---\napiVersion: v1\nkind: Service\nmetadata:\n name: prod-sidecar-test-{{ .AppStack.envName }}\n # Namespace configuration:\n # It is recommended to use a different Kubernetes cluster namespace for each environment to achieve environment isolation.\n # During deployment, Alibaba Cloud DevOps replaces the placeholder {{ .Values.namespace }} with the actual value configured on the right.\n namespace: {{ .Values.namespace }}\nspec:\n selector:\n run: prod-sidecar-test-{{ .AppStack.envName }}\n ports:\n - protocol: TCP\n port: 80\n targetPort: 8080 |
description | string | The description of the component. | Sample description |
kind | string | The kind of the component. In Kubernetes scenarios, this value must correspond to the | Service |
name | string | The name of the component. | demo-service |
priority | integer | The priority of the component, starting from 1. When an environment is deployed, the system deploys components in ascending order of their priority. | 1 |
type | string | The applicable deployment architecture, such as Kubernetes or host. Possible values: | KUBERNETES |
creatorId | string | The creator of the orchestration. | app-builtin-creator-id |
description | string | The description of the orchestration. | app-builtin-orchestration-description |
format | string | The format of the orchestration. | MANIFEST |
gmtCreate | string | The time when the orchestration was created. | 2024-09-01 00:00:00 |
gmtModified | string | The time when the orchestration was last modified. | 2024-09-01 00:00:00 |
groupNameMap | object | The names of the release phases. The key is the zero-based index of a phase, and the value is its name. If this parameter is not specified, a default naming rule is used. | |
| labelList | array | A list of labels. | |
| - | object | An AppStack label. | |
displayName | string | The display name of the label. This name is for descriptive purposes only and is not used in label matching. | Test label key |
displayValue | string | The display value of the label. This value is for descriptive purposes only and is not used in label matching. | Test label value |
extraMap | object | A map of extended attributes for the label. Used to store custom attribute fields when you define a label. | {} |
name | string | The name of the label. The name can contain only lowercase letters, hyphens (-), and digits, and must start and end with a lowercase letter or a digit. | demo-label |
namespace | string | The namespace of the label, which determines its scope. | default |
value | string | The value of the label. The value can contain only lowercase letters, hyphens (-), and digits, and must start and end with a lowercase letter or a digit. | demo-label-value |
labelPolicy | string | The label policy for the orchestration. | NONE |
modifierId | string | The user who last modified the orchestration. | app-builtin-modifier-id |
name | string | The name of the orchestration. | app-builtin-orchestration-name |
| placeholderList | array | A list of placeholders. | |
| - | object | A placeholder. | |
description | string | The description of the placeholder. | Memory limit |
name | string | The name of the placeholder. | memoryLimit |
overridable | boolean | Indicates whether the placeholder can be modified during deployment. | true |
predefined | boolean | Indicates whether this is a predefined placeholder. | false |
rsType | string | The applicable deployment architecture, such as Kubernetes or host. Possible values: | KUBERNETES |
rule | string | An optional validation rule for the placeholder value. | "" |
type | string | The type of the placeholder. Possible values: | string |
value | string | The value of the placeholder. | 1024Mi |
valueSource | string | The data source type for the placeholder value, such as a constant or variable. Possible values: | CONSTANT |
| revision | object | Details of the orchestration revision. | |
author | string | The committer of the orchestration revision. | user-xxx |
commitTime | string | The commit time of the orchestration revision. | 2024-09-01 00:00:00 |
message | string | The commit message for the orchestration revision. | revision-message-xxx |
sha | string | The commit SHA value for the orchestration revision. | revision-sha-xxx |
sn | string | The unique serial number of the orchestration. | app-builtin-orchestration-1 |
storageType | string | The storage type of the orchestration. | BUILTIN |
suitableResourceTypes | array[string] | The applicable resource types. | |
| syncSourceTemplate | object | The source template used for synchronization. | |
appTemplateName | string | The name of the application template. | app-template-name |
orchestrationSha | string | The commit SHA value of the application template version. | app-template-version-sha |
type | string | The type of the orchestration. | AppBuiltInOrchestration |
Response example
{
"app": {
"creatorId": "user-xxxx",
"description": "app-description-xxx",
"favoured": false,
"gmtCreate": "2024-09-01 00:00:00",
"labelList": [
{
"displayName": "Test label key",
"displayValue": "Test label value",
"extraMap": {},
"name": "demo-label",
"namespace": "default",
"value": "demo-label-value"
}
],
"name": "app-name-xxx",
"type": "APP"
},
"componentList": [
{
"content": "---\napiVersion: v1\nkind: Service\nmetadata:\n name: prod-sidecar-test-{{ .AppStack.envName }}\n # Namespace configuration:\n # Use a different Kubernetes namespace for each environment to achieve environment isolation.\n # Alibaba Cloud DevOps replaces the {{ .Values.namespace }} placeholder with its configured value during deployment.\n namespace: {{ .Values.namespace }}\nspec:\n selector:\n run: prod-sidecar-test-{{ .AppStack.envName }}\n ports:\n - protocol: TCP\n port: 80\n targetPort: 8080",
"description": "Example description",
"kind": "Service",
"name": "demo-service",
"priority": 1,
"type": "KUBERNETES"
}
],
"creatorId": "app-builtin-creator-id",
"description": "app-builtin-orchestration-description",
"format": "MANIFEST",
"gmtCreate": "2024-09-01 00:00:00",
"gmtModified": "2024-09-01 00:00:00",
"groupNameMap": {
},
"labelList": [
{
"displayName": "Test label key",
"displayValue": "Test label value",
"extraMap": {},
"name": "demo-label",
"namespace": "default",
"value": "demo-label-value"
}
],
"labelPolicy": "NONE",
"modifierId": "app-builtin-modifier-id",
"name": "app-builtin-orchestration-name",
"placeholderList": [
{
"description": "memory limit",
"name": "memoryLimit",
"overridable": true,
"predefined": false,
"rsType": "KUBERNETES",
"rule": "\"\"",
"type": "string",
"value": "1024Mi",
"valueSource": "CONSTANT"
}
],
"revision": {
"author": "user-xxx",
"commitTime": "2024-09-01 00:00:00",
"message": "revision-message-xxx",
"sha": "revision-sha-xxx"
},
"sn": "app-builtin-orchestration-1",
"storageType": "BUILTIN",
"suitableResourceTypes": [
],
"syncSourceTemplate": {
"appTemplateName": "app-template-name",
"orchestrationSha": "app-template-version-sha"
},
"type": "AppBuiltInOrchestration"
}Error codes
For API error codes, refer to the Error Code Center.