Class ConstraintPoliciesApi

java.lang.Object
co.ankatech.keymanagement.client.keymanagement.api.ConstraintPoliciesApi

public class ConstraintPoliciesApi extends Object
  • Constructor Details

    • ConstraintPoliciesApi

      public ConstraintPoliciesApi()
    • ConstraintPoliciesApi

      public ConstraintPoliciesApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • 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