VMware vSphere Automation SDK Perl The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions
Classes | List of all members
Com::Vmware::Content::Library::SubscriptionInfo Class Reference
Inheritance diagram for Com::Vmware::Content::Library::SubscriptionInfo:

## Classes
class | AuthenticationMethod

## Avaliable Methods
public method | set_ssl_thumbprint ()
public method | get_automatic_sync_enabled ()
public method | set_authentication_method ()
public method | set_user_name ()
public method | get_subscription_url ()
public method | set_password ()
public method | get_user_name ()
public method | get_password ()
public method | get_authentication_method ()
public method | set_automatic_sync_enabled ()
public method | get_ssl_thumbprint ()
public method | get_on_demand ()
public method | new ()
public method | set_on_demand ()
public method | set_subscription_url ()

## Detailed Description

The `Com::Vmware::Content::Library::SubscriptionInfo` class defines the subscription behavior for a subscribed library.

## Member Function Documentation

public method Com::Vmware::Content::Library::SubscriptionInfo::get_authentication_method | ( |  | ) |

Gets the value of 'authentication_method' property.

Return values

  authentication_method | - The current value of the field. Indicate how the subscribed library should authenticate (BASIC, NONE) with the published library endpoint. optional#

Code:
click to view
# Number of lines of code in get_authentication_method: 5
sub get_authentication_method {
my ($self, %args) = @_;
return $self->{'authentication_method'};
}

public method Com::Vmware::Content::Library::SubscriptionInfo::get_automatic_sync_enabled | ( |  | ) |

Gets the value of 'automatic_sync_enabled' property.

Return values

  automatic_sync_enabled | - The current value of the field. Whether the library should participate in automatic library synchronization. In order for automatic synchronization to happen, the global :attr:`Com::Vmware::Content::ConfigurationModel.automatic_sync_enabled` option must also be true. The subscription is still active even when automatic synchronization is turned off, but synchronization is only activated with an explicit call to :func:`Com::Vmware::Content::SubscribedLibrary.sync` or :func:`Com::Vmware::Content::Library::SubscribedItem.sync` . In other words, manual synchronization is still available even when automatic synchronization is disabled. optional#

Code:
click to view
# Number of lines of code in get_automatic_sync_enabled: 5
sub get_automatic_sync_enabled {
my ($self, %args) = @_;
return $self->{'automatic_sync_enabled'};
}

public method Com::Vmware::Content::Library::SubscriptionInfo::get_on_demand | ( |  | ) |

Gets the value of 'on_demand' property.

Return values

  on_demand | - The current value of the field. Indicates whether a library item's content will be synchronized only on demand.

If this is set to `true` , then the library item's metadata will be synchronized but the item's content (its files) will not be synchronized. The Content Library Service will synchronize the content upon request only. This can cause the first use of the content to have a noticeable delay.

Items without synchronized content can be forcefully synchronized in advance using the :func:`Com::Vmware::Content::Library::SubscribedItem.sync` call with `forceSyncContent` set to true. Once content has been synchronized, the content can removed with the :func:`Com::Vmware::Content::Library::SubscribedItem.evict` call.

If this value is set to `false` , all content will be synchronized in advance.

optional#

Code:
click to view
# Number of lines of code in get_on_demand: 5
sub get_on_demand {
my ($self, %args) = @_;
return $self->{'on_demand'};
}

public method Com::Vmware::Content::Library::SubscriptionInfo::get_password | ( |  | ) |

Gets the value of 'password' property.

Return values

  password | - The current value of the field. The password to use when authenticating.

The password must be set when using a password-based authentication method; empty strings are not allowed.

optional#

Code:
click to view
# Number of lines of code in get_password: 5
sub get_password {
my ($self, %args) = @_;
return $self->{'password'};
}

public method Com::Vmware::Content::Library::SubscriptionInfo::get_ssl_thumbprint | ( |  | ) |

Gets the value of 'ssl_thumbprint' property.

Return values

  ssl_thumbprint | - The current value of the field. An optional SHA-1 hash of the SSL certificate for the remote endpoint.

If this value is defined the SSL certificate will be verified by comparing it to the SSL thumbprint. The SSL certificate must verify against the thumbprint. When specified, the standard certificate chain validation behavior is not used. The certificate chain is validated normally if this value is null .

optional#

Code:
click to view
# Number of lines of code in get_ssl_thumbprint: 5
sub get_ssl_thumbprint {
my ($self, %args) = @_;
return $self->{'ssl_thumbprint'};
}

public method Com::Vmware::Content::Library::SubscriptionInfo::get_subscription_url | ( |  | ) |

Gets the value of 'subscription_url' property.

