Class ConstraintPoliciesApi
java.lang.Object
co.ankatech.keymanagement.client.keymanagement.api.ConstraintPoliciesApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompareConstraintPolicyVersions(UUID tenantId, UUID baseVersionId, UUID targetVersionId) 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.okhttp3.CallcompareConstraintPolicyVersionsAsync(UUID tenantId, UUID baseVersionId, UUID targetVersionId, ApiCallback<ConstraintPolicyVersionComparison> _callback) 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.okhttp3.CallcompareConstraintPolicyVersionsCall(UUID tenantId, UUID baseVersionId, UUID targetVersionId, ApiCallback _callback) Build call for compareConstraintPolicyVersionscompareConstraintPolicyVersionsWithHttpInfo(UUID tenantId, UUID baseVersionId, UUID targetVersionId) 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.createConstraintPolicy(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 getConstraintPolicygetConstraintPolicyVersion(UUID tenantId, UUID policyId, Integer version) 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.okhttp3.CallgetConstraintPolicyVersionAsync(UUID tenantId, UUID policyId, Integer version, ApiCallback<ConstraintPolicyVersionResponse> _callback) 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.okhttp3.CallgetConstraintPolicyVersionCall(UUID tenantId, UUID policyId, Integer version, ApiCallback _callback) Build call for getConstraintPolicyVersiongetConstraintPolicyVersionWithHttpInfo(UUID tenantId, UUID policyId, Integer version) 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.getConstraintPolicyWithHttpInfo(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 tenantlistConstraintPolicyVersions(UUID tenantId, UUID policyId) List the versions of a constraint policy Every version of the policy, oldest first.okhttp3.CalllistConstraintPolicyVersionsAsync(UUID tenantId, UUID policyId, ApiCallback<List<ConstraintPolicyVersionResponse>> _callback) List the versions of a constraint policy (asynchronously) Every version of the policy, oldest first.okhttp3.CalllistConstraintPolicyVersionsCall(UUID tenantId, UUID policyId, ApiCallback _callback) Build call for listConstraintPolicyVersionslistConstraintPolicyVersionsWithHttpInfo(UUID tenantId, UUID policyId) List the versions of a constraint policy Every version of the policy, oldest first.voidsetApiClient(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
-
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
-