CreateAppOrchestration - Create application orchestration
Applicable versions | Central, Region editions |
Service endpoint and authorization
- Obtain a service endpoint: replace {domain} in API request URLs.
- Obtain a personal access token.
- Obtain the organizationId (Centralized Edition only): In the Organization Management console, find the organization ID on the Basic Information page.
Product | Resource | Required permissions |
Application delivery | Application orchestration | Read/Write |
Request syntax
Central version
POST https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps/{appName}/orchestrations
Regional version
POST https://{domain}/oapi/v1/appstack/apps/{appName}/orchestrations
Request headers
Parameter | Type | Required | Description | Example value |
x-yunxiao-token | string | Yes | Your personal access token for Alibaba Cloud DevOps. | pt-0fh3****0fbG_35af****0484 |
Request parameters
Parameter | Type | Location | Required | Description | Example value |
appName | string | path | Yes | The application name. | my-web-service |
organizationId | string | path |
| The organization ID. | bd9e3c6d-624f-4580-af7d-c5e26f1ed0f0 |
| - | object | body | No | The orchestration request body. | |
| templateId | string | body | Yes | The orchestration template ID. | 20663627-81ee-4cfe-9b69-****4a674 |
| templateType | string | body | Yes | The orchestration template type. | ORG |
Request example
Central
curl -X 'POST' \
'https://{domain}/oapi/v1/appstack/organizations/bd9e3c6d-624f-4580-af7d-c5e26f1ed0f0/apps/my-web-service/orchestrations' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"templateId": "20663627-81ee-4cfe-9b69-****4a674",
"templateType": "ORG"
}'
Region
curl -X 'POST' \
'https://{domain}/oapi/v1/appstack/apps/my-web-service/orchestrations' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"templateId": "20663627-81ee-4cfe-9b69-****4a674",
"templateType": "ORG"
}'
Return parameters
Parameter | Type | Description | Example value |
| - | object | The application's built-in orchestration. | |
| app | object | The application. | |
| creatorId | string | The ID of the user who created the application. | user-xxxx |
| description | string | The application description. | app-description-xxx |
| favoured | boolean | Indicates whether the application is marked as a favorite. | false |
| gmtCreate | string | The application creation time. | 2024-09-01 00:00:00 |
| labelList | array | A list of labels for the application. | |
| - | object | An AppStack label. | |
| displayName | string | The label's display name. Used for descriptive purposes and not for matching. | Test label key |
| displayValue | string | The label's display value. Used for descriptive purposes and not for matching. | Test label value |
| extraMap | object | A map of the label's extended attributes, used to store custom fields. | {} |
| name | string | The name of the label. It can only contain 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. It can only contain lowercase letters, hyphens (-), and digits, and must start and end with a lowercase letter or a digit. | demo-label-value |
| name | string | The application name. | app-name-xxx |
| type | string | The application type. Possible values: | APP |
| componentList | array | A list of components. | |
| - | object | An orchestration component. | |
| content | string | The component's content, formatted as a Go standard library | ---\napiVersion: v1\nkind: Service\nmetadata:\n name: prod-sidecar-test-{{ .AppStack.envName }}\n # Namespace configuration:\n # We recommend using different Kubernetes namespaces for each environment to achieve environment isolation.\n # During deployment, Alibaba Cloud DevOps replaces the {{ .Values.namespace }} placeholder with its configured value.\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 component description. | Example description |
| kind | string | The kind of the component. In Kubernetes, this value must match the | Service |
| name | string | The component name. | demo-service |
| priority | integer | The priority of the component, starting from 1. During environment deployment, components are deployed in ascending order of their priority. | 1 |
| type | string | The applicable deployment architecture, such as Kubernetes or host. Possible values: | KUBERNETES |
| creatorId | string | The ID of the user who created the orchestration. | app-builtin-creator-id |
| description | string | The orchestration description. | app-builtin-orchestration-description |
| format | string | The orchestration format. | MANIFEST |
| gmtCreate | string | The orchestration creation time. | 2024-09-01 00:00:00 |
| gmtModified | string | The orchestration's last modification time. | 2024-09-01 00:00:00 |
| groupNameMap | object | A map of release stage names, where the key is the stage index (starting from 0) and the value is the corresponding stage name. If this parameter is not specified, a default naming rule applies. | |
| labelList | array | A list of labels for the orchestration. | |
| - | object | An AppStack label. | |
| displayName | string | The label's display name. Used for descriptive purposes and not for matching. | Test label key |
| displayValue | string | The label's display value. Used for descriptive purposes and not for matching. | Test label value |
| extraMap | object | A map of the label's extended attributes, used to store custom fields. | {} |
| name | string | The name of the label. It can only contain 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. It can only contain 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. | NONE |
| modifierId | string | The ID of the user who last modified the orchestration. | app-builtin-modifier-id |
| name | string | The orchestration name. | app-builtin-orchestration-name |
| placeholderList | array | A list of placeholders. | |
| - | object | A placeholder. | |
| description | string | The placeholder description. | Memory limit |
| name | string | The placeholder name. | memoryLimit |
| overridable | boolean | Indicates whether the placeholder value can be overridden during deployment. | true |
| predefined | boolean | Indicates whether the placeholder is predefined. | 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 placeholder type. Possible values: | string |
| value | string | The placeholder value. | 1024Mi |
| valueSource | string | The source type for the placeholder value, such as a constant or a variable. Possible values: | CONSTANT |
| revision | object | The orchestration version information. | |
| author | string | The commit author. | user-xxx |
| commitTime | string | The commit time. | 2024-09-01 00:00:00 |
| message | string | The commit message. | revision-message-xxx |
| sha | string | The commit SHA. | revision-sha-xxx |
| sn | string | The unique serial number. | app-builtin-orchestration-1 |
| storageType | string | The orchestration's storage type. | BUILTIN |
| suitableResourceTypes | array[string] | A list of suitable resource types. | |
| syncSourceTemplate | object | The source template from which this orchestration is synchronized. | |
| appTemplateName | string | The application template name. | app-template-name |
| orchestrationSha | string | The commit SHA for the application template version. | app-template-version-sha |
| type | string | The orchestration type. | AppBuiltInOrchestration |
Example response
{
"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 different Kubernetes cluster namespaces for each environment to achieve environment isolation.\n # Alibaba Cloud DevOps replaces the {{ .Values.namespace }} placeholder with the 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, visit the Error Code Center.