Return values

  subscription_url | - The current value of the field. The URL of the endpoint where the metadata for the remotely published library is being served.

This URL can be the :attr:`Com::Vmware::Content::Library::PublishInfo.publish_url` of the published library (for example, https://server/path/lib.json).

If the source content comes from a published library with :attr:`Com::Vmware::Content::Library::PublishInfo.persist_json_enabled` , the subscription URL can be a URL pointing to the library JSON file on a datastore or remote file system. The supported formats are:

vSphere 6.5

- ds:///vmfs/volumes/{uuid}/mylibrary/lib.json (for datastore)
- nfs://server/path/mylibrary/lib.json (for NFSv3 server on vCenter Server Appliance)
- nfs://server/path/mylibrary/lib.json?version=4 (for NFSv4 server on vCenter Server Appliance)
- smb://server/path/mylibrary/lib.json (for SMB server)

vSphere 6.0

- file://server/mylibrary/lib.json (for UNC server on vCenter Server for Windows)
- file:///path/mylibrary/lib.json (for local file system)

When you specify a DS subscription URL, the datastore must be on the same vCenter Server as the subscribed library. When you specify an NFS or SMB subscription URL, the :attr:`Com::Vmware::Content::Library::StorageBacking.storage_uri` of the subscribed library must be on the same remote file server and should share a common parent path with the subscription URL.

optional#

Code:
click to view
# Number of lines of code in get_subscription_url: 5
sub get_subscription_url {
my ($self, %args) = @_;
return $self->{'subscription_url'};
}

public method Com::Vmware::Content::Library::SubscriptionInfo::get_user_name | ( |  | ) |

Gets the value of 'user_name' property.

Return values

  user_name | - The current value of the field. The username to use when authenticating.

The username must be set when using a password-based authentication method. Empty strings are allowed for usernames.

optional#

Code:
click to view
# Number of lines of code in get_user_name: 5
sub get_user_name {
my ($self, %args) = @_;
return $self->{'user_name'};
}

public method Com::Vmware::Content::Library::SubscriptionInfo::new | ( |  | ) |

Constructor to initialize the Com::Vmware::Content::Library::SubscriptionInfo structure

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 29
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{authentication_method} = $args{'authentication_method'};
$self->{automatic_sync_enabled} = $args{'automatic_sync_enabled'};
$self->{on_demand} = $args{'on_demand'};
$self->{password} = $args{'password'};
$self->{ssl_thumbprint} = $args{'ssl_thumbprint'};
$self->{subscription_url} = $args{'subscription_url'};
$self->{user_name} = $args{'user_name'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Content::Library::SubscriptionInfo');
$self->set_binding_name('name' => 'com.vmware.content.library.subscription_info');
$self->set_binding_field('key' => 'authentication_method', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Content::Library', 'type_name' => 'SubscriptionInfo::AuthenticationMethod')));
$self->set_binding_field('key' => 'automatic_sync_enabled', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::BooleanType()));
$self->set_binding_field('key' => 'on_demand', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::BooleanType()));
$self->set_binding_field('key' => 'password', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::SecretType()));
$self->set_binding_field('key' => 'ssl_thumbprint', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
$self->set_binding_field('key' => 'subscription_url', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::URIType()));
$self->set_binding_field('key' => 'user_name', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
bless $self, $class;
return $self;
}

public method Com::Vmware::Content::Library::SubscriptionInfo::set_authentication_method | ( |  | ) |

Sets the given value for 'authentication_method' property.

Parameters

  authentication_method | - New value for the field. Indicate how the subscribed library should authenticate (BASIC, NONE) with the published library endpoint.

Code:
click to view
# Number of lines of code in set_authentication_method: 6
sub set_authentication_method {
my ($self, %args) = @_;
$self->{'authentication_method'} = $args{'authentication_method'};
return;
}

public method Com::Vmware::Content::Library::SubscriptionInfo::set_automatic_sync_enabled | ( |  | ) |

Sets the given value for 'automatic_sync_enabled' property.

Parameters

  automatic_sync_enabled | - New value for the field. Whether the library should participate in automatic library synchronization. In order for automatic synchronization to happen, the global :attr:`Com::Vmware::Content::ConfigurationModel.automatic_sync_enabled` option must also be true. The subscription is still active even when automatic synchronization is turned off, but synchronization is only activated with an explicit call to :func:`Com::Vmware::Content::SubscribedLibrary.sync` or :func:`Com::Vmware::Content::Library::SubscribedItem.sync` . In other words, manual synchronization is still available even when automatic synchronization is disabled.

