Skip to main content
O&M Management/Custom Attribute
PUTCustom AttributeSince 4.10.16SynchronousAuth Required

Update Custom Attribute Key

Update Custom Attribute Key

Execution Availability

Try It Out

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

Path Parameters

Request Inputs

Path Parameters

  • uuidStringRequired

    Custom attribute key UUID

Body Fields

  • updateresourceattributekeyObjectRequired

    updateresourceattributekey request body object.

    • nameString

      Key name

    • descriptionString

      Detailed description of the resource

    • resourceTypesList

      List of resource types supported by this attribute

    • createConstraintsList

      Newly created constraints

    • updateConstraintsList

      Updated constraints

    • deleteConstraintIdsList

      List of constraint IDs to delete

  • systemTagsList

    System tags

  • userTagsList

    User tags

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    Whether the update succeeded

  • inventoryResourceAttributeKeyInventoryRequired

    For details, see inventory

    • uuidStringRequired

      Custom attribute key UUID

    • nameStringRequired

      Custom attribute key name

    • descriptionStringRequired

      Detailed description of the resource

    • createDateTimestampRequired

      Creation time

    • lastOpDateTimestampRequired

      Last modification time

  • errorErrorCodeRequired

    For details, see error

    • odeStringRequired

      The error code number, a globally unique identifier for the error, e.g., SYS.1000, HOST.1001

    • descriptionStringRequired

      A brief description of the error

    • detailsStringRequired

      The detailed error information

    • elaborationStringRequired

      Reserved field. Defaults to null

    • opaqueLinkedHashMapRequired

      Reserved field. Defaults to null

    • causeErrorCodeRequired

      The root error, the cause of the current error. This field is null if there is no root error

Endpoint

PUT/zstack/v1/resource-attributes/{uuid}/actions

/zstack/v1/resource-attributes/{uuid}/actions

Operation ID

UpdateResourceAttributeKey

Permalink

Request Example

curl -X PUT 'http://{host}/zstack/v1/resource-attributes/{uuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"updateresourceattributekey":{"name":"<name>","description":"<description>","resourceTypes":["<resourceTypes>"],"createConstraints":["<createConstraints>"],"updateConstraints":["<updateConstraints>"],"deleteConstraintIds":["<deleteConstraintIds>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "ff03a2b491023030bf58b1b35ea9cd00", "name": "OperationsPersonnel", "description": "Kinny", "resourceTypes": [ "VmInstanceVO" ], "createDate": "Nov 14, 2017 2:20:57 PM", "lastOpDate": "Nov 14, 2017 2:20:57 PM", "constraints": [ { "id": 1, "keyUuid": "ff03a2b491023030bf58b1b35ea9cd00", "type": "option", "parameter": "Kinny", "createDate": "Nov 14, 2017 2:20:57 PM", "lastOpDate": "Nov 14, 2017 2:20:57 PM" } ] } }

Change History

This API has no change history records yet.

View all change history