public interface Policies extends Service, PoliciesTypes
Policies
interface provides methods to manage compute policies. A
compute policy defines the intended behavior for a collection of vSphere objects
identified by a tag. A compute policy is an instance of a capability. It is
created by providing a value for the creation type specified by the capability.
See CapabilitiesTypes.Info.getCreateSpecType()
.
Warning: This interface is available as technical preview. It may be
changed in a future release.PoliciesTypes.Summary
RESOURCE_TYPE
Modifier and Type | Method and Description |
---|---|
java.lang.String |
create(Structure spec)
Creates a new compute policy.
|
void |
create(Structure spec,
AsyncCallback<java.lang.String> asyncCallback)
Creates a new compute policy.
|
void |
create(Structure spec,
AsyncCallback<java.lang.String> asyncCallback,
InvocationConfig invocationConfig)
Creates a new compute policy.
|
java.lang.String |
create(Structure spec,
InvocationConfig invocationConfig)
Creates a new compute policy.
|
void |
delete(java.lang.String policy)
Deletes a specific compute policy.
|
void |
delete(java.lang.String policy,
AsyncCallback<java.lang.Void> asyncCallback)
Deletes a specific compute policy.
|
void |
delete(java.lang.String policy,
AsyncCallback<java.lang.Void> asyncCallback,
InvocationConfig invocationConfig)
Deletes a specific compute policy.
|
void |
delete(java.lang.String policy,
InvocationConfig invocationConfig)
Deletes a specific compute policy.
|
Structure |
get(java.lang.String policy)
Returns information about a specific compute policy.
|
void |
get(java.lang.String policy,
AsyncCallback<Structure> asyncCallback)
Returns information about a specific compute policy.
|
void |
get(java.lang.String policy,
AsyncCallback<Structure> asyncCallback,
InvocationConfig invocationConfig)
Returns information about a specific compute policy.
|
Structure |
get(java.lang.String policy,
InvocationConfig invocationConfig)
Returns information about a specific compute policy.
|
java.util.List<PoliciesTypes.Summary> |
list()
Returns information about the compute policies available in this vCenter server.
|
void |
list(AsyncCallback<java.util.List<PoliciesTypes.Summary>> asyncCallback)
Returns information about the compute policies available in this vCenter server.
|
void |
list(AsyncCallback<java.util.List<PoliciesTypes.Summary>> asyncCallback,
InvocationConfig invocationConfig)
Returns information about the compute policies available in this vCenter server.
|
java.util.List<PoliciesTypes.Summary> |
list(InvocationConfig invocationConfig)
Returns information about the compute policies available in this vCenter server.
|
java.lang.String create(Structure spec)
Synchronous method overload. Result of the invocation will be reported as a method return value.
spec
- Specification for the new policy to be created. The new policy will be an
instance of the capability that has the creation type (see CapabilitiesTypes.Info.getCreateSpecType()
)
equal to the type of the specified value (see spec
).
The parameter must contain all the properties defined in CreateSpec
.com.vmware.vcenter.compute.Policy
.AlreadyExists
- if a policy with the same name is already present on this vCenter server.InvalidArgument
- if a parameter passed in the spec is invalid.UnableToAllocateResource
- if more than 100 policies are created.Unauthorized
- if the user doesn't have the required privileges.Unauthorized
- if you do not have all of the privileges described as follows: ComputePolicy.Manage
. java.lang.String create(Structure 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.
spec
- Specification for the new policy to be created. The new policy will be an
instance of the capability that has the creation type (see CapabilitiesTypes.Info.getCreateSpecType()
)
equal to the type of the specified value (see spec
).
The parameter must contain all the properties defined in CreateSpec
.invocationConfig
- Configuration for the method invocation.com.vmware.vcenter.compute.Policy
.AlreadyExists
- if a policy with the same name is already present on this vCenter server.InvalidArgument
- if a parameter passed in the spec is invalid.UnableToAllocateResource
- if more than 100 policies are created.Unauthorized
- if the user doesn't have the required privileges.Unauthorized
- if you do not have all of the privileges described as follows: ComputePolicy.Manage
. void create(Structure spec, AsyncCallback<java.lang.String> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Result:
The identifier of the newly created policy. Use this identifier to get or
destroy the policy.
The return value will be an identifier for the resource type: com.vmware.vcenter.compute.Policy
.
Operation Errors:
AlreadyExists
- if a policy with the same name is already present on this vCenter server.
InvalidArgument
- if a parameter passed in the spec is invalid.
UnableToAllocateResource
- if more than 100 policies are created.
Unauthorized
- if the user doesn't have the required privileges.
Unauthorized
- if you do not have all of the privileges described as follows:
ComputePolicy.Manage
. spec
- Specification for the new policy to be created. The new policy will be an
instance of the capability that has the creation type (see CapabilitiesTypes.Info.getCreateSpecType()
)
equal to the type of the specified value (see spec
).
The parameter must contain all the properties defined in CreateSpec
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void create(Structure spec, AsyncCallback<java.lang.String> 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:
The identifier of the newly created policy. Use this identifier to get or
destroy the policy.
The return value will be an identifier for the resource type: com.vmware.vcenter.compute.Policy
.
Operation Errors:
AlreadyExists
- if a policy with the same name is already present on this vCenter server.
InvalidArgument
- if a parameter passed in the spec is invalid.
UnableToAllocateResource
- if more than 100 policies are created.
Unauthorized
- if the user doesn't have the required privileges.
Unauthorized
- if you do not have all of the privileges described as follows:
ComputePolicy.Manage
. spec
- Specification for the new policy to be created. The new policy will be an
instance of the capability that has the creation type (see CapabilitiesTypes.Info.getCreateSpecType()
)
equal to the type of the specified value (see spec
).
The parameter must contain all the properties defined in CreateSpec
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.java.util.List<PoliciesTypes.Summary> list()
Synchronous method overload. Result of the invocation will be reported as a method return value.
Unauthorized
- if the user doesn't have the required privileges.Unauthorized
- if you do not have all of the privileges described as follows: System.Read
. java.util.List<PoliciesTypes.Summary> list(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.
invocationConfig
- Configuration for the method invocation.Unauthorized
- if the user doesn't have the required privileges.Unauthorized
- if you do not have all of the privileges described as follows: System.Read
. void list(AsyncCallback<java.util.List<PoliciesTypes.Summary>> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Result:
The list of compute policies available on this vCenter server.
Operation Errors:
Unauthorized
- if the user doesn't have the required privileges.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Read
. asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void list(AsyncCallback<java.util.List<PoliciesTypes.Summary>> 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:
The list of compute policies available on this vCenter server.
Operation Errors:
Unauthorized
- if the user doesn't have the required privileges.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Read
. asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.Structure get(java.lang.String policy)
Synchronous method overload. Result of the invocation will be reported as a method return value.
policy
- Identifier of the policy for which information should be retrieved.
The parameter must be an identifier for the resource type: com.vmware.vcenter.compute.Policy
.CapabilitiesTypes.Info.getInfoType()
.
The return value will contain all the properties defined in Info
.NotFound
- if a policy with this identifier does not exist.Unauthorized
- if the user doesn't have the required privileges.Unauthorized
- if you do not have all of the privileges described as follows: System.Read
. Structure get(java.lang.String policy, 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.
policy
- Identifier of the policy for which information should be retrieved.
The parameter must be an identifier for the resource type: com.vmware.vcenter.compute.Policy
.invocationConfig
- Configuration for the method invocation.CapabilitiesTypes.Info.getInfoType()
.
The return value will contain all the properties defined in Info
.NotFound
- if a policy with this identifier does not exist.Unauthorized
- if the user doesn't have the required privileges.Unauthorized
- if you do not have all of the privileges described as follows: System.Read
. void get(java.lang.String policy, AsyncCallback<Structure> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Result:
Detailed information about the specified compute policy. The returned value can
be converted to the information type of the capability that this policy is based
on. See CapabilitiesTypes.Info.getInfoType()
.
The return value will contain all the properties defined in Info
.
Operation Errors:
NotFound
- if a policy with this identifier does not exist.
Unauthorized
- if the user doesn't have the required privileges.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Read
. policy
- Identifier of the policy for which information should be retrieved.
The parameter must be an identifier for the resource type: com.vmware.vcenter.compute.Policy
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void get(java.lang.String policy, AsyncCallback<Structure> 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:
Detailed information about the specified compute policy. The returned value can
be converted to the information type of the capability that this policy is based
on. See CapabilitiesTypes.Info.getInfoType()
.
The return value will contain all the properties defined in Info
.
Operation Errors:
NotFound
- if a policy with this identifier does not exist.
Unauthorized
- if the user doesn't have the required privileges.
Unauthorized
- if you do not have all of the privileges described as follows:
System.Read
. policy
- Identifier of the policy for which information should be retrieved.
The parameter must be an identifier for the resource type: com.vmware.vcenter.compute.Policy
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.void delete(java.lang.String policy)
Synchronous method overload. Result of the invocation will be reported as a method return value.
policy
- Identifier of the policy to be deleted.
The parameter must be an identifier for the resource type: com.vmware.vcenter.compute.Policy
.NotFound
- if a policy with this identifier does not exist.Unauthorized
- if the user doesn't have the required privileges.Unauthorized
- if you do not have all of the privileges described as follows: ComputePolicy.Manage
. void delete(java.lang.String policy, 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.
policy
- Identifier of the policy to be deleted.
The parameter must be an identifier for the resource type: com.vmware.vcenter.compute.Policy
.invocationConfig
- Configuration for the method invocation.NotFound
- if a policy with this identifier does not exist.Unauthorized
- if the user doesn't have the required privileges.Unauthorized
- if you do not have all of the privileges described as follows: ComputePolicy.Manage
. void delete(java.lang.String policy, AsyncCallback<java.lang.Void> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Errors:
NotFound
- if a policy with this identifier does not exist.
Unauthorized
- if the user doesn't have the required privileges.
Unauthorized
- if you do not have all of the privileges described as follows:
ComputePolicy.Manage
. policy
- Identifier of the policy to be deleted.
The parameter must be an identifier for the resource type: com.vmware.vcenter.compute.Policy
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void delete(java.lang.String policy, 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:
NotFound
- if a policy with this identifier does not exist.
Unauthorized
- if the user doesn't have the required privileges.
Unauthorized
- if you do not have all of the privileges described as follows:
ComputePolicy.Manage
. policy
- Identifier of the policy to be deleted.
The parameter must be an identifier for the resource type: com.vmware.vcenter.compute.Policy
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.