Code:
click to view
# Number of lines of code in set_automatic_sync_enabled: 6
sub set_automatic_sync_enabled {
my ($self, %args) = @_;
$self->{'automatic_sync_enabled'} = $args{'automatic_sync_enabled'};
return;
}

public method Com::Vmware::Content::Library::SubscriptionInfo::set_on_demand | ( |  | ) |

Sets the given value for 'on_demand' property.

Parameters

  on_demand | - New value for the field. Indicates whether a library item's content will be synchronized only on demand.

If this is set to `true` , then the library item's metadata will be synchronized but the item's content (its files) will not be synchronized. The Content Library Service will synchronize the content upon request only. This can cause the first use of the content to have a noticeable delay.

Items without synchronized content can be forcefully synchronized in advance using the :func:`Com::Vmware::Content::Library::SubscribedItem.sync` call with `forceSyncContent` set to true. Once content has been synchronized, the content can removed with the :func:`Com::Vmware::Content::Library::SubscribedItem.evict` call.

If this value is set to `false` , all content will be synchronized in advance.

Code:
click to view
# Number of lines of code in set_on_demand: 6
sub set_on_demand {
my ($self, %args) = @_;
$self->{'on_demand'} = $args{'on_demand'};
return;
}

public method Com::Vmware::Content::Library::SubscriptionInfo::set_password | ( |  | ) |

Sets the given value for 'password' property.

Parameters

  password | - New value for the field. The password to use when authenticating.

The password must be set when using a password-based authentication method; empty strings are not allowed.

Code:
click to view
# Number of lines of code in set_password: 6
sub set_password {
my ($self, %args) = @_;
$self->{'password'} = $args{'password'};
return;
}

public method Com::Vmware::Content::Library::SubscriptionInfo::set_ssl_thumbprint | ( |  | ) |

Sets the given value for 'ssl_thumbprint' property.

Parameters

  ssl_thumbprint | - New value for the field. An optional SHA-1 hash of the SSL certificate for the remote endpoint.

If this value is defined the SSL certificate will be verified by comparing it to the SSL thumbprint. The SSL certificate must verify against the thumbprint. When specified, the standard certificate chain validation behavior is not used. The certificate chain is validated normally if this value is null .

Code:
click to view
# Number of lines of code in set_ssl_thumbprint: 6
sub set_ssl_thumbprint {
my ($self, %args) = @_;
$self->{'ssl_thumbprint'} = $args{'ssl_thumbprint'};
return;
}

public method Com::Vmware::Content::Library::SubscriptionInfo::set_subscription_url | ( |  | ) |

Sets the given value for 'subscription_url' property.

Parameters

  subscription_url | - New value for the field. The URL of the endpoint where the metadata for the remotely published library is being served.

This URL can be the :attr:`Com::Vmware::Content::Library::PublishInfo.publish_url` of the published library (for example, https://server/path/lib.json).

If the source content comes from a published library with :attr:`Com::Vmware::Content::Library::PublishInfo.persist_json_enabled` , the subscription URL can be a URL pointing to the library JSON file on a datastore or remote file system. The supported formats are:

vSphere 6.5

- ds:///vmfs/volumes/{uuid}/mylibrary/lib.json (for datastore)
- nfs://server/path/mylibrary/lib.json (for NFSv3 server on vCenter Server Appliance)
- nfs://server/path/mylibrary/lib.json?version=4 (for NFSv4 server on vCenter Server Appliance)
- smb://server/path/mylibrary/lib.json (for SMB server)

vSphere 6.0

- file://server/mylibrary/lib.json (for UNC server on vCenter Server for Windows)
- file:///path/mylibrary/lib.json (for local file system)

When you specify a DS subscription URL, the datastore must be on the same vCenter Server as the subscribed library. When you specify an NFS or SMB subscription URL, the :attr:`Com::Vmware::Content::Library::StorageBacking.storage_uri` of the subscribed library must be on the same remote file server and should share a common parent path with the subscription URL.

Code:
click to view
# Number of lines of code in set_subscription_url: 6
sub set_subscription_url {
my ($self, %args) = @_;
$self->{'subscription_url'} = $args{'subscription_url'};
return;
}

public method Com::Vmware::Content::Library::SubscriptionInfo::set_user_name | ( |  | ) |

Sets the given value for 'user_name' property.

Parameters

  user_name | - New value for the field. The username to use when authenticating.

The username must be set when using a password-based authentication method. Empty strings are allowed for usernames.

Code:
click to view
# Number of lines of code in set_user_name: 10
sub set_user_name {
my ($self, %args) = @_;
$self->{'user_name'} = $args{'user_name'};
return;
}
1;

The documentation for this class was generated from the following file:

- Com/Vmware/Content/Library/SubscriptionInfo.pm