replaceRoleSetWithHttpInfo method

Future<Response> replaceRoleSetWithHttpInfo(
  1. String roleSetKeyOrId,
  2. ReplaceRoleSetRequest replaceRoleSetRequest
)

Replace a role set

Replaces a role set with another role set. This is functionally equivalent to deleting the role set but allows for atomic replacement with migration support. Organizations using this role set will be migrated to the destination role set.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<http.Response> replaceRoleSetWithHttpInfo(
  String roleSetKeyOrId,
  ReplaceRoleSetRequest replaceRoleSetRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/role_sets/{role_set_key_or_id}/replace'
      .replaceAll('{role_set_key_or_id}', roleSetKeyOrId);

  // ignore: prefer_final_locals
  Object? postBody = replaceRoleSetRequest;

  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,
  );
}