addPolicyRuleWithHttpInfo method

Future<Response> addPolicyRuleWithHttpInfo(
  1. int policyId,
  2. PolicyRule policyRule
)

Add rule to policy

Add a new rule to an existing policy.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> addPolicyRuleWithHttpInfo(int policyId, PolicyRule policyRule,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/policies/{policy_id}/rules'
    .replaceAll('{policy_id}', policyId.toString());

  // ignore: prefer_final_locals
  Object? postBody = policyRule;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}