@Generated public class ClusterPoliciesAPI extends Object
Cluster policies let you limit users to create clusters with prescribed settings, simplify the user interface and enable more users to create their own clusters (by fixing and hiding some values), control cost by limiting per cluster maximum cost (by setting limits on attributes whose values contribute to hourly price).
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 cluster create permission can select the Unrestricted policy and create fully-configurable clusters. - A user who has both 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 have been created in the workspace, the Policy drop-down does not display.
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)
Create a new policy.
|
CreatePolicyResponse |
create(String name) |
void |
delete(DeletePolicy request)
Delete a cluster policy.
|
void |
delete(String policyId) |
void |
edit(EditPolicy request)
Update a cluster policy.
|
void |
edit(String policyId,
String name) |
Policy |
get(GetClusterPolicyRequest request)
Get entity.
|
Policy |
get(String policyId) |
ClusterPoliciesService |
impl() |
Iterable<Policy> |
list(ListClusterPoliciesRequest request)
Get a cluster policy.
|
public ClusterPoliciesAPI(ApiClient apiClient)
public ClusterPoliciesAPI(ClusterPoliciesService mock)
public CreatePolicyResponse create(String name)
public CreatePolicyResponse create(CreatePolicy request)
Creates a new policy with prescribed settings.
public void delete(String policyId)
public void delete(DeletePolicy request)
Delete a policy for a cluster. Clusters governed by this policy can still run, but cannot be edited.
public void edit(EditPolicy request)
Update an existing policy for cluster. This operation may make some clusters governed by the previous policy invalid.
public Policy get(GetClusterPolicyRequest request)
Get a cluster policy entity. Creation and editing is available to admins only.
public Iterable<Policy> list(ListClusterPoliciesRequest request)
Returns a list of policies accessible by the requesting user.
public ClusterPoliciesService impl()
Copyright © 2023. All rights reserved.