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:
VapiInterfaceThe
LatestPrivilegeChecksclass 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.Errorif there is a generic error.- Raise:
com.vmware.vapi.std.errors_client.Unauthenticatedif the user can not be authenticated.- Raise:
com.vmware.vapi.std.errors_client.Unauthorizedif 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:
StubFactoryBaseInitialize 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:
VapiInterfaceThe
Mappingsclass 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:
VapiStructThe
Mappings.CreateSpecclass 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:
VapiStructThe
Mappings.FilterSpecclass contains attributes used to filter the items returned from aMappings.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 (
setofstrorNone) – 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 (
setofstrorNone) – 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:
VapiStructThe
Mappings.Infoclass 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:
VapiStructThe
Mappings.IterationSpecclass contains attributes used to limit the number of items returned from theMappings.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 (
strorNone) – An opaque string in support of pagination which may be specified to retrieve the next set of items. The marker is obtained from theMappings.ListResultclass that is returned by theMappings.list()method. This attribute was added in vSphere API 8.0.3.0. If None the first set of items is returned.size (
longorNone) – 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:
VapiStructThe
Mappings.ListItemclass contains all of the information about a containerized object mapping returned by theMappings.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:
VapiStructThe
Mappings.ListResultclass represents the result of theMappings.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 (
listofMappings.ListItem) – List of vTContainer mappings. This attribute was added in vSphere API 8.0.3.0.marker (
strorNone) – An opaque string in support of pagination which indicates that more items are available. The marker can be used in subsequent calls to theMappings.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.AlreadyExistsif the configuration already exists.- Raise:
com.vmware.vapi.std.errors_client.Errorif there is a generic error.- Raise:
com.vmware.vapi.std.errors_client.InvalidArgumentif the inputs are not valid.- Raise:
com.vmware.vapi.std.errors_client.NotAllowedInCurrentStateif the limit of mappings for the specified object has been reached.- Raise:
com.vmware.vapi.std.errors_client.NotFoundif the vTContainer or the object does not exist.- Raise:
com.vmware.vapi.std.errors_client.Unsupportedif the object type does not support containerization.- Raise:
com.vmware.vapi.std.errors_client.Unauthenticatedif the caller cannot be authenticated.- Raise:
com.vmware.vapi.std.errors_client.Unauthorizedif the caller does not have the Authorization.ModifyPermissions privilege on the specified object.- Raise:
com.vmware.vapi.std.errors_client.Unauthorizedif the caller does not have privilege to access objects in the specified vTContainer.- Raise:
com.vmware.vapi.std.errors_client.Unauthorizedif 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.Errorif there is a generic error.- Raise:
com.vmware.vapi.std.errors_client.NotFoundif the mapping is not found.- Raise:
com.vmware.vapi.std.errors_client.Unauthenticatedif the caller cannot be authenticated.- Raise:
com.vmware.vapi.std.errors_client.Unauthorizedif 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.Unauthorizedif 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.Unauthorizedif 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:
- Returns:
The mapping information.
- Raise:
com.vmware.vapi.std.errors_client.Errorif there is a generic error.- Raise:
com.vmware.vapi.std.errors_client.NotFoundif the mapping is not found.- Raise:
com.vmware.vapi.std.errors_client.Unauthenticatedif the caller cannot be authenticated.- Raise:
com.vmware.vapi.std.errors_client.Unauthorizedif 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.Unauthorizedif 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.FilterSpecorNone) – The specification of matching mappings to be retrieved. If None all mappings will be returned.iterate (
Mappings.IterationSpecorNone) – The specification of a page to be retrieved. if None the first set of items will be returned.
- Return type:
- Returns:
A list of mappings.
- Raise:
com.vmware.vapi.std.errors_client.Errorif there is a generic error.- Raise:
com.vmware.vapi.std.errors_client.InvalidArgumentif the inputs are not valid.- Raise:
com.vmware.vapi.std.errors_client.Unauthenticatedif the caller cannot be authenticated.- Raise:
com.vmware.vapi.std.errors_client.Unauthorizedif 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:
StubFactoryBaseInitialize StubFactoryBase
- Parameters:
stub_config (
vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance