createMachineScopeWithHttpInfo method

Future<Response> createMachineScopeWithHttpInfo(
  1. String machineId, {
  2. CreateMachineScopeRequest? createMachineScopeRequest,
})

Create a machine scope

Creates a new machine scope, allowing the specified machine to access another machine. Maximum of 150 scopes per machine.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<http.Response> createMachineScopeWithHttpInfo(
  String machineId, {
  CreateMachineScopeRequest? createMachineScopeRequest,
}) async {
  // ignore: prefer_const_declarations
  final path =
      r'/machines/{machine_id}/scopes'.replaceAll('{machine_id}', machineId);

  // ignore: prefer_final_locals
  Object? postBody = createMachineScopeRequest;

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