com.vmware.vcenter.authorization package

Submodules

com.vmware.vcenter.authorization.privilege_checks_client module

class com.vmware.vcenter.authorization.privilege_checks_client.Latest(config)

Bases: VapiInterface

The LatestPrivilegeChecks class provides methods for getting the latest recorded privilege check. This class was added in vSphere API 8.0.0.0.

Parameters:

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

get()

Returns a marker to the last recorded privilege check. This method was added in vSphere API 8.0.0.0.

Return type:

str

Returns:

A marker for the most recently recorded privilege check.

Raise:

com.vmware.vapi.std.errors_client.Error if there is a generic error.

Raise:

com.vmware.vapi.std.errors_client.Unauthenticated if the user can not be authenticated.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires Sessions.CollectPrivilegeChecks.

class com.vmware.vcenter.authorization.privilege_checks_client.StubFactory(stub_config)

Bases: StubFactoryBase

Initialize StubFactoryBase

Parameters:

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance

com.vmware.vcenter.authorization.vt_containers_client module

The com.vmware.vcenter.authorization.vt_containers_client module provides classes for managing vTContainers.

class com.vmware.vcenter.authorization.vt_containers_client.Mappings(config)

Bases: VapiInterface

The Mappings class can be used to manage the relationship between containerized objects and vTContainer instances. A containerized object is any data object that is associated with a vTContainer instance, and can be of any resource type.

Each vTContainer instance can hold any number of containerized objects, but there is a service defined limit to the number of vTContainer instances that can be associated with a single containerized object.

When a containerized object is deleted, its mappings to vTContainer instances are automatically removed. However, a vTContainer instance cannot be deleted until all mappings to it have been removed.. This class was added in vSphere API 8.0.3.0.

Parameters:

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class CreateSpec(vtcontainer=None, object=None)

Bases: VapiStruct

The Mappings.CreateSpec class contains the information necessary for associating an object with a vTContainer instance. This class was added in vSphere API 8.0.3.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • vtcontainer (str) – Identifier of the vTContainer instance. This attribute was added in vSphere API 8.0.3.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.authorization.VtContainer. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.authorization.VtContainer.

  • object (com.vmware.vapi.std_client.DynamicID) – Identifier of the object that will be containerized. This attribute was added in vSphere API 8.0.3.0.

class FilterSpec(vtcontainers=None, types=None)

Bases: VapiStruct

The Mappings.FilterSpec class contains attributes used to filter the items returned from a Mappings.list() method. This class was added in vSphere API 8.0.3.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • vtcontainers (set of str or None) – A set of vTContainers. This attribute was added in vSphere API 8.0.3.0. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: com.vmware.vcenter.authorization.VtContainer. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: com.vmware.vcenter.authorization.VtContainer. If None or empty, the result will not be filtered by vTContainer instance.

  • types (set of str or None) – A set of object resource types. This attribute was added in vSphere API 8.0.3.0. If None or empty, the result will not be filtered by object resource type.

class Info(vtcontainer=None, object=None)

Bases: VapiStruct

The Mappings.Info class contains all of the information about a containerized object mapping. This class was added in vSphere API 8.0.3.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • vtcontainer (str) – Identifier of the vTContainer instance. This attribute was added in vSphere API 8.0.3.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.authorization.VtContainer. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.authorization.VtContainer.

  • object (com.vmware.vapi.std_client.DynamicID) – Identifier of the containerized object. This attribute was added in vSphere API 8.0.3.0.

class IterationSpec(marker=None, size=None)

Bases: VapiStruct

The Mappings.IterationSpec class contains attributes used to limit the number of items returned from the Mappings.list() method. This class was added in vSphere API 8.0.3.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • marker (str or None) – An opaque string in support of pagination which may be specified to retrieve the next set of items. The marker is obtained from the Mappings.ListResult class that is returned by the Mappings.list() method. This attribute was added in vSphere API 8.0.3.0. If None the first set of items is returned.

  • size (long or None) – Maximum number of items to return in a single call. This attribute was added in vSphere API 8.0.3.0. If None defaults to a size defined by the service.

class ListItem(mapping=None, info=None)

Bases: VapiStruct

The Mappings.ListItem class contains all of the information about a containerized object mapping returned by the Mappings.list() method. This class was added in vSphere API 8.0.3.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • mapping (str) – Identifier of the vTContainer mapping. This attribute was added in vSphere API 8.0.3.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.authorization.vt_containers.Mapping. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.authorization.vt_containers.Mapping.

  • info (Mappings.Info) – Information about the vTContainer mapping. This attribute was added in vSphere API 8.0.3.0.

