/*
* InfluxDB OSS API Service
*
* The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
*
* OpenAPI spec version: 2.0.0
*
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading;
using RestSharp;
using InfluxDB.Client.Api.Client;
using InfluxDB.Client.Api.Domain;
namespace InfluxDB.Client.Api.Service
{
///
/// Represents a collection of functions to interact with the API endpoints
///
public interface ITemplatesService : IApiAccessor
{
#region Synchronous Operations
///
/// Apply or dry-run a template
///
///
/// Applies or performs a dry-run of template in an organization.
///
/// Thrown when fails to make API call
///
/// TemplateSummary
TemplateSummary ApplyTemplate(TemplateApply templateApply);
///
/// Apply or dry-run a template
///
///
/// Applies or performs a dry-run of template in an organization.
///
/// Thrown when fails to make API call
///
/// ApiResponse of TemplateSummary
ApiResponse ApplyTemplateWithHttpInfo(TemplateApply templateApply);
///
/// Create a new stack
///
///
///
///
/// Thrown when fails to make API call
/// (optional)
/// Stack
Stack CreateStack(PostStackRequest postStackRequest = null);
///
/// Create a new stack
///
///
///
///
/// Thrown when fails to make API call
/// (optional)
/// ApiResponse of Stack
ApiResponse CreateStackWithHttpInfo(PostStackRequest postStackRequest = null);
///
/// Delete a stack and associated resources
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// The identifier of the organization.
///
void DeleteStack(string stackId, string orgID);
///
/// Delete a stack and associated resources
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// The identifier of the organization.
/// ApiResponse of Object(void)
ApiResponse DeleteStackWithHttpInfo(string stackId, string orgID);
///
/// Export a new template
///
///
///
///
/// Thrown when fails to make API call
/// Export resources as an InfluxDB template. (optional)
/// List<Object>
List ExportTemplate(TemplateExportByID templateExportByID = null);
///
/// Export a new template
///
///
///
///
/// Thrown when fails to make API call
/// Export resources as an InfluxDB template. (optional)
/// ApiResponse of List<Object>
ApiResponse> ExportTemplateWithHttpInfo(TemplateExportByID templateExportByID = null);
///
/// List installed templates
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID of the stacks
/// A collection of names to filter the list by. (optional)
/// A collection of stackIDs to filter the list by. (optional)
/// ListStacksResponse
ListStacksResponse ListStacks(string orgID, string name = null, string stackID = null);
///
/// List installed templates
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID of the stacks
/// A collection of names to filter the list by. (optional)
/// A collection of stackIDs to filter the list by. (optional)
/// ApiResponse of ListStacksResponse
ApiResponse ListStacksWithHttpInfo(string orgID, string name = null, string stackID = null);
///
/// Retrieve a stack
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Stack
Stack ReadStack(string stackId);
///
/// Retrieve a stack
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// ApiResponse of Stack
ApiResponse ReadStackWithHttpInfo(string stackId);
///
/// Uninstall a stack
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Stack
Stack UninstallStack(string stackId);
///
/// Uninstall a stack
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// ApiResponse of Stack
ApiResponse UninstallStackWithHttpInfo(string stackId);
///
/// Update a stack
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// (optional)
/// Stack
Stack UpdateStack(string stackId, PatchStackRequest patchStackRequest = null);
///
/// Update a stack
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// (optional)
/// ApiResponse of Stack
ApiResponse UpdateStackWithHttpInfo(string stackId, PatchStackRequest patchStackRequest = null);
#endregion Synchronous Operations
#region Asynchronous Operations
///
/// Apply or dry-run a template
///
///
/// Applies or performs a dry-run of template in an organization.
///
/// Thrown when fails to make API call
///
/// Cancellation token
/// Task of TemplateSummary
System.Threading.Tasks.Task ApplyTemplateAsync(TemplateApply templateApply,
CancellationToken cancellationToken = default);
///
/// Apply or dry-run a template
///
///
/// Applies or performs a dry-run of template in an organization.
///
/// Thrown when fails to make API call
///
/// Cancellation token
/// Task of ApiResponse (TemplateSummary)
System.Threading.Tasks.Task> ApplyTemplateAsyncWithHttpInfo(
TemplateApply templateApply, CancellationToken cancellationToken = default);
///
/// Create a new stack
///
///
///
///
/// Thrown when fails to make API call
/// (optional)
/// Cancellation token
/// Task of Stack
System.Threading.Tasks.Task CreateStackAsync(PostStackRequest postStackRequest = null,
CancellationToken cancellationToken = default);
///
/// Create a new stack
///
///
///
///
/// Thrown when fails to make API call
/// (optional)
/// Cancellation token
/// Task of ApiResponse (Stack)
System.Threading.Tasks.Task> CreateStackAsyncWithHttpInfo(
PostStackRequest postStackRequest = null, CancellationToken cancellationToken = default);
///
/// Delete a stack and associated resources
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// The identifier of the organization.
/// Cancellation token
/// Task of void
System.Threading.Tasks.Task DeleteStackAsync(string stackId, string orgID,
CancellationToken cancellationToken = default);
///
/// Delete a stack and associated resources
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// The identifier of the organization.
/// Cancellation token
/// Task of ApiResponse
System.Threading.Tasks.Task> DeleteStackAsyncWithHttpInfo(string stackId, string orgID,
CancellationToken cancellationToken = default);
///
/// Export a new template
///
///
///
///
/// Thrown when fails to make API call
/// Export resources as an InfluxDB template. (optional)
/// Cancellation token
/// Task of List<Object>
System.Threading.Tasks.Task> ExportTemplateAsync(TemplateExportByID templateExportByID = null,
CancellationToken cancellationToken = default);
///
/// Export a new template
///
///
///
///
/// Thrown when fails to make API call
/// Export resources as an InfluxDB template. (optional)
/// Cancellation token
/// Task of ApiResponse (List<Object>)
System.Threading.Tasks.Task>> ExportTemplateAsyncWithHttpInfo(
TemplateExportByID templateExportByID = null, CancellationToken cancellationToken = default);
///
/// List installed templates
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID of the stacks
/// A collection of names to filter the list by. (optional)
/// A collection of stackIDs to filter the list by. (optional)
/// Cancellation token
/// Task of ListStacksResponse
System.Threading.Tasks.Task ListStacksAsync(string orgID, string name = null,
string stackID = null, CancellationToken cancellationToken = default);
///
/// List installed templates
///
///
///
///
/// Thrown when fails to make API call
/// The organization ID of the stacks
/// A collection of names to filter the list by. (optional)
/// A collection of stackIDs to filter the list by. (optional)
/// Cancellation token
/// Task of ApiResponse (ListStacksResponse)
System.Threading.Tasks.Task> ListStacksAsyncWithHttpInfo(string orgID,
string name = null, string stackID = null, CancellationToken cancellationToken = default);
///
/// Retrieve a stack
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Cancellation token
/// Task of Stack
System.Threading.Tasks.Task
ReadStackAsync(string stackId, CancellationToken cancellationToken = default);
///
/// Retrieve a stack
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Cancellation token
/// Task of ApiResponse (Stack)
System.Threading.Tasks.Task> ReadStackAsyncWithHttpInfo(string stackId,
CancellationToken cancellationToken = default);
///
/// Uninstall a stack
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Cancellation token
/// Task of Stack
System.Threading.Tasks.Task UninstallStackAsync(string stackId,
CancellationToken cancellationToken = default);
///
/// Uninstall a stack
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Cancellation token
/// Task of ApiResponse (Stack)
System.Threading.Tasks.Task> UninstallStackAsyncWithHttpInfo(string stackId,
CancellationToken cancellationToken = default);
///
/// Update a stack
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// (optional)
/// Cancellation token
/// Task of Stack
System.Threading.Tasks.Task UpdateStackAsync(string stackId, PatchStackRequest patchStackRequest = null,
CancellationToken cancellationToken = default);
///
/// Update a stack
///
///
///
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// (optional)
/// Cancellation token
/// Task of ApiResponse (Stack)
System.Threading.Tasks.Task> UpdateStackAsyncWithHttpInfo(string stackId,
PatchStackRequest patchStackRequest = null, CancellationToken cancellationToken = default);
#endregion Asynchronous Operations
}
///
/// Represents a collection of functions to interact with the API endpoints
///
public partial class TemplatesService : ITemplatesService
{
private ExceptionFactory _exceptionFactory = (name, response) => null;
///
/// Initializes a new instance of the class.
///
///
public TemplatesService(string basePath)
{
Configuration = new Configuration { BasePath = basePath };
ExceptionFactory = Configuration.DefaultExceptionFactory;
}
///
/// Initializes a new instance of the class
/// using Configuration object
///
/// An instance of Configuration
///
public TemplatesService(Configuration configuration = null)
{
if (configuration == null) // use the default one in Configuration
{
Configuration = Configuration.Default;
}
else
{
Configuration = configuration;
}
ExceptionFactory = Configuration.DefaultExceptionFactory;
}
///
/// Gets the base path of the API client.
///
/// The base path
public string GetBasePath()
{
return Configuration.ApiClient.RestClientOptions.BaseUrl.ToString();
}
///
/// Sets the base path of the API client.
///
/// The base path
[Obsolete(
"SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
public void SetBasePath(string basePath)
{
// do nothing
}
///
/// Gets or sets the configuration object
///
/// An instance of the Configuration
public Configuration Configuration { get; set; }
///
/// Provides a factory method hook for the creation of exceptions.
///
public ExceptionFactory ExceptionFactory
{
get
{
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
{
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
}
return _exceptionFactory;
}
set => _exceptionFactory = value;
}
///
/// Gets the default header.
///
/// Dictionary of HTTP header
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
public IDictionary DefaultHeader()
{
return new ReadOnlyDictionary(Configuration.DefaultHeader);
}
///
/// Add default header.
///
/// Header field name.
/// Header field value.
///
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
public void AddDefaultHeader(string key, string value)
{
Configuration.AddDefaultHeader(key, value);
}
///
/// Apply or dry-run a template Applies or performs a dry-run of template in an organization.
///
/// Thrown when fails to make API call
///
/// TemplateSummary
public TemplateSummary ApplyTemplate(TemplateApply templateApply)
{
var localVarResponse = ApplyTemplateWithHttpInfo(templateApply);
return localVarResponse.Data;
}
///
/// Apply or dry-run a template Applies or performs a dry-run of template in an organization.
///
/// Thrown when fails to make API call
///
/// ApiResponse of TemplateSummary
public ApiResponse ApplyTemplateWithHttpInfo(TemplateApply templateApply)
{
// verify the required parameter 'templateApply' is set
if (templateApply == null)
{
throw new ApiException(400,
"Missing required parameter 'templateApply' when calling TemplatesService->ApplyTemplate");
}
var localVarPath = "/api/v2/templates/apply";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json",
"application/x-jsonnet",
"text/yml"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (templateApply != null && templateApply.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(templateApply); // http body (model) parameter
}
else
{
localVarPostBody = templateApply; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ApplyTemplate", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(TemplateSummary)Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateSummary)));
}
///
/// Apply or dry-run a template Applies or performs a dry-run of template in an organization.
///
/// Thrown when fails to make API call
///
/// Cancellation token
/// ApiResponse of TemplateSummary
public async System.Threading.Tasks.Task ApplyTemplateWithIRestResponseAsync(
TemplateApply templateApply, CancellationToken cancellationToken = default)
{
// verify the required parameter 'templateApply' is set
if (templateApply == null)
{
throw new ApiException(400,
"Missing required parameter 'templateApply' when calling TemplatesService->ApplyTemplate");
}
var localVarPath = "/api/v2/templates/apply";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json",
"application/x-jsonnet",
"text/yml"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (templateApply != null && templateApply.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(templateApply); // http body (model) parameter
}
else
{
localVarPostBody = templateApply; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ApplyTemplate", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Apply or dry-run a template Applies or performs a dry-run of template in an organization.
///
/// Thrown when fails to make API call
///
/// ApiResponse of TemplateSummary
public RestResponse ApplyTemplateWithIRestResponse(TemplateApply templateApply)
{
// verify the required parameter 'templateApply' is set
if (templateApply == null)
{
throw new ApiException(400,
"Missing required parameter 'templateApply' when calling TemplatesService->ApplyTemplate");
}
var localVarPath = "/api/v2/templates/apply";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json",
"application/x-jsonnet",
"text/yml"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (templateApply != null && templateApply.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(templateApply); // http body (model) parameter
}
else
{
localVarPostBody = templateApply; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ApplyTemplate", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Apply or dry-run a template Applies or performs a dry-run of template in an organization.
///
/// Thrown when fails to make API call
///
/// ApiResponse of TemplateSummary
public RestRequest ApplyTemplateWithRestRequest(TemplateApply templateApply)
{
// verify the required parameter 'templateApply' is set
if (templateApply == null)
{
throw new ApiException(400,
"Missing required parameter 'templateApply' when calling TemplatesService->ApplyTemplate");
}
var localVarPath = "/api/v2/templates/apply";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json",
"application/x-jsonnet",
"text/yml"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (templateApply != null && templateApply.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(templateApply); // http body (model) parameter
}
else
{
localVarPostBody = templateApply; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Apply or dry-run a template Applies or performs a dry-run of template in an organization.
///
/// Thrown when fails to make API call
///
/// Cancellation token
/// Task of TemplateSummary
public async System.Threading.Tasks.Task ApplyTemplateAsync(TemplateApply templateApply,
CancellationToken cancellationToken = default)
{
var localVarResponse =
await ApplyTemplateAsyncWithHttpInfo(templateApply, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Apply or dry-run a template Applies or performs a dry-run of template in an organization.
///
/// Thrown when fails to make API call
///
/// Cancellation token
/// Task of ApiResponse (TemplateSummary)
public async System.Threading.Tasks.Task> ApplyTemplateAsyncWithHttpInfo(
TemplateApply templateApply, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse = await ApplyTemplateAsyncWithIRestResponse(templateApply, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ApplyTemplate", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(TemplateSummary)Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateSummary)));
}
///
/// Apply or dry-run a template Applies or performs a dry-run of template in an organization.
///
/// Thrown when fails to make API call
///
/// Cancellation token
/// Task of RestResponse (TemplateSummary)
public async System.Threading.Tasks.Task ApplyTemplateAsyncWithIRestResponse(
TemplateApply templateApply, CancellationToken cancellationToken = default)
{
// verify the required parameter 'templateApply' is set
if (templateApply == null)
{
throw new ApiException(400,
"Missing required parameter 'templateApply' when calling TemplatesService->ApplyTemplate");
}
var localVarPath = "/api/v2/templates/apply";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json",
"application/x-jsonnet",
"text/yml"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (templateApply != null && templateApply.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(templateApply); // http body (model) parameter
}
else
{
localVarPostBody = templateApply; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ApplyTemplate", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Create a new stack
///
/// Thrown when fails to make API call
/// (optional)
/// Stack
public Stack CreateStack(PostStackRequest postStackRequest = null)
{
var localVarResponse = CreateStackWithHttpInfo(postStackRequest);
return localVarResponse.Data;
}
///
/// Create a new stack
///
/// Thrown when fails to make API call
/// (optional)
/// ApiResponse of Stack
public ApiResponse CreateStackWithHttpInfo(PostStackRequest postStackRequest = null)
{
var localVarPath = "/api/v2/stacks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (postStackRequest != null && postStackRequest.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(postStackRequest); // http body (model) parameter
}
else
{
localVarPostBody = postStackRequest; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("CreateStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Stack)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Stack)));
}
///
/// Create a new stack
///
/// Thrown when fails to make API call
/// (optional)
/// Cancellation token
/// ApiResponse of Stack
public async System.Threading.Tasks.Task CreateStackWithIRestResponseAsync(
PostStackRequest postStackRequest = null, CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/stacks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (postStackRequest != null && postStackRequest.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(postStackRequest); // http body (model) parameter
}
else
{
localVarPostBody = postStackRequest; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("CreateStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Create a new stack
///
/// Thrown when fails to make API call
/// (optional)
/// ApiResponse of Stack
public RestResponse CreateStackWithIRestResponse(PostStackRequest postStackRequest = null)
{
var localVarPath = "/api/v2/stacks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (postStackRequest != null && postStackRequest.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(postStackRequest); // http body (model) parameter
}
else
{
localVarPostBody = postStackRequest; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("CreateStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Create a new stack
///
/// Thrown when fails to make API call
/// (optional)
/// ApiResponse of Stack
public RestRequest CreateStackWithRestRequest(PostStackRequest postStackRequest = null)
{
var localVarPath = "/api/v2/stacks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (postStackRequest != null && postStackRequest.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(postStackRequest); // http body (model) parameter
}
else
{
localVarPostBody = postStackRequest; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Create a new stack
///
/// Thrown when fails to make API call
/// (optional)
/// Cancellation token
/// Task of Stack
public async System.Threading.Tasks.Task CreateStackAsync(PostStackRequest postStackRequest = null,
CancellationToken cancellationToken = default)
{
var localVarResponse = await CreateStackAsyncWithHttpInfo(postStackRequest, cancellationToken)
.ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Create a new stack
///
/// Thrown when fails to make API call
/// (optional)
/// Cancellation token
/// Task of ApiResponse (Stack)
public async System.Threading.Tasks.Task> CreateStackAsyncWithHttpInfo(
PostStackRequest postStackRequest = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse = await CreateStackAsyncWithIRestResponse(postStackRequest, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("CreateStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Stack)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Stack)));
}
///
/// Create a new stack
///
/// Thrown when fails to make API call
/// (optional)
/// Cancellation token
/// Task of RestResponse (Stack)
public async System.Threading.Tasks.Task CreateStackAsyncWithIRestResponse(
PostStackRequest postStackRequest = null, CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/stacks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (postStackRequest != null && postStackRequest.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(postStackRequest); // http body (model) parameter
}
else
{
localVarPostBody = postStackRequest; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("CreateStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a stack and associated resources
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// The identifier of the organization.
///
public void DeleteStack(string stackId, string orgID)
{
DeleteStackWithHttpInfo(stackId, orgID);
}
///
/// Delete a stack and associated resources
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// The identifier of the organization.
/// ApiResponse of Object(void)
public ApiResponse DeleteStackWithHttpInfo(string stackId, string orgID)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->DeleteStack");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling TemplatesService->DeleteStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete a stack and associated resources
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// The identifier of the organization.
/// Cancellation token
/// ApiResponse of Object(void)
public async System.Threading.Tasks.Task DeleteStackWithIRestResponseAsync(string stackId,
string orgID, CancellationToken cancellationToken = default)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->DeleteStack");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling TemplatesService->DeleteStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a stack and associated resources
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// The identifier of the organization.
/// ApiResponse of Object(void)
public RestResponse DeleteStackWithIRestResponse(string stackId, string orgID)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->DeleteStack");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling TemplatesService->DeleteStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Delete a stack and associated resources
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// The identifier of the organization.
/// ApiResponse of Object(void)
public RestRequest DeleteStackWithRestRequest(string stackId, string orgID)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->DeleteStack");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling TemplatesService->DeleteStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Delete a stack and associated resources
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// The identifier of the organization.
/// Cancellation token
/// Task of void
public System.Threading.Tasks.Task DeleteStackAsync(string stackId, string orgID,
CancellationToken cancellationToken = default)
{
return DeleteStackAsyncWithHttpInfo(stackId, orgID, cancellationToken);
}
///
/// Delete a stack and associated resources
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// The identifier of the organization.
/// Cancellation token
/// Task of ApiResponse
public async System.Threading.Tasks.Task> DeleteStackAsyncWithHttpInfo(string stackId,
string orgID, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse = await DeleteStackAsyncWithIRestResponse(stackId, orgID, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
null);
}
///
/// Delete a stack and associated resources
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// The identifier of the organization.
/// Cancellation token
/// Task of RestResponse
public async System.Threading.Tasks.Task DeleteStackAsyncWithIRestResponse(string stackId,
string orgID, CancellationToken cancellationToken = default)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->DeleteStack");
}
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling TemplatesService->DeleteStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Delete, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("DeleteStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Export a new template
///
/// Thrown when fails to make API call
/// Export resources as an InfluxDB template. (optional)
/// List<Object>
public List ExportTemplate(TemplateExportByID templateExportByID = null)
{
var localVarResponse = ExportTemplateWithHttpInfo(templateExportByID);
return localVarResponse.Data;
}
///
/// Export a new template
///
/// Thrown when fails to make API call
/// Export resources as an InfluxDB template. (optional)
/// ApiResponse of List<Object>
public ApiResponse> ExportTemplateWithHttpInfo(TemplateExportByID templateExportByID = null)
{
var localVarPath = "/api/v2/templates/export";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (templateExportByID != null && templateExportByID.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(templateExportByID); // http body (model) parameter
}
else
{
localVarPostBody = templateExportByID; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json",
"application/x-yaml"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ExportTemplate", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(List)Configuration.ApiClient.Deserialize(localVarResponse, typeof(List)));
}
///
/// Export a new template
///
/// Thrown when fails to make API call
/// Export resources as an InfluxDB template. (optional)
/// Cancellation token
/// ApiResponse of List<Object>
public async System.Threading.Tasks.Task ExportTemplateWithIRestResponseAsync(
TemplateExportByID templateExportByID = null, CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/templates/export";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (templateExportByID != null && templateExportByID.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(templateExportByID); // http body (model) parameter
}
else
{
localVarPostBody = templateExportByID; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json",
"application/x-yaml"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ExportTemplate", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Export a new template
///
/// Thrown when fails to make API call
/// Export resources as an InfluxDB template. (optional)
/// ApiResponse of List<Object>
public RestResponse ExportTemplateWithIRestResponse(TemplateExportByID templateExportByID = null)
{
var localVarPath = "/api/v2/templates/export";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (templateExportByID != null && templateExportByID.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(templateExportByID); // http body (model) parameter
}
else
{
localVarPostBody = templateExportByID; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json",
"application/x-yaml"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ExportTemplate", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Export a new template
///
/// Thrown when fails to make API call
/// Export resources as an InfluxDB template. (optional)
/// ApiResponse of List<Object>
public RestRequest ExportTemplateWithRestRequest(TemplateExportByID templateExportByID = null)
{
var localVarPath = "/api/v2/templates/export";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (templateExportByID != null && templateExportByID.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(templateExportByID); // http body (model) parameter
}
else
{
localVarPostBody = templateExportByID; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json",
"application/x-yaml"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Export a new template
///
/// Thrown when fails to make API call
/// Export resources as an InfluxDB template. (optional)
/// Cancellation token
/// Task of List<Object>
public async System.Threading.Tasks.Task> ExportTemplateAsync(
TemplateExportByID templateExportByID = null, CancellationToken cancellationToken = default)
{
var localVarResponse = await ExportTemplateAsyncWithHttpInfo(templateExportByID, cancellationToken)
.ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Export a new template
///
/// Thrown when fails to make API call
/// Export resources as an InfluxDB template. (optional)
/// Cancellation token
/// Task of ApiResponse (List<Object>)
public async System.Threading.Tasks.Task>> ExportTemplateAsyncWithHttpInfo(
TemplateExportByID templateExportByID = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse = await ExportTemplateAsyncWithIRestResponse(templateExportByID, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ExportTemplate", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(List)Configuration.ApiClient.Deserialize(localVarResponse, typeof(List)));
}
///
/// Export a new template
///
/// Thrown when fails to make API call
/// Export resources as an InfluxDB template. (optional)
/// Cancellation token
/// Task of RestResponse (List<Object>)
public async System.Threading.Tasks.Task ExportTemplateAsyncWithIRestResponse(
TemplateExportByID templateExportByID = null, CancellationToken cancellationToken = default)
{
var localVarPath = "/api/v2/templates/export";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
"application/json"
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (templateExportByID != null && templateExportByID.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(templateExportByID); // http body (model) parameter
}
else
{
localVarPostBody = templateExportByID; // byte array
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json",
"application/x-yaml"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ExportTemplate", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List installed templates
///
/// Thrown when fails to make API call
/// The organization ID of the stacks
/// A collection of names to filter the list by. (optional)
/// A collection of stackIDs to filter the list by. (optional)
/// ListStacksResponse
public ListStacksResponse ListStacks(string orgID, string name = null, string stackID = null)
{
var localVarResponse = ListStacksWithHttpInfo(orgID, name, stackID);
return localVarResponse.Data;
}
///
/// List installed templates
///
/// Thrown when fails to make API call
/// The organization ID of the stacks
/// A collection of names to filter the list by. (optional)
/// A collection of stackIDs to filter the list by. (optional)
/// ApiResponse of ListStacksResponse
public ApiResponse ListStacksWithHttpInfo(string orgID, string name = null,
string stackID = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling TemplatesService->ListStacks");
}
var localVarPath = "/api/v2/stacks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (stackID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "stackID", stackID)); // query parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ListStacks", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(ListStacksResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListStacksResponse)));
}
///
/// List installed templates
///
/// Thrown when fails to make API call
/// The organization ID of the stacks
/// A collection of names to filter the list by. (optional)
/// A collection of stackIDs to filter the list by. (optional)
/// Cancellation token
/// ApiResponse of ListStacksResponse
public async System.Threading.Tasks.Task ListStacksWithIRestResponseAsync(string orgID,
string name = null, string stackID = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling TemplatesService->ListStacks");
}
var localVarPath = "/api/v2/stacks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (stackID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "stackID", stackID)); // query parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ListStacks", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List installed templates
///
/// Thrown when fails to make API call
/// The organization ID of the stacks
/// A collection of names to filter the list by. (optional)
/// A collection of stackIDs to filter the list by. (optional)
/// ApiResponse of ListStacksResponse
public RestResponse ListStacksWithIRestResponse(string orgID, string name = null, string stackID = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling TemplatesService->ListStacks");
}
var localVarPath = "/api/v2/stacks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (stackID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "stackID", stackID)); // query parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ListStacks", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// List installed templates
///
/// Thrown when fails to make API call
/// The organization ID of the stacks
/// A collection of names to filter the list by. (optional)
/// A collection of stackIDs to filter the list by. (optional)
/// ApiResponse of ListStacksResponse
public RestRequest ListStacksWithRestRequest(string orgID, string name = null, string stackID = null)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling TemplatesService->ListStacks");
}
var localVarPath = "/api/v2/stacks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (stackID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "stackID", stackID)); // query parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// List installed templates
///
/// Thrown when fails to make API call
/// The organization ID of the stacks
/// A collection of names to filter the list by. (optional)
/// A collection of stackIDs to filter the list by. (optional)
/// Cancellation token
/// Task of ListStacksResponse
public async System.Threading.Tasks.Task ListStacksAsync(string orgID, string name = null,
string stackID = null, CancellationToken cancellationToken = default)
{
var localVarResponse = await ListStacksAsyncWithHttpInfo(orgID, name, stackID, cancellationToken)
.ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// List installed templates
///
/// Thrown when fails to make API call
/// The organization ID of the stacks
/// A collection of names to filter the list by. (optional)
/// A collection of stackIDs to filter the list by. (optional)
/// Cancellation token
/// Task of ApiResponse (ListStacksResponse)
public async System.Threading.Tasks.Task> ListStacksAsyncWithHttpInfo(
string orgID, string name = null, string stackID = null, CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse = await ListStacksAsyncWithIRestResponse(orgID, name, stackID, cancellationToken)
.ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ListStacks", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(ListStacksResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListStacksResponse)));
}
///
/// List installed templates
///
/// Thrown when fails to make API call
/// The organization ID of the stacks
/// A collection of names to filter the list by. (optional)
/// A collection of stackIDs to filter the list by. (optional)
/// Cancellation token
/// Task of RestResponse (ListStacksResponse)
public async System.Threading.Tasks.Task ListStacksAsyncWithIRestResponse(string orgID,
string name = null, string stackID = null, CancellationToken cancellationToken = default)
{
// verify the required parameter 'orgID' is set
if (orgID == null)
{
throw new ApiException(400,
"Missing required parameter 'orgID' when calling TemplatesService->ListStacks");
}
var localVarPath = "/api/v2/stacks";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (orgID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "orgID", orgID)); // query parameter
}
if (name != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "name", name)); // query parameter
}
if (stackID != null)
{
localVarQueryParams.AddRange(
Configuration.ApiClient.ParameterToKeyValuePairs("", "stackID", stackID)); // query parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ListStacks", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Retrieve a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Stack
public Stack ReadStack(string stackId)
{
var localVarResponse = ReadStackWithHttpInfo(stackId);
return localVarResponse.Data;
}
///
/// Retrieve a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// ApiResponse of Stack
public ApiResponse ReadStackWithHttpInfo(string stackId)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->ReadStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ReadStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Stack)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Stack)));
}
///
/// Retrieve a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Cancellation token
/// ApiResponse of Stack
public async System.Threading.Tasks.Task ReadStackWithIRestResponseAsync(string stackId,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->ReadStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ReadStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Retrieve a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// ApiResponse of Stack
public RestResponse ReadStackWithIRestResponse(string stackId)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->ReadStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ReadStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Retrieve a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// ApiResponse of Stack
public RestRequest ReadStackWithRestRequest(string stackId)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->ReadStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Retrieve a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Cancellation token
/// Task of Stack
public async System.Threading.Tasks.Task ReadStackAsync(string stackId,
CancellationToken cancellationToken = default)
{
var localVarResponse = await ReadStackAsyncWithHttpInfo(stackId, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Retrieve a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Cancellation token
/// Task of ApiResponse (Stack)
public async System.Threading.Tasks.Task> ReadStackAsyncWithHttpInfo(string stackId,
CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await ReadStackAsyncWithIRestResponse(stackId, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ReadStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Stack)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Stack)));
}
///
/// Retrieve a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Cancellation token
/// Task of RestResponse (Stack)
public async System.Threading.Tasks.Task ReadStackAsyncWithIRestResponse(string stackId,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->ReadStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("ReadStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Uninstall a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Stack
public Stack UninstallStack(string stackId)
{
var localVarResponse = UninstallStackWithHttpInfo(stackId);
return localVarResponse.Data;
}
///
/// Uninstall a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// ApiResponse of Stack
public ApiResponse UninstallStackWithHttpInfo(string stackId)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->UninstallStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}/uninstall";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("UninstallStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Stack)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Stack)));
}
///
/// Uninstall a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Cancellation token
/// ApiResponse of Stack
public async System.Threading.Tasks.Task UninstallStackWithIRestResponseAsync(string stackId,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->UninstallStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}/uninstall";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("UninstallStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Uninstall a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// ApiResponse of Stack
public RestResponse UninstallStackWithIRestResponse(string stackId)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->UninstallStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}/uninstall";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("UninstallStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///
/// Uninstall a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// ApiResponse of Stack
public RestRequest UninstallStackWithRestRequest(string stackId)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->UninstallStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}/uninstall";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
return Configuration.ApiClient.PrepareRequest(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType);
}
///
/// Uninstall a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Cancellation token
/// Task of Stack
public async System.Threading.Tasks.Task UninstallStackAsync(string stackId,
CancellationToken cancellationToken = default)
{
var localVarResponse =
await UninstallStackAsyncWithHttpInfo(stackId, cancellationToken).ConfigureAwait(false);
return localVarResponse.Data;
}
///
/// Uninstall a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Cancellation token
/// Task of ApiResponse (Stack)
public async System.Threading.Tasks.Task> UninstallStackAsyncWithHttpInfo(string stackId,
CancellationToken cancellationToken = default)
{
// make the HTTP request
var localVarResponse =
await UninstallStackAsyncWithIRestResponse(stackId, cancellationToken).ConfigureAwait(false);
var localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("UninstallStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.Select(h => (h.Name, h.Value)),
(Stack)Configuration.ApiClient.Deserialize(localVarResponse, typeof(Stack)));
}
///
/// Uninstall a stack
///
/// Thrown when fails to make API call
/// The identifier of the stack.
/// Cancellation token
/// Task of RestResponse (Stack)
public async System.Threading.Tasks.Task UninstallStackAsyncWithIRestResponse(string stackId,
CancellationToken cancellationToken = default)
{
// verify the required parameter 'stackId' is set
if (stackId == null)
{
throw new ApiException(400,
"Missing required parameter 'stackId' when calling TemplatesService->UninstallStack");
}
var localVarPath = "/api/v2/stacks/{stack_id}/uninstall";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
var localVarHttpContentTypes = new string[]
{
};
var localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
if (stackId != null)
{
localVarPathParams.Add("stack_id",
Configuration.ApiClient.ParameterToString(stackId)); // path parameter
}
// to determine the Accept header
var localVarHttpHeaderAccepts = new string[]
{
"application/json"
};
var localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null && !localVarHeaderParams.ContainsKey("Accept"))
{
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
}
// make the HTTP request
var localVarResponse = (RestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarFileParams,
localVarPathParams, localVarHttpContentType, cancellationToken).ConfigureAwait(false);
if (ExceptionFactory != null)
{
var exception = ExceptionFactory("UninstallStack", localVarResponse);
if (exception != null)
{
throw exception;
}
}
return localVarResponse;
}
///