createPolicyWithHttpInfo method
Future<Response>
createPolicyWithHttpInfo(
- String account,
- CreatePolicyRequest createPolicyRequest
Create a policy
Creates a new policy resource.
Note: This method returns the HTTP Response
.
Parameters:
-
String account (required): The identifier (UUID) or slug of your Keygen account.
-
CreatePolicyRequest createPolicyRequest (required):
Implementation
Future<Response> createPolicyWithHttpInfo(String account, CreatePolicyRequest createPolicyRequest,) async {
// ignore: prefer_const_declarations
final path = r'/accounts/{account}/policies'
.replaceAll('{account}', account);
// ignore: prefer_final_locals
Object? postBody = createPolicyRequest;
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,
);
}