class ListResult(items=None, marker=None)

Bases: VapiStruct

The Mappings.ListResult class represents the result of the Mappings.list() method. This class was added in vSphere API 8.0.3.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • items (list of Mappings.ListItem) – List of vTContainer mappings. This attribute was added in vSphere API 8.0.3.0.

  • marker (str or None) – An opaque string in support of pagination which indicates that more items are available. The marker can be used in subsequent calls to the Mappings.list() method to retrieve the next set of items. This attribute was added in vSphere API 8.0.3.0. If None there are no additional items.

RESOURCE_TYPE = 'com.vmware.vcenter.authorization.vt_containers.Mapping'

The resource type for vTContainer mappings. This class attribute was added in vSphere API 8.0.3.0.

create(spec)

Creates a new mapping that associates an object with a vTContainer instance. This method was added in vSphere API 8.0.3.0.

Parameters:

spec (Mappings.CreateSpec) – The specification of a new mapping.

Return type:

str

Returns:

The identifier of the new mapping. The return value will be an identifier for the resource type: com.vmware.vcenter.authorization.vt_containers.Mapping.

Raise:

com.vmware.vapi.std.errors_client.AlreadyExists if the configuration already exists.

Raise:

com.vmware.vapi.std.errors_client.Error if there is a generic error.

Raise:

com.vmware.vapi.std.errors_client.InvalidArgument if the inputs are not valid.

Raise:

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the limit of mappings for the specified object has been reached.

Raise:

com.vmware.vapi.std.errors_client.NotFound if the vTContainer or the object does not exist.

Raise:

com.vmware.vapi.std.errors_client.Unsupported if the object type does not support containerization.

Raise:

com.vmware.vapi.std.errors_client.Unauthenticated if the caller cannot be authenticated.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if the caller does not have the Authorization.ModifyPermissions privilege on the specified object.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if the caller does not have privilege to access objects in the specified vTContainer.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires Authorization.ModifyVTContainerMappings.

delete(mapping)

Removes a mapping. The related object will no longer be associated with the vTContainer instance. This method was added in vSphere API 8.0.3.0.

Parameters:

mapping (str) – The mapping identifier. The parameter must be an identifier for the resource type: com.vmware.vcenter.authorization.vt_containers.Mapping.

Raise:

com.vmware.vapi.std.errors_client.Error if there is a generic error.

Raise:

com.vmware.vapi.std.errors_client.NotFound if the mapping is not found.

Raise:

com.vmware.vapi.std.errors_client.Unauthenticated if the caller cannot be authenticated.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if the caller does not have the Authorization.ModifyPermissions privilege on the object that is associated with the mapping.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if the caller does not have privilege to access objects in the vTContainer that is associated with the mapping.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires Authorization.ModifyVTContainerMappings.

get(mapping)

Returns information about a single mapping indicating the containerized object and its associated vTContainer instance. This method was added in vSphere API 8.0.3.0.

Parameters:

mapping (str) – The mapping identifier. The parameter must be an identifier for the resource type: com.vmware.vcenter.authorization.vt_containers.Mapping.

Return type:

Mappings.Info

Returns:

The mapping information.

Raise:

com.vmware.vapi.std.errors_client.Error if there is a generic error.

Raise:

com.vmware.vapi.std.errors_client.NotFound if the mapping is not found.

Raise:

com.vmware.vapi.std.errors_client.Unauthenticated if the caller cannot be authenticated.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if the caller does not have privilege to access objects in the vTContainer that is associated with the mapping.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

list(filter=None, iterate=None)

Returns the list of mappings indicating the containerized objects and their associated vTContainer instances. This method was added in vSphere API 8.0.3.0.

Parameters:
  • filter (Mappings.FilterSpec or None) – The specification of matching mappings to be retrieved. If None all mappings will be returned.

  • iterate (Mappings.IterationSpec or None) – The specification of a page to be retrieved. if None the first set of items will be returned.

Return type:

Mappings.ListResult

Returns:

A list of mappings.

Raise:

com.vmware.vapi.std.errors_client.Error if there is a generic error.

Raise:

com.vmware.vapi.std.errors_client.InvalidArgument if the inputs are not valid.

Raise:

com.vmware.vapi.std.errors_client.Unauthenticated if the caller cannot be authenticated.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

class com.vmware.vcenter.authorization.vt_containers_client.StubFactory(stub_config)

Bases: StubFactoryBase

Initialize StubFactoryBase

Parameters:

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance