Class ConstraintPoliciesApi
java.lang.Object
co.ankatech.keymanagement.client.keymanagement.api.ConstraintPoliciesApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateConstraintPolicy(UUID tenantId, CreateConstraintPolicyRequest createConstraintPolicyRequest) Create constraint policy Constraint types: `max_usage` (absolute cap per grant), `valid_from`/`valid_until` (temporal gate), `rate_limit` (per-grant throttle over a fixed one-minute window, approximate: a burst across a minute boundary can briefly reach twice the rate — 0 = emergency freeze, null = unlimited), `revoke_on_use` (single use: the grant is consumed by its first admitted invocation, whether or not the operation succeeds, and cannot be used again; it authorizes one operation, not one message).okhttp3.CallcreateConstraintPolicyAsync(UUID tenantId, CreateConstraintPolicyRequest createConstraintPolicyRequest, ApiCallback<ConstraintPolicyResponse> _callback) Create constraint policy (asynchronously) Constraint types: `max_usage` (absolute cap per grant), `valid_from`/`valid_until` (temporal gate), `rate_limit` (per-grant throttle over a fixed one-minute window, approximate: a burst across a minute boundary can briefly reach twice the rate — 0 = emergency freeze, null = unlimited), `revoke_on_use` (single use: the grant is consumed by its first admitted invocation, whether or not the operation succeeds, and cannot be used again; it authorizes one operation, not one message).okhttp3.CallcreateConstraintPolicyCall(UUID tenantId, CreateConstraintPolicyRequest createConstraintPolicyRequest, ApiCallback _callback) Build call for createConstraintPolicycreateConstraintPolicyWithHttpInfo(UUID tenantId, CreateConstraintPolicyRequest createConstraintPolicyRequest) Create constraint policy Constraint types: `max_usage` (absolute cap per grant), `valid_from`/`valid_until` (temporal gate), `rate_limit` (per-grant throttle over a fixed one-minute window, approximate: a burst across a minute boundary can briefly reach twice the rate — 0 = emergency freeze, null = unlimited), `revoke_on_use` (single use: the grant is consumed by its first admitted invocation, whether or not the operation succeeds, and cannot be used again; it authorizes one operation, not one message).voiddeleteConstraintPolicy(UUID tenantId, UUID policyId) Soft-delete constraint policy Refused while an active Capability Grant or Cryptographic Exchange still references the policy: the 409 names how many of each; revoke them first, then delete the policy.okhttp3.CalldeleteConstraintPolicyAsync(UUID tenantId, UUID policyId, ApiCallback<Void> _callback) Soft-delete constraint policy (asynchronously) Refused while an active Capability Grant or Cryptographic Exchange still references the policy: the 409 names how many of each; revoke them first, then delete the policy.okhttp3.CalldeleteConstraintPolicyCall(UUID tenantId, UUID policyId, ApiCallback _callback) Build call for deleteConstraintPolicydeleteConstraintPolicyWithHttpInfo(UUID tenantId, UUID policyId) Soft-delete constraint policy Refused while an active Capability Grant or Cryptographic Exchange still references the policy: the 409 names how many of each; revoke them first, then delete the policy.getConstraintPolicy(UUID tenantId, UUID policyId) Get constraint policyokhttp3.CallgetConstraintPolicyAsync(UUID tenantId, UUID policyId, ApiCallback<ConstraintPolicyResponse> _callback) Get constraint policy (asynchronously)okhttp3.CallgetConstraintPolicyCall(UUID tenantId, UUID policyId, ApiCallback _callback) Build call for getConstraintPolicygetConstraintPolicyWithHttpInfo(UUID tenantId, UUID policyId) Get constraint policyintList constraint policies in tenantokhttp3.CalllistConstraintPoliciesAsync(UUID tenantId, Integer page, Integer size, List<String> sort, ApiCallback<PageConstraintPolicyResponse> _callback) List constraint policies in tenant (asynchronously)okhttp3.CalllistConstraintPoliciesCall(UUID tenantId, Integer page, Integer size, List<String> sort, ApiCallback _callback) Build call for listConstraintPoliciesList constraint policies in tenantvoidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex) updateConstraintPolicy(UUID tenantId, UUID policyId, CreateConstraintPolicyRequest createConstraintPolicyRequest) Update constraint policy (PATCH semantics — full replace of editable fields) The edit writes the policy's next immutable version; the response carries its number in `version`.okhttp3.CallupdateConstraintPolicyAsync(UUID tenantId, UUID policyId, CreateConstraintPolicyRequest createConstraintPolicyRequest, ApiCallback<ConstraintPolicyResponse> _callback) Update constraint policy (PATCH semantics — full replace of editable fields) (asynchronously) The edit writes the policy's next immutable version; the response carries its number in `version`.okhttp3.CallupdateConstraintPolicyCall(UUID tenantId, UUID policyId, CreateConstraintPolicyRequest createConstraintPolicyRequest, ApiCallback _callback) Build call for updateConstraintPolicyupdateConstraintPolicyWithHttpInfo(UUID tenantId, UUID policyId, CreateConstraintPolicyRequest createConstraintPolicyRequest) Update constraint policy (PATCH semantics — full replace of editable fields) The edit writes the policy's next immutable version; the response carries its number in `version`.
-
Constructor Details
-
ConstraintPoliciesApi
public ConstraintPoliciesApi() -
ConstraintPoliciesApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
createConstraintPolicyCall
public okhttp3.Call createConstraintPolicyCall(@Nonnull UUID tenantId, @Nonnull CreateConstraintPolicyRequest createConstraintPolicyRequest, ApiCallback _callback) throws ApiException Build call for createConstraintPolicy- Parameters:
tenantId- (required)createConstraintPolicyRequest- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
createConstraintPolicy
public ConstraintPolicyResponse createConstraintPolicy(@Nonnull UUID tenantId, @Nonnull CreateConstraintPolicyRequest createConstraintPolicyRequest) throws ApiException Create constraint policy Constraint types: `max_usage` (absolute cap per grant), `valid_from`/`valid_until` (temporal gate), `rate_limit` (per-grant throttle over a fixed one-minute window, approximate: a burst across a minute boundary can briefly reach twice the rate — 0 = emergency freeze, null = unlimited), `revoke_on_use` (single use: the grant is consumed by its first admitted invocation, whether or not the operation succeeds, and cannot be used again; it authorizes one operation, not one message). Core-api checks and charges the constraints of a grant in one atomic step: an invocation the grant admits is charged even if the cryptographic operation then fails, and an invocation refused by a constraint is charged nothing.- Parameters:
tenantId- (required)createConstraintPolicyRequest- (required)- Returns:
- ConstraintPolicyResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createConstraintPolicyWithHttpInfo
public ApiResponse<ConstraintPolicyResponse> createConstraintPolicyWithHttpInfo(@Nonnull UUID tenantId, @Nonnull CreateConstraintPolicyRequest createConstraintPolicyRequest) throws ApiException Create constraint policy Constraint types: `max_usage` (absolute cap per grant), `valid_from`/`valid_until` (temporal gate), `rate_limit` (per-grant throttle over a fixed one-minute window, approximate: a burst across a minute boundary can briefly reach twice the rate — 0 = emergency freeze, null = unlimited), `revoke_on_use` (single use: the grant is consumed by its first admitted invocation, whether or not the operation succeeds, and cannot be used again; it authorizes one operation, not one message). Core-api checks and charges the constraints of a grant in one atomic step: an invocation the grant admits is charged even if the cryptographic operation then fails, and an invocation refused by a constraint is charged nothing.- Parameters:
tenantId- (required)createConstraintPolicyRequest- (required)- Returns:
- ApiResponse<ConstraintPolicyResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createConstraintPolicyAsync
public okhttp3.Call createConstraintPolicyAsync(@Nonnull UUID tenantId, @Nonnull CreateConstraintPolicyRequest createConstraintPolicyRequest, ApiCallback<ConstraintPolicyResponse> _callback) throws ApiException Create constraint policy (asynchronously) Constraint types: `max_usage` (absolute cap per grant), `valid_from`/`valid_until` (temporal gate), `rate_limit` (per-grant throttle over a fixed one-minute window, approximate: a burst across a minute boundary can briefly reach twice the rate — 0 = emergency freeze, null = unlimited), `revoke_on_use` (single use: the grant is consumed by its first admitted invocation, whether or not the operation succeeds, and cannot be used again; it authorizes one operation, not one message). Core-api checks and charges the constraints of a grant in one atomic step: an invocation the grant admits is charged even if the cryptographic operation then fails, and an invocation refused by a constraint is charged nothing.- Parameters:
tenantId- (required)createConstraintPolicyRequest- (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
deleteConstraintPolicyCall
public okhttp3.Call deleteConstraintPolicyCall(@Nonnull UUID tenantId, @Nonnull UUID policyId, ApiCallback _callback) throws ApiException Build call for deleteConstraintPolicy- Parameters:
tenantId- (required)policyId- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
deleteConstraintPolicy
public void deleteConstraintPolicy(@Nonnull UUID tenantId, @Nonnull UUID policyId) throws ApiException Soft-delete constraint policy Refused while an active Capability Grant or Cryptographic Exchange still references the policy: the 409 names how many of each; revoke them first, then delete the policy. An active grant or exchange therefore never references a deleted policy.- Parameters:
tenantId- (required)policyId- (required)- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteConstraintPolicyWithHttpInfo
public ApiResponse<Void> deleteConstraintPolicyWithHttpInfo(@Nonnull UUID tenantId, @Nonnull UUID policyId) throws ApiException Soft-delete constraint policy Refused while an active Capability Grant or Cryptographic Exchange still references the policy: the 409 names how many of each; revoke them first, then delete the policy. An active grant or exchange therefore never references a deleted policy.- Parameters:
tenantId- (required)policyId- (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteConstraintPolicyAsync
public okhttp3.Call deleteConstraintPolicyAsync(@Nonnull UUID tenantId, @Nonnull UUID policyId, ApiCallback<Void> _callback) throws ApiException Soft-delete constraint policy (asynchronously) Refused while an active Capability Grant or Cryptographic Exchange still references the policy: the 409 names how many of each; revoke them first, then delete the policy. An active grant or exchange therefore never references a deleted policy.- Parameters:
tenantId- (required)policyId- (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
getConstraintPolicyCall
public okhttp3.Call getConstraintPolicyCall(@Nonnull UUID tenantId, @Nonnull UUID policyId, ApiCallback _callback) throws ApiException Build call for getConstraintPolicy- Parameters:
tenantId- (required)policyId- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
getConstraintPolicy
public ConstraintPolicyResponse getConstraintPolicy(@Nonnull UUID tenantId, @Nonnull UUID policyId) throws ApiException Get constraint policy- Parameters:
tenantId- (required)policyId- (required)- Returns:
- ConstraintPolicyResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getConstraintPolicyWithHttpInfo
public ApiResponse<ConstraintPolicyResponse> getConstraintPolicyWithHttpInfo(@Nonnull UUID tenantId, @Nonnull UUID policyId) throws ApiException Get constraint policy- Parameters:
tenantId- (required)policyId- (required)- Returns:
- ApiResponse<ConstraintPolicyResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getConstraintPolicyAsync
public okhttp3.Call getConstraintPolicyAsync(@Nonnull UUID tenantId, @Nonnull UUID policyId, ApiCallback<ConstraintPolicyResponse> _callback) throws ApiException Get constraint policy (asynchronously)- Parameters:
tenantId- (required)policyId- (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
listConstraintPoliciesCall
public okhttp3.Call listConstraintPoliciesCall(@Nonnull UUID tenantId, @Nullable Integer page, @Nullable Integer size, @Nullable List<String> sort, ApiCallback _callback) throws ApiException Build call for listConstraintPolicies- Parameters:
tenantId- (required)page- Zero-based page index (0..N) (optional, default to 0)size- The size of the page to be returned (optional, default to 25)sort- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
listConstraintPolicies
public PageConstraintPolicyResponse listConstraintPolicies(@Nonnull UUID tenantId, @Nullable Integer page, @Nullable Integer size, @Nullable List<String> sort) throws ApiException List constraint policies in tenant- Parameters:
tenantId- (required)page- Zero-based page index (0..N) (optional, default to 0)size- The size of the page to be returned (optional, default to 25)sort- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional)- Returns:
- PageConstraintPolicyResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listConstraintPoliciesWithHttpInfo
public ApiResponse<PageConstraintPolicyResponse> listConstraintPoliciesWithHttpInfo(@Nonnull UUID tenantId, @Nullable Integer page, @Nullable Integer size, @Nullable List<String> sort) throws ApiException List constraint policies in tenant- Parameters:
tenantId- (required)page- Zero-based page index (0..N) (optional, default to 0)size- The size of the page to be returned (optional, default to 25)sort- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional)- Returns:
- ApiResponse<PageConstraintPolicyResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listConstraintPoliciesAsync
public okhttp3.Call listConstraintPoliciesAsync(@Nonnull UUID tenantId, @Nullable Integer page, @Nullable Integer size, @Nullable List<String> sort, ApiCallback<PageConstraintPolicyResponse> _callback) throws ApiException List constraint policies in tenant (asynchronously)- Parameters:
tenantId- (required)page- Zero-based page index (0..N) (optional, default to 0)size- The size of the page to be returned (optional, default to 25)sort- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
updateConstraintPolicyCall
public okhttp3.Call updateConstraintPolicyCall(@Nonnull UUID tenantId, @Nonnull UUID policyId, @Nonnull CreateConstraintPolicyRequest createConstraintPolicyRequest, ApiCallback _callback) throws ApiException Build call for updateConstraintPolicy- Parameters:
tenantId- (required)policyId- (required)createConstraintPolicyRequest- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
updateConstraintPolicy
public ConstraintPolicyResponse updateConstraintPolicy(@Nonnull UUID tenantId, @Nonnull UUID policyId, @Nonnull CreateConstraintPolicyRequest createConstraintPolicyRequest) throws ApiException Update constraint policy (PATCH semantics — full replace of editable fields) The edit writes the policy's next immutable version; the response carries its number in `version`. A Capability Grant enforces the version that was current when it was issued, so the edit applies only to grants issued afterwards: an active grant keeps the limits it was issued under, and a consumed single-use grant stays consumed. To change an active grant's limits, issue a new grant (clone and activate its Exchange, or revoke and re-create a standalone grant).- Parameters:
tenantId- (required)policyId- (required)createConstraintPolicyRequest- (required)- Returns:
- ConstraintPolicyResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateConstraintPolicyWithHttpInfo
public ApiResponse<ConstraintPolicyResponse> updateConstraintPolicyWithHttpInfo(@Nonnull UUID tenantId, @Nonnull UUID policyId, @Nonnull CreateConstraintPolicyRequest createConstraintPolicyRequest) throws ApiException Update constraint policy (PATCH semantics — full replace of editable fields) The edit writes the policy's next immutable version; the response carries its number in `version`. A Capability Grant enforces the version that was current when it was issued, so the edit applies only to grants issued afterwards: an active grant keeps the limits it was issued under, and a consumed single-use grant stays consumed. To change an active grant's limits, issue a new grant (clone and activate its Exchange, or revoke and re-create a standalone grant).- Parameters:
tenantId- (required)policyId- (required)createConstraintPolicyRequest- (required)- Returns:
- ApiResponse<ConstraintPolicyResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateConstraintPolicyAsync
public okhttp3.Call updateConstraintPolicyAsync(@Nonnull UUID tenantId, @Nonnull UUID policyId, @Nonnull CreateConstraintPolicyRequest createConstraintPolicyRequest, ApiCallback<ConstraintPolicyResponse> _callback) throws ApiException Update constraint policy (PATCH semantics — full replace of editable fields) (asynchronously) The edit writes the policy's next immutable version; the response carries its number in `version`. A Capability Grant enforces the version that was current when it was issued, so the edit applies only to grants issued afterwards: an active grant keeps the limits it was issued under, and a consumed single-use grant stays consumed. To change an active grant's limits, issue a new grant (clone and activate its Exchange, or revoke and re-create a standalone grant).- Parameters:
tenantId- (required)policyId- (required)createConstraintPolicyRequest- (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-