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)
    • compareConstraintPolicyVersionsCall

      public okhttp3.Call compareConstraintPolicyVersionsCall(@Nonnull UUID tenantId, @Nonnull UUID baseVersionId, @Nonnull UUID targetVersionId, ApiCallback _callback) throws ApiException
      Build call for compareConstraintPolicyVersions
      Parameters:
      tenantId - (required)
      baseVersionId - The id of the version compared from. (required)
      targetVersionId - The id of the version compared to. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • compareConstraintPolicyVersions

      public ConstraintPolicyVersionComparison compareConstraintPolicyVersions(@Nonnull UUID tenantId, @Nonnull UUID baseVersionId, @Nonnull UUID targetVersionId) throws ApiException
      Compare two versions of a constraint policy The fields whose value differs between two versions of one policy, each with its value in the base and in the target version. The versions are named by their ids, as <code>listConstraintPolicyVersions</code> returns them; two versions of different policies are refused with 400. Comparing a version with itself returns no change. **Authorization**: requires scope <code>admin.tenant.constraint-policy.read</code>.
      Parameters:
      tenantId - (required)
      baseVersionId - The id of the version compared from. (required)
      targetVersionId - The id of the version compared to. (required)
      Returns:
      ConstraintPolicyVersionComparison
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • compareConstraintPolicyVersionsWithHttpInfo

      public ApiResponse<ConstraintPolicyVersionComparison> compareConstraintPolicyVersionsWithHttpInfo(@Nonnull UUID tenantId, @Nonnull UUID baseVersionId, @Nonnull UUID targetVersionId) throws ApiException
      Compare two versions of a constraint policy The fields whose value differs between two versions of one policy, each with its value in the base and in the target version. The versions are named by their ids, as <code>listConstraintPolicyVersions</code> returns them; two versions of different policies are refused with 400. Comparing a version with itself returns no change. **Authorization**: requires scope <code>admin.tenant.constraint-policy.read</code>.
      Parameters:
      tenantId - (required)
      baseVersionId - The id of the version compared from. (required)
      targetVersionId - The id of the version compared to. (required)
      Returns:
      ApiResponse<ConstraintPolicyVersionComparison>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • compareConstraintPolicyVersionsAsync

      public okhttp3.Call compareConstraintPolicyVersionsAsync(@Nonnull UUID tenantId, @Nonnull UUID baseVersionId, @Nonnull UUID targetVersionId, ApiCallback<ConstraintPolicyVersionComparison> _callback) throws ApiException
      Compare two versions of a constraint policy (asynchronously) The fields whose value differs between two versions of one policy, each with its value in the base and in the target version. The versions are named by their ids, as <code>listConstraintPolicyVersions</code> returns them; two versions of different policies are refused with 400. Comparing a version with itself returns no change. **Authorization**: requires scope <code>admin.tenant.constraint-policy.read</code>.
      Parameters:
      tenantId - (required)
      baseVersionId - The id of the version compared from. (required)
      targetVersionId - The id of the version compared to. (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
    • 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. `scheduleWeekdays` with `scheduleStart` and `scheduleEnd` restricts use to a daily window (start inclusive, end exclusive; an end before the start crosses midnight and belongs to the weekday it starts on) on the listed ISO weekdays, evaluated in the platform time zone (setting authorization.schedule.timezone). The schedule is part of the version the write creates.
      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. `scheduleWeekdays` with `scheduleStart` and `scheduleEnd` restricts use to a daily window (start inclusive, end exclusive; an end before the start crosses midnight and belongs to the weekday it starts on) on the listed ISO weekdays, evaluated in the platform time zone (setting authorization.schedule.timezone). The schedule is part of the version the write creates.
      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. `scheduleWeekdays` with `scheduleStart` and `scheduleEnd` restricts use to a daily window (start inclusive, end exclusive; an end before the start crosses midnight and belongs to the weekday it starts on) on the listed ISO weekdays, evaluated in the platform time zone (setting authorization.schedule.timezone). The schedule is part of the version the write creates.
      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
    • getConstraintPolicyVersionCall

      public okhttp3.Call getConstraintPolicyVersionCall(@Nonnull UUID tenantId, @Nonnull UUID policyId, @Nonnull Integer version, ApiCallback _callback) throws ApiException
      Build call for getConstraintPolicyVersion
      Parameters:
      tenantId - (required)
      policyId - (required)
      version - The version number, starting at 1. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getConstraintPolicyVersion

      public ConstraintPolicyVersionResponse getConstraintPolicyVersion(@Nonnull UUID tenantId, @Nonnull UUID policyId, @Nonnull Integer version) throws ApiException
      Get one version of a constraint policy One version of the policy, by its number: the limits and schedule a grant pinned to it enforces, who wrote it and when, and how many live Capability Grants are pinned to it now. **Authorization**: requires scope <code>admin.tenant.constraint-policy.read</code>.
      Parameters:
      tenantId - (required)
      policyId - (required)
      version - The version number, starting at 1. (required)
      Returns:
      ConstraintPolicyVersionResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getConstraintPolicyVersionWithHttpInfo

      public ApiResponse<ConstraintPolicyVersionResponse> getConstraintPolicyVersionWithHttpInfo(@Nonnull UUID tenantId, @Nonnull UUID policyId, @Nonnull Integer version) throws ApiException
      Get one version of a constraint policy One version of the policy, by its number: the limits and schedule a grant pinned to it enforces, who wrote it and when, and how many live Capability Grants are pinned to it now. **Authorization**: requires scope <code>admin.tenant.constraint-policy.read</code>.
      Parameters:
      tenantId - (required)
      policyId - (required)
      version - The version number, starting at 1. (required)
      Returns:
      ApiResponse<ConstraintPolicyVersionResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getConstraintPolicyVersionAsync

      public okhttp3.Call getConstraintPolicyVersionAsync(@Nonnull UUID tenantId, @Nonnull UUID policyId, @Nonnull Integer version, ApiCallback<ConstraintPolicyVersionResponse> _callback) throws ApiException
      Get one version of a constraint policy (asynchronously) One version of the policy, by its number: the limits and schedule a grant pinned to it enforces, who wrote it and when, and how many live Capability Grants are pinned to it now. **Authorization**: requires scope <code>admin.tenant.constraint-policy.read</code>.
      Parameters:
      tenantId - (required)
      policyId - (required)
      version - The version number, starting at 1. (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
    • listConstraintPolicyVersionsCall

      public okhttp3.Call listConstraintPolicyVersionsCall(@Nonnull UUID tenantId, @Nonnull UUID policyId, ApiCallback _callback) throws ApiException
      Build call for listConstraintPolicyVersions
      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
    • listConstraintPolicyVersions

      public List<ConstraintPolicyVersionResponse> listConstraintPolicyVersions(@Nonnull UUID tenantId, @Nonnull UUID policyId) throws ApiException
      List the versions of a constraint policy Every version of the policy, oldest first. Creating a policy writes version 1 and every edit writes the next version; a version never changes. Each version carries its limits, its weekday and time-of-day schedule (or none), when and by whom it was written, and <code>liveGrantCount</code>: how many live Capability Grants are pinned to it now. **Authorization**: requires scope <code>admin.tenant.constraint-policy.read</code>.
      Parameters:
      tenantId - (required)
      policyId - (required)
      Returns:
      List<ConstraintPolicyVersionResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listConstraintPolicyVersionsWithHttpInfo

      public ApiResponse<List<ConstraintPolicyVersionResponse>> listConstraintPolicyVersionsWithHttpInfo(@Nonnull UUID tenantId, @Nonnull UUID policyId) throws ApiException
      List the versions of a constraint policy Every version of the policy, oldest first. Creating a policy writes version 1 and every edit writes the next version; a version never changes. Each version carries its limits, its weekday and time-of-day schedule (or none), when and by whom it was written, and <code>liveGrantCount</code>: how many live Capability Grants are pinned to it now. **Authorization**: requires scope <code>admin.tenant.constraint-policy.read</code>.
      Parameters:
      tenantId - (required)
      policyId - (required)
      Returns:
      ApiResponse<List<ConstraintPolicyVersionResponse>>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listConstraintPolicyVersionsAsync

      public okhttp3.Call listConstraintPolicyVersionsAsync(@Nonnull UUID tenantId, @Nonnull UUID policyId, ApiCallback<List<ConstraintPolicyVersionResponse>> _callback) throws ApiException
      List the versions of a constraint policy (asynchronously) Every version of the policy, oldest first. Creating a policy writes version 1 and every edit writes the next version; a version never changes. Each version carries its limits, its weekday and time-of-day schedule (or none), when and by whom it was written, and <code>liveGrantCount</code>: how many live Capability Grants are pinned to it now. **Authorization**: requires scope <code>admin.tenant.constraint-policy.read</code>.
      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
    • 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. The schedule fields are replaced like the limits: omitting all three writes a version with no schedule. To move an active grant to the new version, re-pin it (`replaceCapabilityGrantPolicyVersion`; refused for a consumed or revoked grant and for one an Internal Crypto Use Case or the marketplace plan owns). Issuing a new grant (clone and activate its Exchange, or revoke and re-create a standalone grant) also applies the new limits.
      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. The schedule fields are replaced like the limits: omitting all three writes a version with no schedule. To move an active grant to the new version, re-pin it (`replaceCapabilityGrantPolicyVersion`; refused for a consumed or revoked grant and for one an Internal Crypto Use Case or the marketplace plan owns). Issuing a new grant (clone and activate its Exchange, or revoke and re-create a standalone grant) also applies the new limits.
      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. The schedule fields are replaced like the limits: omitting all three writes a version with no schedule. To move an active grant to the new version, re-pin it (`replaceCapabilityGrantPolicyVersion`; refused for a consumed or revoked grant and for one an Internal Crypto Use Case or the marketplace plan owns). Issuing a new grant (clone and activate its Exchange, or revoke and re-create a standalone grant) also applies the new limits.
      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