attachPolicyEntitlementsWithHttpInfo method
Future<Response>
attachPolicyEntitlementsWithHttpInfo(
- String account,
- String policy,
- AttachPolicyEntitlementsRequest attachPolicyEntitlementsRequest
Attach policy entitlements
Attach entitlements to a policy. This will immediately be taken into effect for all future license validations. Any license that implements the given policy will automatically possess all the policy's entitlements. Below are the limitations to attaching an entitlement: - You cannot attach an already attached entitlement.
Note: This method returns the HTTP Response
.
Parameters:
-
String account (required): The identifier (UUID) or slug of your Keygen account.
-
String policy (required): The identifier (UUID) of the policy to be updated.
-
AttachPolicyEntitlementsRequest attachPolicyEntitlementsRequest (required):
Implementation
Future<Response> attachPolicyEntitlementsWithHttpInfo(String account, String policy, AttachPolicyEntitlementsRequest attachPolicyEntitlementsRequest,) async {
// ignore: prefer_const_declarations
final path = r'/accounts/{account}/policies/{policy}/entitlements'
.replaceAll('{account}', account)
.replaceAll('{policy}', policy);
// ignore: prefer_final_locals
Object? postBody = attachPolicyEntitlementsRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/vnd.api+json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}