public class Clusters extends AbstractCoreBulkResources<ClusterRestRep> implements TenantResources<ClusterRestRep>
Base URL: /compute/clusters
| Constructor and Description |
|---|
Clusters(ViPRCoreClient parent,
RestClient client) |
| Modifier and Type | Method and Description |
|---|---|
ClusterRestRep |
create(java.net.URI tenantId,
ClusterCreateParam input)
Creates a cluster for the given tenant.
|
Task<ClusterRestRep> |
deactivate(java.net.URI id)
Deactivates a cluster by ID if cluster hosts do not have block or file exports.
|
Task<ClusterRestRep> |
deactivate(java.net.URI id,
boolean detachStorage)
Deactivates a cluster.
|
Task<ClusterRestRep> |
detachStorage(java.net.URI id)
Detaches storage from a cluster.
|
java.util.List<ClusterRestRep> |
getByDataCenter(java.net.URI dataCenterId)
Gets the list of clusters for the given datacenter by ID.
|
java.util.List<ClusterRestRep> |
getByTenant(java.net.URI tenantId)
Gets the resources associated with a given tenant.
|
java.util.List<ClusterRestRep> |
getByTenant(java.net.URI tenantId,
ResourceFilter<ClusterRestRep> filter)
Gets the resources associated with a given tenant, optionally filtering the results as they are returned.
|
java.util.List<ClusterRestRep> |
getByUserTenant()
Convenience method for retrieving by user's current tenant.
|
java.util.List<ClusterRestRep> |
getByUserTenant(ResourceFilter<ClusterRestRep> filter)
Convenience method for retrieving by user's current tenant.
|
java.util.List<ClusterRestRep> |
getByVCenter(java.net.URI vCenterId)
Gets the list of clusters for the given vCenter by ID.
|
java.util.List<NamedRelatedResourceRep> |
listByDataCenter(java.net.URI dataCenterId)
Lists the clusters for the given datacenter by ID.
|
java.util.List<NamedRelatedResourceRep> |
listByTenant(java.net.URI tenantId)
Lists the clusters for the given tenant.
|
java.util.List<NamedRelatedResourceRep> |
listByUserTenant()
Convenience method for listing by the user's current tenant.
|
java.util.List<NamedRelatedResourceRep> |
listByVCenter(java.net.URI vCenterId)
Lists the clusters for the given vCenter by ID.
|
ClusterSearchBuilder |
search()
Creates a search builder specifically for creating cluster search queries.
|
java.util.List<ClusterRestRep> |
searchByName(java.lang.String clusterName)
Lists the clusters for the given name.
|
ClusterRestRep |
update(java.net.URI id,
ClusterUpdateParam input)
Updates a cluster by ID.
|
ClusterRestRep |
update(java.net.URI id,
ClusterUpdateParam input,
boolean updateExports)
Updates a cluster by ID.
|
Clusters |
withInactive(boolean inactive)
Configures the fetch operations to include inactive resources.
|
Clusters |
withInternal(boolean internal)
Configures the fetch operations to include internal resources.
|
getByIds, getByRefs, listBulkIdsaddTags, get, get, getByIds, getByRefs, getTags, performSearch, performSearchBy, removeTags, updateTagsequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetByIds, getByRefsaddTags, get, get, getTags, removeTags, updateTagspublic Clusters(ViPRCoreClient parent, RestClient client)
public Clusters withInactive(boolean inactive)
AbstractResourceswithInactive in class AbstractResources<ClusterRestRep>inactive - whether to include inactive resources.public Clusters withInternal(boolean internal)
AbstractResourceswithInternal in class AbstractResources<ClusterRestRep>internal - whether to include internal resources.public java.util.List<NamedRelatedResourceRep> listByTenant(java.net.URI tenantId)
API Call: GET /tenants/{tenantId}/clusters
listByTenant in interface TenantResources<ClusterRestRep>tenantId - the ID of the tenant.public java.util.List<NamedRelatedResourceRep> listByUserTenant()
TenantResourcesEquivalent to: listByTenant(client.getUserTenant())
listByUserTenant in interface TenantResources<ClusterRestRep>TenantResources.listByTenant(URI)public java.util.List<ClusterRestRep> getByUserTenant()
TenantResourcesEquivalent to: getByTenant(client.getUserTenant())
getByUserTenant in interface TenantResources<ClusterRestRep>TenantResources.getByTenant(URI)public java.util.List<ClusterRestRep> getByUserTenant(ResourceFilter<ClusterRestRep> filter)
TenantResourcesEquivalent to: getByTenant(client.getUserTenant(), filter)
getByUserTenant in interface TenantResources<ClusterRestRep>TenantResources.getByTenant(URI, ResourceFilter)public java.util.List<ClusterRestRep> getByTenant(java.net.URI tenantId)
TenantResourcesgetByTenant in interface TenantResources<ClusterRestRep>tenantId - the tenant ID.Resources.getByRefs(java.util.Collection)public java.util.List<ClusterRestRep> getByTenant(java.net.URI tenantId, ResourceFilter<ClusterRestRep> filter)
TenantResourcesgetByTenant in interface TenantResources<ClusterRestRep>tenantId - the tenant ID.filter - the resource filter to apply to the results as they are returned (optional).Resources.getByRefs(java.util.Collection, ResourceFilter)public java.util.List<NamedRelatedResourceRep> listByDataCenter(java.net.URI dataCenterId)
API Call: GET /compute/vcenter-data-centers/{dataCenterId}/clusters
dataCenterId - the ID of the datacenter.public java.util.List<ClusterRestRep> getByDataCenter(java.net.URI dataCenterId)
Convenience method for getByRefs(listByDataCenter(dataCenterId)).
dataCenterId - the ID of the datacenter.listByDataCenter(URI),
AbstractResources.getByRefs(java.util.Collection)public java.util.List<NamedRelatedResourceRep> listByVCenter(java.net.URI vCenterId)
API Call: GET /compute/vcenters/{vCenterId}/clusters
vCenterId - the ID of the vCenter.public java.util.List<ClusterRestRep> getByVCenter(java.net.URI vCenterId)
Convenience method for getByRefs(listByVCenter(vCenterId)).
vCenterId - the ID of the vCenter.listByDataCenter(URI),
AbstractResources.getByRefs(java.util.Collection)public ClusterRestRep create(java.net.URI tenantId, ClusterCreateParam input)
API Call: POST /tenants/{tenantId}/clusters
tenantId - the ID of the tenant.input - the create configuration.public ClusterRestRep update(java.net.URI id, ClusterUpdateParam input)
API Call: PUT /compute/clusters/{id}
id - the ID of the cluster to update.input - the update configuration.public ClusterRestRep update(java.net.URI id, ClusterUpdateParam input, boolean updateExports)
API Call: PUT /compute/clusters/{id}?update-exports={updateExports}
id - the ID of the cluster to update.input - the update configuration.updateExports - if true, will also update cluster exports.public Task<ClusterRestRep> deactivate(java.net.URI id)
API Call: POST /compute/clusters/{id}/deactivate
id - the ID of the cluster to deactivate.
The cluster hosts must not have block or file exportspublic Task<ClusterRestRep> deactivate(java.net.URI id, boolean detachStorage)
API Call: POST /compute/clusters/{id}/deactivate?detach-storage={detachStorage}
id - the ID of the cluster to deactivate.detachStorage - if true, will first detach storage.public Task<ClusterRestRep> detachStorage(java.net.URI id)
API Call: POST /compute/clusters/{id}/detach-storage
id - the ID of the cluster.public java.util.List<ClusterRestRep> searchByName(java.lang.String clusterName)
API Call: GET /compute/clusters/search?name={name}
clusterName - the name of the cluster.public ClusterSearchBuilder search()
search in interface Resources<ClusterRestRep>search in class AbstractResources<ClusterRestRep>