Update Ownership Transfer

Details

API DetailsRelease-Specific Information
CloudCenter Platform 4xCloudCenter Suite 5x
NameUpdate Ownership Transfer
Description

Updates ownership of CloudCenter Resources in addition to listing errors during the transfer process as specified in the Transferring Ownership use case.

Allowed Role(s)WM_USER
MethodPUT
URI
  • v1/acls/transfer?report=true&dependents=true

  • v1/acls/transfer?report=true
  • v1/acls/transfer?dependents=true

  • v1/acls/transfer

  • cloudcenter-ccm-backend/api/v1/acls/transfer?report=true&dependents=true

  • cloudcenter-ccm-backend/api/v1/acls/transfer?report=true
  • cloudcenter-ccm-backend/api/v1/acls/transfer?dependents=true

  • cloudcenter-ccm-backend/api/v1/acls/transfer

Sample Request
curl -k -X PUT -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/acls/transfer?report=true&dependents=true
curl -k -X PUT -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/cloudcenter-ccm-backend/api/v1/acls/transfer?report=true&dependents=true
Release

Introduced in CloudCenter 4.8.1

Modified in CloudCenter Suite 5.0.0

Notes
  • Only resource owners and users with WRITE perms can view all the fields for this resource.
  • Other users can only view common fields like name, description, and so forth. See Permission Control for additional context.
  • Understand possible errors during the transfer process by using the report=true&dependents=true optional query parameters. Used for validation of complete ownership transfer, that is, including dependent resource ownership (if source user is the owner).
  • Transfer complete ownership, including dependent resources, by using the dependents=true optional query parameter.
  • Transfer ownership without dependencies by not using an optional query parameter.
Back To LinksCloudCenter Platform 4x APIWorkload Manager API

ESB Header

  • action: update.acls.transfer
    actionparam: report=true&dependents=true
  • action: update.acls.transfer
    actionparam: dependents=true
  • action: update.acls.transfer

See the Enterprise Service Bus (ESB) section for additional context.

Not applicable

Sample 1

Request Body - Understand possible errors during the transfer process

None

Response – Sample Output for a Negative Case with Some Failures

{
    "errors": [
        {
            "code": "TARGET_USER_DOES_NOT_HAVE_ACCESS_TO_CLOUD_REGION",
            "message": "Ownership cannot be transferred. Target User johnmary_b (id:11) does not currently have access to the underlying Cloud Region [OpenStack_Dev-RegionOne]. Try again, after you provide the target user access to this Cloud Region."
        },
        {
            "code": "TARGET_USER_DOES_NOT_HAVE_ACCESS_TO_CLOUD_ACCOUNT",
            "message": "Ownership cannot be transferred. Target user does not have access to the cloud account [Vishwa-OpenStack] associated with the Virtual Machine. Try again, after you share cloud account access to this user."
        },
        {
            "code": "VM_IS_NOT_BROWN_FIELD",
            "message": "Transfer ownership is not allowed for the virtual machine because it is launched as part of Cisco cloud center deployment."
        },
        {
            "code": "ACTION_LIBRARY_ACTION_IN_PRGRESS",
            "message": "Ownership cannot be transferred as custom actions are in progress on virtual machines [be3bfad0-33e9-48fd-a243-7cc0d98bf43a]."
        }
    ]
}

Example 2

curl -k -X PUT -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/acls/v1/acls/transfer?dependents=true

Request Body - Transfer ownership with Dependencies

{
    "targetUserId" : <targetUserId>,
    "resourceInfo" : {
        "type" : "DISTRIBUTED_JOB",
        "id" : <ParentJobId>
    }
}

Response

A success or failure HTTP Status Code.

Example 2

curl -k -X PUT -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/acls/v1/acls/transfer

Request Body - Transfer ownership without Dependencies

{
    "targetUserId" : <targetUserId>,
    "resourceInfo" : {
        "type" : "VIRTUAL_MACHINE",
        "id" : <ManagedVirtualMachine-Id>
    }
}

Response

A success or failure HTTP Status Code.

Request Attributes

report
  • Description: Identifies if you need a report of any errors that you might encounter during an ownership transfer process

  • Type: Boolean

    • true:

      • Displays the errors, if they exist, and if used with the dependents=true setting

      • Syncs up minimum privileges if used on its own.

    • false = Default. Does not display the errors, even if they exist.

Optional

dependents
  • Description: Identifies if the dependent Deployment Resources must also be transferred for a CloudCenter resource.

  • Type: Boolean

    • true:

      • Use if you intend to transfer ownership of dependencies.

      • Use with the report=true setting to validate a complete ownership transfer, that is, including dependent resources (if source user is the owner).

    • false = Default. Use if you are not transferring ownership of dependencies.

Required

targetUserId
  • DescriptionUnique, system-generated identifier for a user who should be receiving the resource ownership transfer as specified in the Transferring Ownership user case.

  • Type: String

resourceInfo
  • Description: Provides information about the CloudCenter resource that is being transferred.

  • Type: Resource details

    type
    • DescriptionThe type of resource
    • Type: String

    id
    • DescriptionUnique, system-generated identifier for this CloudCenter Resource.

    • Type: String

Response Attributes

A success HTTP Status Code or the corresponding error message.

  • No labels
© 2017-2019 Cisco Systems, Inc. All rights reserved