public class PolicyStub extends com.vmware.vapi.internal.bindings.Stub implements Policy
Policy
API service.
WARNING: Internal class, subject to change in future versions.
PolicyTypes.DiskPolicySpec, PolicyTypes.Info, PolicyTypes.UpdateSpec, PolicyTypes.VmHomePolicySpec
apiProvider, converter, ifaceId, retryPolicy, securityContext
_VAPI_SERVICE_ID
Constructor and Description |
---|
PolicyStub(ApiProvider apiProvider,
StubConfigurationBase config) |
PolicyStub(ApiProvider apiProvider,
com.vmware.vapi.internal.bindings.TypeConverter typeConverter,
StubConfigurationBase config) |
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.
|
public PolicyStub(ApiProvider apiProvider, com.vmware.vapi.internal.bindings.TypeConverter typeConverter, StubConfigurationBase config)
public PolicyStub(ApiProvider apiProvider, StubConfigurationBase config)
public void update(java.lang.String vm, PolicyTypes.UpdateSpec spec)
Policy
Synchronous method overload. Result of the invocation will be reported as a method return value.
public void update(java.lang.String vm, PolicyTypes.UpdateSpec spec, InvocationConfig invocationConfig)
Policy
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
update
in interface Policy
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.public void update(java.lang.String vm, PolicyTypes.UpdateSpec spec, AsyncCallback<java.lang.Void> asyncCallback)
Policy
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.
update
in interface Policy
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.public void update(java.lang.String vm, PolicyTypes.UpdateSpec spec, AsyncCallback<java.lang.Void> asyncCallback, InvocationConfig invocationConfig)
Policy
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.
update
in interface Policy
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.public PolicyTypes.Info get(java.lang.String vm)
Policy
Synchronous method overload. Result of the invocation will be reported as a method return value.
public PolicyTypes.Info get(java.lang.String vm, InvocationConfig invocationConfig)
Policy
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
get
in interface Policy
vm
- Virtual machine identifier
The parameter must be an identifier for the resource type: VirtualMachine
.invocationConfig
- Configuration for the method invocation.public void get(java.lang.String vm, AsyncCallback<PolicyTypes.Info> asyncCallback)
Policy
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Invocation 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.
public void get(java.lang.String vm, AsyncCallback<PolicyTypes.Info> asyncCallback, InvocationConfig invocationConfig)
Policy
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Invocation 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.
get
in interface Policy
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.