Content SubscribedLibrary update

Content SubscribedLibrary update

Updates the properties of a subscribed library.

This is an incremental update to the subscribed library. Properties that are missing or null in the update specification will be left unchanged.

Returns an authorization error if you do not have all of the privileges described as follows:

  • The resource com.vmware.content.Library referenced by the parameter libraryId requires ContentLibrary.UpdateSubscribedLibrary.
Request
URI
PATCH
https://{api_host}/api/content/subscribed-library/{libraryId}
COPY
Path Parameters
string
libraryId
Required

Identifier of the subscribed library to update.

The parameter must be an identifier for the resource type: com.vmware.content.Library.


Request Body

Specification of the new property values to set on the subscribed library.

Content LibraryModel of type(s) application/json
Required
{
    "id": "string",
    "creation_time": "string",
    "description": "string",
    "last_modified_time": "string",
    "last_sync_time": "string",
    "name": "string",
    "storage_backings": [
        {
            "type": "string",
            "datastore_id": "string",
            "storage_uri": "string"
        }
    ],
    "type": "string",
    "optimization_info": {
        "optimize_remote_publishing": false
    },
    "version": "string",
    "publish_info": {
        "authentication_method": "string",
        "published": false,
        "publish_url": "string",
        "user_name": "string",
        "password": "string",
        "current_password": "string",
        "persist_json_enabled": false
    },
    "subscription_info": {
        "authentication_method": "string",
        "automatic_sync_enabled": false,
        "on_demand": false,
        "password": "string",
        "ssl_thumbprint": "string",
        "subscription_url": "string",
        "user_name": "string",
        "source_info": {
            "source_library": "string",
            "subscription": "string"
        },
        "ssl_certificate": "string"
    },
    "server_guid": "string",
    "security_policy_id": "string",
    "unset_security_policy_id": false,
    "state_info": {
        "state": "string"
    }
}
string
id
Optional

An identifier which uniquely identifies this Content LibraryModel.

This property is not used for the create operation. It will not be present in the response of the get or list operations. It is not used for the update operation.

When clients pass a value of this schema as a parameter, the property must be an identifier for the resource type: com.vmware.content.Library. When operations return a value of this schema as a response, the property will be an identifier for the resource type: com.vmware.content.Library.

string As date-time As date-time
creation_time
Optional

The date and time when this library was created.

This property is not used for the create operation. It will always be present in the response of the get or list operations. It is not used for the update operation.

string
description
Optional

A human-readable description for this library.

This property is optional for the create operation. Leaving it missing or null during creation will result in an empty string value. It will always be present in the result of a get or list operation. It is optional for the update operation. Leaving it missing or null during update indicates that the description should be left unchanged.

string As date-time As date-time
last_modified_time
Optional

The date and time when this library was last updated.

This property is updated automatically when the library properties are changed. This property is not affected by adding, removing, or modifying a library item or its content within the library. Tagging the library or syncing the subscribed library does not alter this property.

This property is not used for the create operation. It will always be present in the response of the get or list operations. It is not used for the update operation.

string As date-time As date-time
last_sync_time
Optional

The date and time when this library was last synchronized.

This property applies only to subscribed libraries. It is updated every time a synchronization is triggered on the library. The value is missing or null for a local library.

This property is not used for the create operation. It is optional in the response of the get or list operations. It is not used for the update operation.

string
name
Optional

The name of the library.

A Library is identified by a human-readable name. Library names cannot be undefined or an empty string. Names do not have to be unique.

This property must be provided for the create operation. It will always be present in the response of the get or list operations. It is optional for the update operation.

array of object
storage_backings
Optional

The list of default storage backings which are available for this library.

A Content Library StorageBacking defines a default storage location which can be used to store files for library items in this library. Some library items, for instance, virtual machine template items, support files that may be distributed across various storage backings. One or more item files may or may not be located on the default storage backing.

Multiple default storage locations are not currently supported but may become supported in future releases.

This property must be provided for the create operation. It will always be present in the response of the get or list operations. It is not used for the update operation.

string
type
Optional

The type (LibraryModel.LibraryType) of this library.

This value can be used to determine what additional services and information can be available for this library.

This property is not used for the create and update operations. It will always be present in the result of a get operation.

For more information see: Content LibraryModel LibraryType.

This property is not used for the create operation. It will always be present in the response of the get or list operations. It is not used for the update operation.

optimization_info
Optional

Defines various optimizations and optimization parameters applied to this library.

This property is optional for the create operation. It is optional in the response of the get or list operations. It is optional for the update operation.

string
version
Optional

A version number which is updated on metadata changes. This value allows clients to detect concurrent updates and prevent accidental clobbering of data.

This value represents a number which is incremented every time library properties, such as name or description, are changed. It is not incremented by changes to a library item within the library, including adding or removing items. It is also not affected by tagging the library.

This property is not used for the create operation. It will always be present in the result of a get or list operation. It is optional for the update operation. Leaving it missing or null during update indicates that you do not need to detect concurrent updates.

publish_info
Optional

Defines how this library is published so that it can be subscribed to by a remote subscribed library.

The Content Library PublishInfo defines where and how the metadata for this local library is accessible. A local library is only published publically if Content Library PublishInfo.published is true.

This property is optional for the create and update operations. If not specified during creation, the default is for the library to not be published. If not specified during update, the property is left unchanged.

subscription_info
Optional

Defines the subscription behavior for this Library.

The Content Library SubscriptionInfo defines how this subscribed library synchronizes to a remote source. Setting the value will determine the remote source to which the library synchronizes, and how. Changing the subscription will result in synchronizing to a new source. If the new source differs from the old one, the old library items and data will be lost. Setting Content Library SubscriptionInfo.automatic_sync_enabled to false will halt subscription but will not remove existing cached data.

