@Generated public class ClusterPoliciesAPI extends Object
With cluster policies, you can: - Auto-install cluster libraries on the next restart by listing them in the policy's "libraries" field (Public Preview). - Limit users to creating clusters with the prescribed settings. - Simplify the user interface, enabling more users to create clusters, by fixing and hiding some fields. - Manage costs by setting limits on attributes that impact the hourly rate.
Cluster policy permissions limit which policies a user can select in the Policy drop-down when the user creates a cluster: - A user who has unrestricted cluster create permission can select the Unrestricted policy and create fully-configurable clusters. - A user who has both unrestricted cluster create permission and access to cluster policies can select the Unrestricted policy and policies they have access to. - A user that has access to only cluster policies, can select the policies they have access to.
If no policies exist in the workspace, the Policy drop-down doesn't appear. Only admin users can create, edit, and delete policies. Admin users also have access to all policies.
| Constructor and Description |
|---|
ClusterPoliciesAPI(ApiClient apiClient)
Regular-use constructor
|
ClusterPoliciesAPI(ClusterPoliciesService mock)
Constructor for mocks
|
| Modifier and Type | Method and Description |
|---|---|
CreatePolicyResponse |
create(CreatePolicy request)
Creates a new policy with prescribed settings.
|
void |
delete(DeletePolicy request)
Delete a policy for a cluster.
|
void |
delete(String policyId) |
void |
edit(EditPolicy request)
Update an existing policy for cluster.
|
Policy |
get(GetClusterPolicyRequest request)
Get a cluster policy entity.
|
Policy |
get(String policyId) |
GetClusterPolicyPermissionLevelsResponse |
getPermissionLevels(GetClusterPolicyPermissionLevelsRequest request)
Gets the permission levels that a user can have on an object.
|
GetClusterPolicyPermissionLevelsResponse |
getPermissionLevels(String clusterPolicyId) |
ClusterPolicyPermissions |
getPermissions(GetClusterPolicyPermissionsRequest request)
Gets the permissions of a cluster policy.
|
ClusterPolicyPermissions |
getPermissions(String clusterPolicyId) |
ClusterPoliciesService |
impl() |
Iterable<Policy> |
list(ListClusterPoliciesRequest request)
Returns a list of policies accessible by the requesting user.
|
ClusterPolicyPermissions |
setPermissions(ClusterPolicyPermissionsRequest request)
Sets permissions on an object, replacing existing permissions if they exist.
|
ClusterPolicyPermissions |
updatePermissions(ClusterPolicyPermissionsRequest request)
Updates the permissions on a cluster policy.
|
public ClusterPoliciesAPI(ApiClient apiClient)
public ClusterPoliciesAPI(ClusterPoliciesService mock)
public CreatePolicyResponse create(CreatePolicy request)
public void delete(String policyId)
public void delete(DeletePolicy request)
public void edit(EditPolicy request)
public Policy get(GetClusterPolicyRequest request)
public GetClusterPolicyPermissionLevelsResponse getPermissionLevels(String clusterPolicyId)
public GetClusterPolicyPermissionLevelsResponse getPermissionLevels(GetClusterPolicyPermissionLevelsRequest request)
public ClusterPolicyPermissions getPermissions(String clusterPolicyId)
public ClusterPolicyPermissions getPermissions(GetClusterPolicyPermissionsRequest request)
public Iterable<Policy> list(ListClusterPoliciesRequest request)
public ClusterPolicyPermissions setPermissions(ClusterPolicyPermissionsRequest request)
public ClusterPolicyPermissions updatePermissions(ClusterPolicyPermissionsRequest request)
public ClusterPoliciesService impl()
Copyright © 2026. All rights reserved.