public interface Policies extends Service, PoliciesTypes
Policies
interface provides methods to manage compute policies in
VMware Cloud on AWS. Usage beyond VMware Cloud on AWS is not supported. 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 Technology Preview. These are
early access APIs provided to test, automate and provide feedback on the
feature. Since this can change based on feedback, VMware does not guarantee
backwards compatibility and recommends against using them in production
environments. Some Technology Preview APIs might only be applicable to specific
environments.PoliciesTypes.Summary
_VAPI_SERVICE_ID, RESOURCE_TYPE
Modifier and Type | Method and Description |
---|---|
java.lang.String |
create(Structure spec)
Creates a new compute policy in VMware Cloud on AWS.
|
void |
create(Structure spec,
AsyncCallback<java.lang.String> asyncCallback)
Creates a new compute policy in VMware Cloud on AWS.
|
void |
create(Structure spec,
AsyncCallback<java.lang.String> asyncCallback,
InvocationConfig invocationConfig)
Creates a new compute policy in VMware Cloud on AWS.
|
java.lang.String |
create(Structure spec,
InvocationConfig invocationConfig)
Creates a new compute policy in VMware Cloud on AWS.
|
void |
delete(java.lang.String policy)
Deletes a specific compute policy in VMware Cloud on AWS.
|
void |
delete(java.lang.String policy,
AsyncCallback<java.lang.Void> asyncCallback)
Deletes a specific compute policy in VMware Cloud on AWS.
|
void |
delete(java.lang.String policy,
AsyncCallback<java.lang.Void> asyncCallback,
InvocationConfig invocationConfig)
Deletes a specific compute policy in VMware Cloud on AWS.
|
void |
delete(java.lang.String policy,
InvocationConfig invocationConfig)
Deletes a specific compute policy in VMware Cloud on AWS.
|
Structure |
get(java.lang.String policy)
Returns information about a specific compute policy in VMware Cloud on AWS.
|
void |
get(java.lang.String policy,
AsyncCallback<Structure> asyncCallback)
Returns information about a specific compute policy in VMware Cloud on AWS.
|
void |
get(java.lang.String policy,
AsyncCallback<Structure> asyncCallback,
InvocationConfig invocationConfig)
Returns information about a specific compute policy in VMware Cloud on AWS.
|
Structure |
get(java.lang.String policy,
InvocationConfig invocationConfig)
Returns information about a specific compute policy in VMware Cloud on AWS.
|
java.util.List<PoliciesTypes.Summary> |
list()
Returns information about the compute policies available in this vCenter server
in VMware Cloud on AWS.
|
void |
list(AsyncCallback<java.util.List<PoliciesTypes.Summary>> asyncCallback)
Returns information about the compute policies available in this vCenter server
in VMware Cloud on AWS.
|
void |
list(AsyncCallback<java.util.List<PoliciesTypes.Summary>> asyncCallback,
InvocationConfig invocationConfig)
Returns information about the compute policies available in this vCenter server
in VMware Cloud on AWS.
|
java.util.List<PoliciesTypes.Summary> |
list(InvocationConfig invocationConfig)
Returns information about the compute policies available in this vCenter server
in VMware Cloud on AWS.
|
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
.
Invocation 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.
Invocation 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
.
Invocation 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.
Invocation 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
.
Invocation 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.
Invocation 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.