Class ConstraintPolicyOperations
java.lang.Object
co.ankatech.ankasecure.keymanagement.ConstraintPolicyOperations
The tenant's constraint policies: the usage, time and payload bounds a capability grant can carry.
Obtained from
AuthenticatedKeyManagementSdk.constraintPolicies().
ConstraintPolicyResponse policy = sdk.constraintPolicies().create(
new CreateConstraintPolicyRequest().name("nightly-batch").maxUsage(1000));
-
Method Summary
Modifier and TypeMethodDescriptioncreate(CreateConstraintPolicyRequest request) Creates a constraint policy (POST /tenants/{t}/constraint-policies).voidDeletes a constraint policy (DELETE /tenants/{t}/constraint-policies/{p}).Reads one constraint policy (GET /tenants/{t}/constraint-policies/{p}).list(ConstraintPolicyListQuery query) Lists constraint policies (GET /tenants/{t}/constraint-policies).update(UUID policyId, CreateConstraintPolicyRequest request) Updates a constraint policy (PATCH /tenants/{t}/constraint-policies/{p}).
-
Method Details
-
list
Lists constraint policies (GET /tenants/{t}/constraint-policies).- Parameters:
query- the page; must not benull- Returns:
- one page of policies
- Throws:
KeyManagementSdkException- when the call is refused
-
create
Creates a constraint policy (POST /tenants/{t}/constraint-policies).- Parameters:
request- the policy; must not benull- Returns:
- the created policy
- Throws:
KeyManagementSdkException- when the call is refused
-
get
Reads one constraint policy (GET /tenants/{t}/constraint-policies/{p}).- Parameters:
policyId- the policy; must not benull- Returns:
- the policy
- Throws:
KeyManagementSdkException- when the call is refused
-
update
Updates a constraint policy (PATCH /tenants/{t}/constraint-policies/{p}).- Parameters:
policyId- the policy; must not benullrequest- the policy's new values; must not benull- Returns:
- the updated policy
- Throws:
KeyManagementSdkException- when the call is refused
-
delete
Deletes a constraint policy (DELETE /tenants/{t}/constraint-policies/{p}).- Parameters:
policyId- the policy; must not benull- Throws:
KeyManagementSdkException- when a grant still carries the policy (409) or the call is refused
-