REST API - update

content library subscriptions: update

Updates the specified subscription of the published library.

This is an incremental update to the subscription. Except for the content.library.subscriptions.update_spec_placement structure, fields that are unset in the update specification will be left unchanged. If spec#subscribedLibraryPlacement is specified, all fields of the current subscribed library placement will be replaced by this placement.

. This operation was added in vSphere API 6.7.2.

Request:

HTTP request

PATCH https://{server}/rest/com/vmware/content/library/subscriptions/id:{library}

Path Parameters

Name Type Description
Required
library string Identifier of the published library.

Request Body Structure:

{
    "subscription""obj-103",
    "spec"{
        "subscribed_library_vcenter"{
            "hostname""string",
            "https_port"1
        },
        "subscribed_library_placement"{
            "cluster""obj-103",
            "folder""obj-103",
            "host""obj-103",
            "resource_pool""obj-103",
            "network""obj-103"
        }
    }
}

Request Body Parameters:

Name Type Description
bold = required
subscription string subscription identifier.
spec update_spec Specification of the new property values to set on the subscription.
spec.subscribed_library_vcenter update_spec_vcenter Specification for the subscribed library's vCenter Server instance. This attribute was added in vSphere API 6.7.2.

Optional. If unset, the value is unchanged.

spec.subscribed_library_vcenter.hostname string The hostname of the subscribed library's vCenter Server. This attribute was added in vSphere API 6.7.2.

Optional. If unset, the value is unchanged.

spec.subscribed_library_vcenter.https_port long The HTTPS port of the vCenter Server instance where the subscribed library exists. This attribute was added in vSphere API 6.7.2.

Optional. If unset, the value is unchanged.

spec.subscribed_library_placement update_spec_placement Placement specification for the virtual machine template items of the subscribed library. Updating this information will only affect new or updated items, existing items will not be moved. The entire placement configuration of the subscribed library will replaced by the new specification. This attribute was added in vSphere API 6.7.2.

Optional. If unset, the placement configuration of the subscribed library will be unchanged.

spec.subscribed_library_placement.folder string Virtual machine folder into which the virtual machine template should be placed. This attribute was added in vSphere API 6.7.2.

Optional. This field is currently required. In future, if this is unset, the system will attempt to choose a suitable folder for the virtual machine template; if a folder cannot be chosen, publishing a virtual machine template item will fail.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Folder:VCenter. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Folder:VCenter.

spec.subscribed_library_placement.cluster string Cluster onto which the virtual machine template should be placed. If cluster and resource_pool are both specified, resource_pool must belong to cluster. If cluster and host are both specified, host must be a member of cluster. If resource_pool or host is specified, it is recommended that this field be unset. This attribute was added in vSphere API 6.7.2.

Optional. If resource_pool or host is specified, it is recommended that this field be unset.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: ClusterComputeResource:VCenter. When operations return a value of this structure as a result, the field will be an identifier for the resource type: ClusterComputeResource:VCenter.

spec.subscribed_library_placement.resource_pool string Resource pool into which the virtual machine template should be placed. This attribute was added in vSphere API 6.7.2.

Optional. This field is currently required. In future, if this is unset, the system will attempt to choose a suitable resource pool for the virtual machine template; if a resource pool cannot be chosen, publish of virtual machine template item will fail.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: ResourcePool:VCenter. When operations return a value of this structure as a result, the field will be an identifier for the resource type: ResourcePool:VCenter.

spec.subscribed_library_placement.host string Host onto which the virtual machine template should be placed. If host and resource_pool are both specified, resource_pool must belong to host. If host and cluster are both specified, host must be a member of cluster. This attribute was added in vSphere API 6.7.2.

Optional. If this is unset, the system will attempt to choose a suitable host for the virtual machine template; if a host cannot be chosen, publishing the virtual machine template item will fail.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: HostSystem:VCenter. When operations return a value of this structure as a result, the field will be an identifier for the resource type: HostSystem:VCenter.

spec.subscribed_library_placement.network string Network that backs the virtual Ethernet adapters in the virtual machine template. This attribute was added in vSphere API 6.7.2.

Optional. If unset, newly published virtual machine template library items will not be backed by a network.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Network:VCenter. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Network:VCenter.

Response:

HTTP Status Code: 200

None

Errors:

HTTP Status Code Type Description
500 error If the system reports an error while responding to the request.
404 not_found If the library specified by library does not exist.
500 resource_inaccessible If the subscribed library cannot be contacted or found.
400 invalid_argument If content.library.subscriptions.update_spec contains invalid arguments.
400 invalid_element_type If the library specified by library is a subscribed library.
400 not_allowed_in_current_state If the library specified by library is not a published library.
401 unauthenticated If the user that requested the operation cannot be authenticated.
403 unauthorized If the user that requested the operation is not authorized to perform the operation.