Create Pvdc Compute Policy

Create Pvdc Compute Policy

Creates a new pVDC compute policy

Request
URI
POST
https://{api_host}/cloudapi/2.0.0/pvdcComputePolicies
COPY
Request Body
PvdcComputePolicy2 of type(s) application/json
Optional
{
    "description": "This is an example payload to create a policy of type PvdcKubernetesPolicy.\nFollow /1.0.0/pvdcComputePolicies example to know payload to create a PvdcVmPolicy type\nof compute policy. Note that policyType field will have to be added to the payload taken\nfrom /1.0.0/pvdcComputePolicies example, if you are using /2.0.0/pvdcComputePolicies.\n",
    "policyType": "PvdcKubernetesPolicy",
    "name": "myPolicy",
    "pvdcId": "urn:vcloud:providervdc:d1c4cc73-f111-4bc2-a361-e91839c061c9",
    "supervisorCluster": {
        "moref": "domain-c8",
        "name": "test-cluster"
    },
    "kubernetesConfig": {
        "storageClasses": [
            {
                "storageClass": "gold",
                "limit": 20480
            },
            {
                "storageClass": "silver",
                "limit": 10240
            }
        ],
        "virtualMachineClasses": [
            "best-effort-xsmall",
            "best-effort-small"
        ],
        "namespaceResourceSpec": {
            "cpuLimit": 1000,
            "memoryLimit": 1024,
            "memoryReservationGuarantee": 1,
            "cpuReservationGuarantee": 1
        }
    }
}
string
id
Optional

UUID for pVDC compute policy. This is immutable.

string
name
Required

Display name.

string
policyType
Required

The discriminator type is used to differentiate among various sub policy types.

string
description
Optional

description

string
pvdcId
Optional

URN for Provider vDC. If not provided, then this policy is considered Global.

Authentication
This operation uses the following authentication methods.
Responses
201

Created

Returns PvdcComputePolicy2 of type(s) application/json;version=39.0
{
    "description": "This is an example payload to create a policy of type PvdcKubernetesPolicy.\nFollow /1.0.0/pvdcComputePolicies example to know payload to create a PvdcVmPolicy type\nof compute policy. Note that policyType field will have to be added to the payload taken\nfrom /1.0.0/pvdcComputePolicies example, if you are using /2.0.0/pvdcComputePolicies.\n",
    "policyType": "PvdcKubernetesPolicy",
    "name": "myPolicy",
    "pvdcId": "urn:vcloud:providervdc:d1c4cc73-f111-4bc2-a361-e91839c061c9",
    "supervisorCluster": {
        "moref": "domain-c8",
        "name": "test-cluster"
    },
    "kubernetesConfig": {
        "storageClasses": [
            {
                "storageClass": "gold",
                "limit": 20480
            },
            {
                "storageClass": "silver",
                "limit": 10240
            }
        ],
        "virtualMachineClasses": [
            "best-effort-xsmall",
            "best-effort-small"
        ],
        "namespaceResourceSpec": {
            "cpuLimit": 1000,
            "memoryLimit": 1024,
            "memoryReservationGuarantee": 1,
            "cpuReservationGuarantee": 1
        }
    }
}
string
id
Optional

UUID for pVDC compute policy. This is immutable.

string
name
Required

Display name.

string
policyType
Required

The discriminator type is used to differentiate among various sub policy types.

string
description
Optional

description

string
pvdcId
Optional

URN for Provider vDC. If not provided, then this policy is considered Global.


202

The request have been accepted and the task to monitor the request is in the Location header.

Operation doesn't return any data structure

400

Invalid configuration.

Returns Error of type(s) application/json;version=39.0
{
    "minorErrorCode": "string",
    "message": "string",
    "stackTrace": "string"
}
string
minorErrorCode
Required

minorErrorCode

string
message
Required

message

string
stackTrace
Optional

stackTrace