Library_PublishInfo

Library_PublishInfo
Library_PublishInfo

The PublishInfo structure defines how a local library is published publicly for synchronization to other libraries.

JSON Example
{
    "authentication_method": "string",
    "published": false,
    "publish_url": "string",
    "user_name": "string",
    "password": "string",
    "current_password": "string",
    "persist_json_enabled": false
}
authentication_method
Optional

The PublishInfo.AuthenticationMethod enumerated type indicates how a subscribed library should authenticate to the published library endpoint.
BASIC : Require HTTP Basic authentication matching a specified username and password.
NONE : Require no authentication.

boolean
published
Optional

Whether the local library is published. This field is required for the LocalLibrary.create operation. It is optional for the LocalLibrary.update operation, and if unset the value will not be changed. When the existing authentication method is BASIC and the local library is published, the PublishInfo.current-password field is required before turning off publishing. This field will always be present in the results of the LocalLibrary.get operation.

string As uri
publish_url
Optional

The URL to which the library metadata is published by the Content Library Service. This value can be used to set the SubscriptionInfo.subscription-url property when creating a subscribed library.

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

string
user_name
Optional

The username to require for authentication. This field is optional for the LocalLibrary.create and LocalLibrary.update operations. When the authentication method is NONE, the username can be left unset. When the authentication method is BASIC, the username is ignored in the current release. It defaults to "vcsp". It is preferable to leave this unset. If specified, it must be set to "vcsp".

string As password
password
Optional

The new password to require for authentication. This field is optional for the LocalLibrary.create operation. When the authentication method is NONE, the password can be left unset. When the authentication method is BASIC, the password should be a non-empty string. This field is optional for the LocalLibrary.update operation. Leaving it unset during update indicates that the password is not changed. When the password is changed, the PublishInfo.current-password field is required. This field is not used for the LocalLibrary.get operation.

string As password
current_password
Optional

The current password to verify. This field is available starting in vSphere 6.7. This field is unused for the LocalLibrary.create operation. This field is optional for the LocalLibrary.update operation. When the existing authentication method is NONE, the current password can be left unset. When the existing authentication method is BASIC, the current password is verified before applying the new PublishInfo.password, turning off authentication, or unpublishing the library. This field is not used for the LocalLibrary.get operation.

boolean
persist_json_enabled
Optional

Whether library and library item metadata are persisted in the storage backing as JSON files. This flag only applies if the local library is published. Enabling JSON persistence allows you to synchronize a subscribed library manually instead of over HTTP. You copy the local library content and metadata to another storage backing manually and then create a subscribed library referencing the location of the library JSON file in the SubscriptionInfo.subscription-url. When the subscribed library's storage backing matches the subscription URL, files do not need to be copied to the subscribed library.

For a library backed by a datastore, the library JSON file will be stored at the path contentlib-{library_id}/lib.json on the datastore.

For a library backed by a remote file system, the library JSON file will be stored at {library_id}/lib.json in the remote file system path.

This field is optional for the create operation. It will always be present in the result of the get or list operations. It is optional for the update operation.