Converts a deployment into an application.

Note The deployment must be in the Normal state. This means that the number of readyReplicas must be the same as that of replicas.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only the common request header. For more information, see Common request parameters.

Request syntax

POST /pop/v5/oam/k8s_resource_convert HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
ClusterId String Yes b07c8192-****-adf4f7447720

The ID of the cluster. You can call the ListCluster operation to query the cluster ID. For more information, see ListCluster.

Namespace String Yes default

The namespace that corresponds to the cluster.

ResourceName String Yes deployment-to-convert

The name of the resource that is used.

ResourceType String Yes deployment

The type of the resource that is used.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

Message String convert success

The returned message.

RequestId String BA938591-*********-9690-BFD3F4DD7A93

The ID of the request.


Sample requests

POST /pop/v5/oam/k8s_resource_convert HTTP/1.1
Common request header
"ClusterId": "b07c8192-****-adf4f7447720",
"Namespace": "default",
"ResourceName": "deployment-to-convert",
"ResourceType": "deployment"

Sample success responses

XML format

<Message>convert success</Message>

JSON format

{"RequestId":"BA938591-*********-9690-BFD3F4DD7A93","Message":"convert success","Code":"200"}

Error codes

For a list of error codes, visit the API Error Center.