Create Defined Entity Type

Create Defined Entity Type

Creates a defined entity type.

Request
URI
POST
https://{api_host}/cloudapi/1.0.0/entityTypes/
COPY
Request Body
DefinedEntityType of type(s) application/json
Optional
{
    "id": "urn:vcloud:type:vmware:vspheresddc:1.0.0",
    "name": "vspheresddc",
    "description": "string",
    "nss": "sddc",
    "version": "1.1.0",
    "inheritedVersion": "1.0.0",
    "externalId": "123",
    "schema": {
        "application/json": {
            "type": "object",
            "properties": {
                "rectangle": {
                    "$ref": "#/components/schemas/Rectangle"
                }
            },
            "definitions": {
                "size": {
                    "type": "number",
                    "minimum": 0
                },
                "Rectangle": {
                    "type": "object",
                    "properties": {
                        "a": {
                            "$ref": "#/components/schemas/size"
                        },
                        "b": {
                            "$ref": "#/components/schemas/size"
                        }
                    }
                }
            }
        }
    },
    "vendor": "vmware",
    "interfaces": [
        "urn:vcloud:interface:vmware.sddc:1.0.0"
    ],
    "hooks": {
        "hooks": {}
    },
    "readonly": false,
    "maxImplicitRight": "urn:vcloud:accessLevel:ReadWrite"
}
string
id
Optional

The id of the defined entity type in URN format.

string
name
Required

The name of the defined entity type.

string
description
Optional

Description of the defined entity type.

string
nss
Required

A unique namespace specific string. The combination of nss and version must be unique.

string
version
Required

The version of the defined entity type. The combination of nss and version must be unique. The version string must follow semantic versioning rules. Versions with pre-release extension are not allowed.

string
inheritedVersion
Optional

To be used when creating a new version of a defined entity type. Specifies the version of the type that will be the template for the authorization configuration of a the new version. The Type ACLs and the access requirements of the Type Behaviors of the new version will be copied from those of the inherited version. If the value of this property is '0', then the new type version will not inherit another version and will have the default authorization settings, just like the first version of a new type.

string
externalId
Optional

An external entity's id that this definition may apply to.

object
schema
Required

The JSON-Schema valid definition of the defined entity type. If no JSON Schema version is specified, version 4 will be assumed.

string
vendor
Required

The vendor name.

array of string
interfaces
Optional

List of interface ids that this defined entity type is referenced by.

object
hooks
Optional

A mapping defining which behaviors should be invoked upon specific lifecycle events, like PostCreate, PostUpdate, PreDelete, PostDelete. For example: "hooks": { "PostCreate": "urn:vcloud:behavior-interface:postCreateHook:vendorA:containerCluster:1.0.0" }

boolean
readonly
Optional

True if the entity type cannot be modified.

string
maxImplicitRight
Optional

The maximum Type Right level that will be implied from the user's Type ACLs if this field is defined. For example, "maxImplicitRight": "urn:vcloud:accessLevel:ReadWrite" would mean that a user with RO , RW, and FC ACLs to the Type would implicitly get the "Read: " and "Write: " rights, but not the "Full Control: " right. The valid values are "urn:vcloud:accessLevel:ReadOnly", "urn:vcloud:accessLevel:ReadWrite", "urn:vcloud:accessLevel:FullControl".

Authentication
This operation uses the following authentication methods.
Responses
201

Created

Returns DefinedEntityType of type(s) application/json;version=39.0
{
    "id": "urn:vcloud:type:vmware:vspheresddc:1.0.0",
    "name": "vspheresddc",
    "description": "string",
    "nss": "sddc",
    "version": "1.1.0",
    "inheritedVersion": "1.0.0",
    "externalId": "123",
    "schema": {
        "application/json": {
            "type": "object",
            "properties": {
                "rectangle": {
                    "$ref": "#/components/schemas/Rectangle"
                }
            },
            "definitions": {
                "size": {
                    "type": "number",
                    "minimum": 0
                },
                "Rectangle": {
                    "type": "object",
                    "properties": {
                        "a": {
                            "$ref": "#/components/schemas/size"
                        },
                        "b": {
                            "$ref": "#/components/schemas/size"
                        }
                    }
                }
            }
        }
    },
    "vendor": "vmware",
    "interfaces": [
        "urn:vcloud:interface:vmware.sddc:1.0.0"
    ],
    "hooks": {
        "hooks": {}
    },
    "readonly": false,
    "maxImplicitRight": "urn:vcloud:accessLevel:ReadWrite"
}
string
id
Optional

The id of the defined entity type in URN format.

string
name
Required

The name of the defined entity type.

string
description
Optional

Description of the defined entity type.

string
nss
Required

A unique namespace specific string. The combination of nss and version must be unique.

string
version
Required

The version of the defined entity type. The combination of nss and version must be unique. The version string must follow semantic versioning rules. Versions with pre-release extension are not allowed.

string
inheritedVersion
Optional

To be used when creating a new version of a defined entity type. Specifies the version of the type that will be the template for the authorization configuration of a the new version. The Type ACLs and the access requirements of the Type Behaviors of the new version will be copied from those of the inherited version. If the value of this property is '0', then the new type version will not inherit another version and will have the default authorization settings, just like the first version of a new type.

string
externalId
Optional

An external entity's id that this definition may apply to.

object
schema
Required

The JSON-Schema valid definition of the defined entity type. If no JSON Schema version is specified, version 4 will be assumed.

string
vendor
Required

The vendor name.

array of string
interfaces
Optional

List of interface ids that this defined entity type is referenced by.

object
hooks
Optional

A mapping defining which behaviors should be invoked upon specific lifecycle events, like PostCreate, PostUpdate, PreDelete, PostDelete. For example: "hooks": { "PostCreate": "urn:vcloud:behavior-interface:postCreateHook:vendorA:containerCluster:1.0.0" }

boolean
readonly
Optional

True if the entity type cannot be modified.

string
maxImplicitRight
Optional

The maximum Type Right level that will be implied from the user's Type ACLs if this field is defined. For example, "maxImplicitRight": "urn:vcloud:accessLevel:ReadWrite" would mean that a user with RO , RW, and FC ACLs to the Type would implicitly get the "Read: " and "Write: " rights, but not the "Full Control: " right. The valid values are "urn:vcloud:accessLevel:ReadOnly", "urn:vcloud:accessLevel:ReadWrite", "urn:vcloud:accessLevel:FullControl".


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