public class SchedulePolicies extends AbstractCoreBulkResources<SchedulePolicyRestRep> implements TenantResources<SchedulePolicyRestRep>
| Constructor and Description |
|---|
SchedulePolicies(ViPRCoreClient parent,
RestClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
assignPolicyToFileSystem(java.net.URI fileSystemId,
java.net.URI policyId)
This method assigns a policy to a file system.
|
SchedulePolicyRestRep |
create(java.net.URI tenantId,
PolicyParam input)
Creates a Schedule Policy in the given tenant.
|
void |
delete(java.net.URI id)
Deletes the given schedule policy by ID.
|
java.util.List<SchedulePolicyRestRep> |
getByTenant(java.net.URI tenantId)
Gets the resources associated with a given tenant.
|
java.util.List<SchedulePolicyRestRep> |
getByTenant(java.net.URI tenantId,
ResourceFilter<SchedulePolicyRestRep> filter)
Gets the resources associated with a given tenant, optionally filtering the results as they are returned.
|
java.util.List<SchedulePolicyRestRep> |
getByUserTenant()
Convenience method for retrieving by user's current tenant.
|
java.util.List<SchedulePolicyRestRep> |
getByUserTenant(ResourceFilter<SchedulePolicyRestRep> filter)
Convenience method for retrieving by user's current tenant.
|
java.util.List<FilePolicyRestRep> |
listByFileSystem(java.net.URI fileSystemId)
Lists the file Schedule Snapshot policies for the given file system by ID.
|
java.util.List<NamedRelatedResourceRep> |
listByTenant(java.net.URI tenantId)
Lists resources associated with a given tenant.
|
java.util.List<NamedRelatedResourceRep> |
listByUserTenant()
Convenience method for listing by the user's current tenant.
|
void |
unassignPolicyToFileSystem(java.net.URI fileSystemId,
java.net.URI policyId)
This method unassigna policy from the file system.
|
void |
update(java.net.URI id,
PolicyParam input)
Updates the given Schedule Policy by ID.
|
getByIds, getByRefs, listBulkIdsaddTags, get, get, getByIds, getByRefs, getTags, performSearch, performSearchBy, removeTags, search, updateTags, withInactive, withInternalequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetByIds, getByRefsaddTags, get, get, getTags, removeTags, search, updateTagspublic SchedulePolicies(ViPRCoreClient parent, RestClient client)
public void delete(java.net.URI id)
API Call: DELETE /schedule-policies/{policyId}
id - the ID of policy to deactivate.public SchedulePolicyRestRep create(java.net.URI tenantId, PolicyParam input)
API Call: POST /tenants/{tenantId}/schedule-policies
tenantId - the ID of the tenant.input - the Policy configuration.public void update(java.net.URI id,
PolicyParam input)
API Call: PUT /schedule-policies/{policyId}
id - the ID of the policy to update.input - the update configuration.public java.util.List<FilePolicyRestRep> listByFileSystem(java.net.URI fileSystemId)
API Call: GET /file/filesystems/{fileSystemId}/file-policies
fileSystemId - the ID of the file system.public void assignPolicyToFileSystem(java.net.URI fileSystemId,
java.net.URI policyId)
API Call: PUT /file/filesystems/{fs_id}/assign-file-policy/{policy_id}
fileSystemId - the ID of the file system.policyId - the ID of the policy.public void unassignPolicyToFileSystem(java.net.URI fileSystemId,
java.net.URI policyId)
API Call: PUT /file/filesystems/{fs_id}/unassign-file-policy/{policy_id}
fileSystemId - the ID of the file system.policyId - the ID of the policy.public java.util.List<NamedRelatedResourceRep> listByUserTenant()
TenantResourcesEquivalent to: listByTenant(client.getUserTenant())
listByUserTenant in interface TenantResources<SchedulePolicyRestRep>TenantResources.listByTenant(URI)public java.util.List<SchedulePolicyRestRep> getByUserTenant()
TenantResourcesEquivalent to: getByTenant(client.getUserTenant())
getByUserTenant in interface TenantResources<SchedulePolicyRestRep>TenantResources.getByTenant(URI)public java.util.List<SchedulePolicyRestRep> getByUserTenant(ResourceFilter<SchedulePolicyRestRep> filter)
TenantResourcesEquivalent to: getByTenant(client.getUserTenant(), filter)
getByUserTenant in interface TenantResources<SchedulePolicyRestRep>TenantResources.getByTenant(URI, ResourceFilter)public java.util.List<NamedRelatedResourceRep> listByTenant(java.net.URI tenantId)
TenantResourceslistByTenant in interface TenantResources<SchedulePolicyRestRep>tenantId - the tenant ID.public java.util.List<SchedulePolicyRestRep> getByTenant(java.net.URI tenantId)
TenantResourcesgetByTenant in interface TenantResources<SchedulePolicyRestRep>tenantId - the tenant ID.Resources.getByRefs(java.util.Collection)public java.util.List<SchedulePolicyRestRep> getByTenant(java.net.URI tenantId, ResourceFilter<SchedulePolicyRestRep> filter)
TenantResourcesgetByTenant in interface TenantResources<SchedulePolicyRestRep>tenantId - the tenant ID.filter - the resource filter to apply to the results as they are returned (optional).Resources.getByRefs(java.util.Collection, ResourceFilter)