This property is optional for the create and update operations. If not specified during creation, a default will be created without an active subscription. If not specified during update, the property is left unchanged.

string
server_guid
Optional

The unique identifier of the vCenter server where the library exists.

This property is optional for the create operation. It will always be present in the response of the get or list operations. It is not used for the update operation.

When clients pass a value of this schema as a parameter, the property must be an identifier for the resource type: com.vmware.vcenter.VCenter. When operations return a value of this schema as a response, the property will be an identifier for the resource type: com.vmware.vcenter.VCenter.

string
security_policy_id
Optional

Represents the security policy applied to this library.

Setting the property will make the library secure. This field is ignored in update operation if Content LibraryModel.unset_security_policy_id is set to true.

This property was added in vSphere API 7.0.3.0.

This property is optional for the create and update operations. If not set in create operation, the library will be insecure. If not specified in update operation, the property is left unchanged.

When clients pass a value of this schema as a parameter, the property must be an identifier for the resource type: com.vmware.content.Library. When operations return a value of this schema as a response, the property will be an identifier for the resource type: com.vmware.content.Library.

boolean
unset_security_policy_id
Optional

This represents the intent of the change to Content LibraryModel.security_policy_id in update operation.

If this field is set to true, any security policy applied to the library will be removed. If this field is set to false, any security policy applied to library will be changed to the value specified in Content LibraryModel.security_policy_id, if any.

This property was added in vSphere API 7.0.3.0.

This property is optional for the update operation. If missing or null, any existing security policy will be changed to the value specified in Content LibraryModel.security_policy_id, if any.

state_info
Optional

The Content Library StateInfo provides the state information of this library.

This property is not used for the create and update operations. It will always be present in the result of a get operation.

This property was added in vSphere API 9.0.0.0.

This property is not used for the create operation. It will always be present in the response of the get or list operations. It is not used for the update operation.

Authentication
This operation uses the following authentication methods.
Responses
204

Success!

Operation doesn't return any data structure

400

Vapi Std Errors NotAllowedInCurrentState if the updateSpec updates the subscription URL (see Content Library SubscriptionInfo.subscription_url) and the content of the library specified by libraryId has been deleted from the storage backings (see Content LibraryModel.storage_backings) associated with it.

Vapi Std Errors InvalidElementType if the library specified by libraryId is not a subscribed library.

Vapi Std Errors InvalidArgument if the updateSpec is not valid.

Returns Vapi Std Errors Error of type(s) application/json
"Vapi Std Errors Error Object"
array of object
messages
Required

Stack of one or more localizable messages for human error consumers.

The message at the top of the stack (first in the list) describes the error from the perspective of the operation the client invoked.

Each subsequent message in the stack describes the "cause" of the prior message.

object
data
Optional

Data to facilitate clients responding to the operation reporting a standard error to indicating that it was unable to complete successfully.

Operations may provide data that clients can use when responding to errors. Since the data that clients need may be specific to the context of the operation reporting the error, different operations that report the same error may provide different data in the error. The documentation for each each operation will describe what, if any, data it provides for each error it reports.

The Vapi Std Errors ArgumentLocations, Vapi Std Errors FileLocations, and Vapi Std Errors TransientIndication schemas are intended as possible values for this property. Vapi Std DynamicID may also be useful as a value for this property (although that is not its primary purpose). Some resources may provide their own specific schemas for use as the value of this property when reporting errors from their operations.

Some operations will not set this property when reporting errors.

string
error_type
Required

Discriminator field to help API consumers identify the structure type.

For more information see: Vapi Std Errors Error Type.

This property was added in vSphere API 6.7.2.

Can be missing or null for compatibility with preceding implementations.


404

if the library specified by libraryId does not exist.

Returns Vapi Std Errors NotFound of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors NotFound0
"Vapi Std Errors NotFound Object"

409

if the Content LibraryModel.version of updateSpec is not equal to the current version of the library.

Returns Vapi Std Errors ConcurrentChange of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors ConcurrentChange0
"Vapi Std Errors ConcurrentChange Object"

500

Vapi Std Errors ResourceInaccessible if the subscription info is being updated but the published library cannot be contacted or found.

Vapi Std Errors ResourceBusy if the Content LibraryModel.version of updateSpec is missing or null and the library is being concurrently updated by another user.

Returns Vapi Std Errors Error of type(s) application/json
"Vapi Std Errors Error Object"
array of object
messages
Required

Stack of one or more localizable messages for human error consumers.

The message at the top of the stack (first in the list) describes the error from the perspective of the operation the client invoked.

Each subsequent message in the stack describes the "cause" of the prior message.

object
data
Optional

Data to facilitate clients responding to the operation reporting a standard error to indicating that it was unable to complete successfully.

Operations may provide data that clients can use when responding to errors. Since the data that clients need may be specific to the context of the operation reporting the error, different operations that report the same error may provide different data in the error. The documentation for each each operation will describe what, if any, data it provides for each error it reports.

The Vapi Std Errors ArgumentLocations, Vapi Std Errors FileLocations, and Vapi Std Errors TransientIndication schemas are intended as possible values for this property. Vapi Std DynamicID may also be useful as a value for this property (although that is not its primary purpose). Some resources may provide their own specific schemas for use as the value of this property when reporting errors from their operations.

Some operations will not set this property when reporting errors.

string
error_type
Required

Discriminator field to help API consumers identify the structure type.

For more information see: Vapi Std Errors Error Type.

This property was added in vSphere API 6.7.2.

Can be missing or null for compatibility with preceding implementations.


Code Samples
COPY
                    curl -X PATCH -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}'