public interface Policy extends Service, PolicyTypes
Policy
interface provides methods to configure the storage policies
associated with the virtual machine home and/or its virtual disks. This
interface was added in vSphere API 6.7.PolicyTypes.DiskPolicySpec, PolicyTypes.Info, PolicyTypes.UpdateSpec, PolicyTypes.VmHomePolicySpec
Modifier and Type | Method and Description |
---|---|
PolicyTypes.Info |
get(java.lang.String vm)
Returns Information about Storage Policy associated with a virtual machine's
home directory and/or its virtual hard disks.
|
void |
get(java.lang.String vm,
AsyncCallback<PolicyTypes.Info> asyncCallback)
Returns Information about Storage Policy associated with a virtual machine's
home directory and/or its virtual hard disks.
|
void |
get(java.lang.String vm,
AsyncCallback<PolicyTypes.Info> asyncCallback,
InvocationConfig invocationConfig)
Returns Information about Storage Policy associated with a virtual machine's
home directory and/or its virtual hard disks.
|
PolicyTypes.Info |
get(java.lang.String vm,
InvocationConfig invocationConfig)
Returns Information about Storage Policy associated with a virtual machine's
home directory and/or its virtual hard disks.
|
void |
update(java.lang.String vm,
PolicyTypes.UpdateSpec spec)
Updates the storage policy configuration of a virtual machine and/or its
associated virtual hard disks.
|
void |
update(java.lang.String vm,
PolicyTypes.UpdateSpec spec,
AsyncCallback<java.lang.Void> asyncCallback)
Updates the storage policy configuration of a virtual machine and/or its
associated virtual hard disks.
|
void |
update(java.lang.String vm,
PolicyTypes.UpdateSpec spec,
AsyncCallback<java.lang.Void> asyncCallback,
InvocationConfig invocationConfig)
Updates the storage policy configuration of a virtual machine and/or its
associated virtual hard disks.
|
void |
update(java.lang.String vm,
PolicyTypes.UpdateSpec spec,
InvocationConfig invocationConfig)
Updates the storage policy configuration of a virtual machine and/or its
associated virtual hard disks.
|
void update(java.lang.String vm, PolicyTypes.UpdateSpec spec)
Synchronous method overload. Result of the invocation will be reported as a method return value.
vm
- Virtual machine identifier.
The parameter must be an identifier for the resource type: VirtualMachine
.spec
- Storage Policy Specification for updating the virtual machine and virtual disks.Error
- if the system reports an error while responding to the request.ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.Unauthenticated
- if the user is not authenticated.Unauthorized
- if the user doesn't have the required priveleges.InvalidArgument
- if the storage policy specified is invalid.ResourceBusy
- if the virtual machine or disk is busy performing another operation.ResourceInaccessible
- if the virtual machine or disk's configuration state cannot be accessed.void update(java.lang.String vm, PolicyTypes.UpdateSpec spec, InvocationConfig invocationConfig)
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
vm
- Virtual machine identifier.
The parameter must be an identifier for the resource type: VirtualMachine
.spec
- Storage Policy Specification for updating the virtual machine and virtual disks.invocationConfig
- Configuration for the method invocation.Error
- if the system reports an error while responding to the request.ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.Unauthenticated
- if the user is not authenticated.Unauthorized
- if the user doesn't have the required priveleges.InvalidArgument
- if the storage policy specified is invalid.ResourceBusy
- if the virtual machine or disk is busy performing another operation.ResourceInaccessible
- if the virtual machine or disk's configuration state cannot be accessed.void update(java.lang.String vm, PolicyTypes.UpdateSpec spec, AsyncCallback<java.lang.Void> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Errors:
Error
- if the system reports an error while responding to the request.
ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.
Unauthenticated
- if the user is not authenticated.
Unauthorized
- if the user doesn't have the required priveleges.
InvalidArgument
- if the storage policy specified is invalid.
ResourceBusy
- if the virtual machine or disk is busy performing another operation.
ResourceInaccessible
- if the virtual machine or disk's configuration state cannot be accessed.
vm
- Virtual machine identifier.
The parameter must be an identifier for the resource type: VirtualMachine
.spec
- Storage Policy Specification for updating the virtual machine and virtual disks.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void update(java.lang.String vm, PolicyTypes.UpdateSpec spec, AsyncCallback<java.lang.Void> asyncCallback, InvocationConfig invocationConfig)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Errors:
Error
- if the system reports an error while responding to the request.
ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.
Unauthenticated
- if the user is not authenticated.
Unauthorized
- if the user doesn't have the required priveleges.
InvalidArgument
- if the storage policy specified is invalid.
ResourceBusy
- if the virtual machine or disk is busy performing another operation.
ResourceInaccessible
- if the virtual machine or disk's configuration state cannot be accessed.
vm
- Virtual machine identifier.
The parameter must be an identifier for the resource type: VirtualMachine
.spec
- Storage Policy Specification for updating the virtual machine and virtual disks.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.PolicyTypes.Info get(java.lang.String vm)
Synchronous method overload. Result of the invocation will be reported as a method return value.
vm
- Virtual machine identifier
The parameter must be an identifier for the resource type: VirtualMachine
.Error
- if the system reports an error while responding to the request.ResourceInaccessible
- if the virtual machine's configuration state cannot be accessed.ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.Unauthenticated
- if the user can not be authenticated.Unauthorized
- if the user does not have the required privileges.PolicyTypes.Info get(java.lang.String vm, InvocationConfig invocationConfig)
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
vm
- Virtual machine identifier
The parameter must be an identifier for the resource type: VirtualMachine
.invocationConfig
- Configuration for the method invocation.Error
- if the system reports an error while responding to the request.ResourceInaccessible
- if the virtual machine's configuration state cannot be accessed.ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.Unauthenticated
- if the user can not be authenticated.Unauthorized
- if the user does not have the required privileges.void get(java.lang.String vm, AsyncCallback<PolicyTypes.Info> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Result:
Overview of Storage Policy associated with a virtual machine's home directory
and/or its associated virtual hard disks.
Operation Errors:
Error
- if the system reports an error while responding to the request.
ResourceInaccessible
- if the virtual machine's configuration state cannot be accessed.
ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.
Unauthenticated
- if the user can not be authenticated.
Unauthorized
- if the user does not have the required privileges.
vm
- Virtual machine identifier
The parameter must be an identifier for the resource type: VirtualMachine
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void get(java.lang.String vm, AsyncCallback<PolicyTypes.Info> asyncCallback, InvocationConfig invocationConfig)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Result:
Overview of Storage Policy associated with a virtual machine's home directory
and/or its associated virtual hard disks.
Operation Errors:
Error
- if the system reports an error while responding to the request.
ResourceInaccessible
- if the virtual machine's configuration state cannot be accessed.
ServiceUnavailable
- if the system is unable to communicate with a service to complete the request.
Unauthenticated
- if the user can not be authenticated.
Unauthorized
- if the user does not have the required privileges.
vm
- Virtual machine identifier
The parameter must be an identifier for the resource type: VirtualMachine
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.