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.

Debugging

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 common request headers. For more information, see the topic about common request parameters.

Request syntax

POST /pop/v5/oam/k8s_resource_convert HTTP/1.1

Request parameters

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

The ID of the cluster. You can call the ListCluster operation to query the cluster ID.

Namespace String Query Yes default

The namespace that corresponds to the cluster.

ResourceName String Query Yes deployment-to-convert

The name of the resource that is used.

ResourceType String Query Yes deployment

The type of the resource that is used. Set the value to deployment.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

Message String convert success

The returned message that indicates whether the request is successful.

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

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<RequestId>BA938591-*********-9690-BFD3F4DD7A93</RequestId>
<Message>convert success</Message>
<Code>200</Code>

JSON format

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

Error codes

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