Skip to main content
O&M Management/Tag Management APIs
POSTTag Management APIsSince 0.6SynchronousAuth Required

Create a System Tag

Create a System Tag

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • resourceTypeStringRequired

      When creating a tag, the user must specify the resource type associated with the tag.

    • resourceUuidStringRequired

      User-specified resource UUID. If specified, the system will not randomly assign a UUID to the resource.

    • tagStringRequired

      Tag string

  • systemTagsList

    System tags

  • userTagsList

    User tags

Responses

200 OK

On success, this API returns the following response structure.

  • errorErrorCodeRequired

    The error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error

    • odeStringRequired

      The error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      A brief description of the error

    • detailsStringRequired

      Detailed information about the error

    • elaborationStringRequired

      Reserved field. Default is null.

    • opaqueLinkedHashMapRequired

      Reserved field. Default is null.

    • causeErrorCodeRequired

      The root error. The source error that caused the current error. If there is no root error, this field is null.

  • inventorySystemTagInventoryRequired

    For details, see inventory

    • inherentBooleanRequired

      Internal system tag

    • uuidStringRequired

      The UUID of the resource. Uniquely identifies the resource.

    • resourceUuidStringRequired

      User-specified resource UUID. If specified, the system will not randomly assign a UUID to the resource.

    • resourceTypeStringRequired

      When creating a tag, the user must specify the resource type associated with the tag.

    • tagStringRequired

      Tag string

    • typeStringRequired

      Reserved field. Do not use.

    • createDateTimestampRequired

      Creation time

    • lastOpDateTimestampRequired

      Last modification time

Endpoint

POST/zstack/v1/system-tags

/zstack/v1/system-tags

Operation ID

CreateSystemTag

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/system-tags' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"resourceType":"<resourceType>","resourceUuid":"<resourceUuid>","tag":"<tag>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "inherent": false, "uuid": "55d86810cb564ecc934fa79d498b9dc3", "resourceType": "HostVO", "tag": "reservedMemory::1G", "type": "System", "createDate": "Apr 24, 2017 7:10:55 PM", "lastOpDate": "Apr 24, 2017 7:10:55 PM" } }

Change History

This API has no change history records yet.

View all change history