Update Defined Entity

Update Defined Entity

Update the defined entity with the unique identifier (URN). This operation can also be used to upgrade/downgrade the entity to a different version of the defined entity type it is an instance of by setting the "entityType" property.

The update operation may change the entityState of the Defined Entity. If the entity's entityState is:

  • PRE_CREATED before the update - the entity will remain in PRE_CREATED entityState after the update
  • RESOLUTION_ERROR before the update - the entity will move to PRE_CREATED entityState after the update
  • IN_DELETION before the update - the entity will remain in IN_DELETION entityState after the update
  • RESOLVED before the update - the update operation will try to validate the entity content (value after the update) against the entity type's schema (value after the update). If validation is successful the entity will remain in RESOLVED state. Otherwise, the entity will move to RESOLUTION_ERROR entityState and the operation will fail with exception.
Request
URI
PUT
https://{api_host}/cloudapi/1.0.0/entities/{id}
COPY
Path Parameters
string
id
Required

id

string
id
Required

id

Query Parameters
string
invokeHooks
Optional

Only users with Admin FullControl access to the Entity Type can pass this parameter. The default value is 'true'.


Request Body
DefinedEntity of type(s) application/json
Optional
{
    "id": "urn:vcloud:entity:vmware.vspheresddc:1.0.0:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "entityType": "urn:vcloud:type:vmware.vspheresddc:1.0.0",
    "name": "vspheresddc1",
    "externalId": "123",
    "entity": {
        "entity": {}
    },
    "state": "string",
    "entityState": "string",
    "creationDate": "string",
    "lastModificationDate": "string",
    "owner": {
        "name": "string",
        "id": "string"
    },
    "org": {
        "name": "string",
        "id": "string"
    }
}
string
id
Optional

The id of the defined entity in URN format.

string
entityType
Optional

The URN ID of the defined entity type that the entity is an instance of. This is a read-only field.

string
name
Required

The name of the defined entity.

string
externalId
Optional

An external entity's id that this entity may have a relation to.

object
entity
Required

A JSON value representation. The JSON will be validated against the schema of the entityType that the entity is an instance of.

string
state
Optional

Every entity is created in the "PRE_CREATED" state. Once an entity is ready to be validated against its schema, it will transition in another state - RESOLVED, if the entity is valid according to the schema, or RESOLUTION_ERROR otherwise. If an entity in an "RESOLUTION_ERROR" state is updated, it will transition to the initial "PRE_CREATED" state without performing any validation. If its in the "RESOLVED" state, then it will be validated against the entity type schema and throw an exception if its invalid.

Possible values are : PRE_CREATED, RESOLVED, RESOLUTION_ERROR,
string
entityState
Optional

The "entityState" field may have the following values: "PRE_CREATED", "RESOLVED", "RESOLUTION_ERROR", "IN_DELETION". Every entity is created in the "PRE_CREATED" state. Once an entity is ready to be validated against its schema, it will transition in another state - "RESOLVED", if the entity is valid according to the schema, or "RESOLUTION_ERROR" otherwise. If an entity in an "RESOLUTION_ERROR" state is updated, it will transition to the initial "PRE_CREATED" state without performing any validation. If its in the "RESOLVED" state, then it will be validated against the entity type schema and throw an exception if its invalid. Once an entity is ready to be deleted, if any external resources need to be cleaned up, the entity deletion process can be set up into multiple stages. The entity will transition into state IN_DELETION when the finalization process starts and will be permanently deleted once it completes successfully. If the finalization is not successful, the entity will once it completes successfully. If the finalization is not successful, the entity will remain in IN_DELETION state.

string As date-time As date-time
creationDate
Optional

The date that the entity was created.

string As date-time As date-time
lastModificationDate
Optional

The date that the entity was last modified.

owner
Optional

Entity reference used to describe VCD entities

org
Optional

Entity reference used to describe VCD entities

Authentication
This operation uses the following authentication methods.
Responses
200

Ok

Returns DefinedEntity of type(s) application/json;version=39.0
{
    "id": "urn:vcloud:entity:vmware.vspheresddc:1.0.0:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "entityType": "urn:vcloud:type:vmware.vspheresddc:1.0.0",
    "name": "vspheresddc1",
    "externalId": "123",
    "entity": {
        "entity": {}
    },
    "state": "string",
    "entityState": "string",
    "creationDate": "string",
    "lastModificationDate": "string",
    "owner": {
        "name": "string",
        "id": "string"
    },
    "org": {
        "name": "string",
        "id": "string"
    }
}
string
id
Optional

The id of the defined entity in URN format.

string
entityType
Optional

The URN ID of the defined entity type that the entity is an instance of. This is a read-only field.

string
name
Required

The name of the defined entity.

string
externalId
Optional

An external entity's id that this entity may have a relation to.

object
entity
Required

A JSON value representation. The JSON will be validated against the schema of the entityType that the entity is an instance of.

string
state
Optional

Every entity is created in the "PRE_CREATED" state. Once an entity is ready to be validated against its schema, it will transition in another state - RESOLVED, if the entity is valid according to the schema, or RESOLUTION_ERROR otherwise. If an entity in an "RESOLUTION_ERROR" state is updated, it will transition to the initial "PRE_CREATED" state without performing any validation. If its in the "RESOLVED" state, then it will be validated against the entity type schema and throw an exception if its invalid.

Possible values are : PRE_CREATED, RESOLVED, RESOLUTION_ERROR,
string
entityState
Optional

The "entityState" field may have the following values: "PRE_CREATED", "RESOLVED", "RESOLUTION_ERROR", "IN_DELETION". Every entity is created in the "PRE_CREATED" state. Once an entity is ready to be validated against its schema, it will transition in another state - "RESOLVED", if the entity is valid according to the schema, or "RESOLUTION_ERROR" otherwise. If an entity in an "RESOLUTION_ERROR" state is updated, it will transition to the initial "PRE_CREATED" state without performing any validation. If its in the "RESOLVED" state, then it will be validated against the entity type schema and throw an exception if its invalid. Once an entity is ready to be deleted, if any external resources need to be cleaned up, the entity deletion process can be set up into multiple stages. The entity will transition into state IN_DELETION when the finalization process starts and will be permanently deleted once it completes successfully. If the finalization is not successful, the entity will once it completes successfully. If the finalization is not successful, the entity will remain in IN_DELETION state.

string As date-time As date-time
creationDate
Optional

The date that the entity was created.

string As date-time As date-time
lastModificationDate
Optional

The date that the entity was last modified.

owner
Optional

Entity reference used to describe VCD entities

org
Optional

Entity reference used to describe VCD entities


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