No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.1.4
- SDK version: 0.4.0
- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen
- RestSharp - 106.13.0 or later
- Json.NET - 13.0.1 or later
- JsonSubTypes - 1.8.0 or later
- System.ComponentModel.Annotations - 5.0.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.
Run the following command to generate the DLL
- [Mac/Linux]
/bin/sh build.sh
- [Windows]
build.bat
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
A .nuspec
is included with the project. You can follow the Nuget quickstart to create and publish packages.
This .nuspec
uses placeholders from the .csproj
, so build the .csproj
directly:
nuget pack -Build -OutputDirectory out Fermyon.Nomad.csproj
Then, publish to a local feed or other host and consume the new package via Nuget as usual.
To use the API client with a HTTP proxy, setup a System.Net.WebProxy
Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.ApiKey.Add("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.ApiKeyPrefix.Add("X-Nomad-Token", "Bearer");
var apiInstance = new ACLApi(config);
var policyName = "policyName_example"; // string | The ACL policy name.
var region = "region_example"; // string? | Filters results based on the specified region. (optional)
var _namespace = "_namespace_example"; // string? | Filters results based on the specified namespace. (optional)
var xNomadToken = "xNomadToken_example"; // string? | A Nomad ACL token. (optional)
var idempotencyToken = "idempotencyToken_example"; // string? | Can be used to ensure operations are only run once. (optional)
try
{
apiInstance.DeleteACLPolicy(policyName, region, _namespace, xNomadToken, idempotencyToken);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ACLApi.DeleteACLPolicy: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
All URIs are relative to https://127.0.0.1:4646/v1
Class | Method | HTTP request | Description |
---|---|---|---|
ACLApi | DeleteACLPolicy | DELETE /acl/policy/{policyName} | |
ACLApi | DeleteACLToken | DELETE /acl/token/{tokenAccessor} | |
ACLApi | GetACLPolicies | GET /acl/policies | |
ACLApi | GetACLPolicy | GET /acl/policy/{policyName} | |
ACLApi | GetACLToken | GET /acl/token/{tokenAccessor} | |
ACLApi | GetACLTokenSelf | GET /acl/token | |
ACLApi | GetACLTokens | GET /acl/tokens | |
ACLApi | PostACLBootstrap | POST /acl/bootstrap | |
ACLApi | PostACLPolicy | POST /acl/policy/{policyName} | |
ACLApi | PostACLToken | POST /acl/token/{tokenAccessor} | |
ACLApi | PostACLTokenOnetime | POST /acl/token/onetime | |
ACLApi | PostACLTokenOnetimeExchange | POST /acl/token/onetime/exchange | |
AllocationsApi | GetAllocation | GET /allocation/{allocID} | |
AllocationsApi | GetAllocationServices | GET /allocation/{allocID}/services | |
AllocationsApi | GetAllocations | GET /allocations | |
AllocationsApi | PostAllocationStop | POST /allocation/{allocID}/stop | |
ClientsApi | GetAllocationLogs | GET /client/fs/logs/{allocID} | |
DeploymentsApi | GetDeployment | GET /deployment/{deploymentID} | |
DeploymentsApi | GetDeploymentAllocations | GET /deployment/allocations/{deploymentID} | |
DeploymentsApi | GetDeployments | GET /deployments | |
DeploymentsApi | PostDeploymentAllocationHealth | POST /deployment/allocation-health/{deploymentID} | |
DeploymentsApi | PostDeploymentFail | POST /deployment/fail/{deploymentID} | |
DeploymentsApi | PostDeploymentPause | POST /deployment/pause/{deploymentID} | |
DeploymentsApi | PostDeploymentPromote | POST /deployment/promote/{deploymentID} | |
DeploymentsApi | PostDeploymentUnblock | POST /deployment/unblock/{deploymentID} | |
EnterpriseApi | CreateQuotaSpec | POST /quota | |
EnterpriseApi | DeleteQuotaSpec | DELETE /quota/{specName} | |
EnterpriseApi | GetQuotaSpec | GET /quota/{specName} | |
EnterpriseApi | GetQuotas | GET /quotas | |
EnterpriseApi | PostQuotaSpec | POST /quota/{specName} | |
EvaluationsApi | GetEvaluation | GET /evaluation/{evalID} | |
EvaluationsApi | GetEvaluationAllocations | GET /evaluation/{evalID}/allocations | |
EvaluationsApi | GetEvaluations | GET /evaluations | |
JobsApi | DeleteJob | DELETE /job/{jobName} | |
JobsApi | GetJob | GET /job/{jobName} | |
JobsApi | GetJobAllocations | GET /job/{jobName}/allocations | |
JobsApi | GetJobDeployment | GET /job/{jobName}/deployment | |
JobsApi | GetJobDeployments | GET /job/{jobName}/deployments | |
JobsApi | GetJobEvaluations | GET /job/{jobName}/evaluations | |
JobsApi | GetJobScaleStatus | GET /job/{jobName}/scale | |
JobsApi | GetJobSummary | GET /job/{jobName}/summary | |
JobsApi | GetJobVersions | GET /job/{jobName}/versions | |
JobsApi | GetJobs | GET /jobs | |
JobsApi | PostJob | POST /job/{jobName} | |
JobsApi | PostJobDispatch | POST /job/{jobName}/dispatch | |
JobsApi | PostJobEvaluate | POST /job/{jobName}/evaluate | |
JobsApi | PostJobParse | POST /jobs/parse | |
JobsApi | PostJobPeriodicForce | POST /job/{jobName}/periodic/force | |
JobsApi | PostJobPlan | POST /job/{jobName}/plan | |
JobsApi | PostJobRevert | POST /job/{jobName}/revert | |
JobsApi | PostJobScalingRequest | POST /job/{jobName}/scale | |
JobsApi | PostJobStability | POST /job/{jobName}/stable | |
JobsApi | PostJobValidateRequest | POST /validate/job | |
JobsApi | RegisterJob | POST /jobs | |
MetricsApi | GetMetricsSummary | GET /metrics | |
NamespacesApi | CreateNamespace | POST /namespace | |
NamespacesApi | DeleteNamespace | DELETE /namespace/{namespaceName} | |
NamespacesApi | GetNamespace | GET /namespace/{namespaceName} | |
NamespacesApi | GetNamespaces | GET /namespaces | |
NamespacesApi | PostNamespace | POST /namespace/{namespaceName} | |
NodesApi | GetNode | GET /node/{nodeId} | |
NodesApi | GetNodeAllocations | GET /node/{nodeId}/allocations | |
NodesApi | GetNodes | GET /nodes | |
NodesApi | UpdateNodeDrain | POST /node/{nodeId}/drain | |
NodesApi | UpdateNodeEligibility | POST /node/{nodeId}/eligibility | |
NodesApi | UpdateNodePurge | POST /node/{nodeId}/purge | |
OperatorApi | DeleteOperatorRaftPeer | DELETE /operator/raft/peer | |
OperatorApi | GetOperatorAutopilotConfiguration | GET /operator/autopilot/configuration | |
OperatorApi | GetOperatorAutopilotHealth | GET /operator/autopilot/health | |
OperatorApi | GetOperatorRaftConfiguration | GET /operator/raft/configuration | |
OperatorApi | GetOperatorSchedulerConfiguration | GET /operator/scheduler/configuration | |
OperatorApi | PostOperatorSchedulerConfiguration | POST /operator/scheduler/configuration | |
OperatorApi | PutOperatorAutopilotConfiguration | PUT /operator/autopilot/configuration | |
PluginsApi | GetPluginCSI | GET /plugin/csi/{pluginID} | |
PluginsApi | GetPlugins | GET /plugins | |
RegionsApi | GetRegions | GET /regions | |
ScalingApi | GetScalingPolicies | GET /scaling/policies | |
ScalingApi | GetScalingPolicy | GET /scaling/policy/{policyID} | |
SearchApi | GetFuzzySearch | POST /search/fuzzy | |
SearchApi | GetSearch | POST /search | |
StatusApi | GetStatusLeader | GET /status/leader | |
StatusApi | GetStatusPeers | GET /status/peers | |
SystemApi | PutSystemGC | PUT /system/gc | |
SystemApi | PutSystemReconcileSummaries | PUT /system/reconcile/summaries | |
VolumesApi | CreateVolume | POST /volume/csi/{volumeId}/{action} | |
VolumesApi | DeleteSnapshot | DELETE /volumes/snapshot | |
VolumesApi | DeleteVolumeRegistration | DELETE /volume/csi/{volumeId} | |
VolumesApi | DetachOrDeleteVolume | DELETE /volume/csi/{volumeId}/{action} | |
VolumesApi | GetExternalVolumes | GET /volumes/external | |
VolumesApi | GetSnapshots | GET /volumes/snapshot | |
VolumesApi | GetVolume | GET /volume/csi/{volumeId} | |
VolumesApi | GetVolumes | GET /volumes | |
VolumesApi | PostSnapshot | POST /volumes/snapshot | |
VolumesApi | PostVolume | POST /volumes | |
VolumesApi | PostVolumeRegistration | POST /volume/csi/{volumeId} |
- Model.ACLPolicy
- Model.ACLPolicyListStub
- Model.ACLToken
- Model.ACLTokenListStub
- Model.Affinity
- Model.AllocDeploymentStatus
- Model.AllocStopResponse
- Model.AllocatedCpuResources
- Model.AllocatedDeviceResource
- Model.AllocatedMemoryResources
- Model.AllocatedResources
- Model.AllocatedSharedResources
- Model.AllocatedTaskResources
- Model.Allocation
- Model.AllocationListStub
- Model.AllocationLogs
- Model.AllocationMetric
- Model.Attribute
- Model.AutopilotConfiguration
- Model.CSIControllerInfo
- Model.CSIInfo
- Model.CSIMountOptions
- Model.CSINodeInfo
- Model.CSIPlugin
- Model.CSIPluginListStub
- Model.CSISnapshot
- Model.CSISnapshotCreateRequest
- Model.CSISnapshotCreateResponse
- Model.CSISnapshotListResponse
- Model.CSITopology
- Model.CSITopologyRequest
- Model.CSIVolume
- Model.CSIVolumeCapability
- Model.CSIVolumeCreateRequest
- Model.CSIVolumeExternalStub
- Model.CSIVolumeListExternalResponse
- Model.CSIVolumeListStub
- Model.CSIVolumeRegisterRequest
- Model.CheckRestart
- Model.Constraint
- Model.Consul
- Model.ConsulConnect
- Model.ConsulExposeConfig
- Model.ConsulExposePath
- Model.ConsulGateway
- Model.ConsulGatewayBindAddress
- Model.ConsulGatewayProxy
- Model.ConsulGatewayTLSConfig
- Model.ConsulIngressConfigEntry
- Model.ConsulIngressListener
- Model.ConsulIngressService
- Model.ConsulLinkedService
- Model.ConsulMeshGateway
- Model.ConsulProxy
- Model.ConsulSidecarService
- Model.ConsulTerminatingConfigEntry
- Model.ConsulUpstream
- Model.DNSConfig
- Model.Deployment
- Model.DeploymentAllocHealthRequest
- Model.DeploymentPauseRequest
- Model.DeploymentPromoteRequest
- Model.DeploymentState
- Model.DeploymentUnblockRequest
- Model.DeploymentUpdateResponse
- Model.DesiredTransition
- Model.DesiredUpdates
- Model.DispatchPayloadConfig
- Model.DrainMetadata
- Model.DrainSpec
- Model.DrainStrategy
- Model.DriverInfo
- Model.EphemeralDisk
- Model.EvalOptions
- Model.Evaluation
- Model.EvaluationStub
- Model.FieldDiff
- Model.FuzzyMatch
- Model.FuzzySearchRequest
- Model.FuzzySearchResponse
- Model.GaugeValue
- Model.HostNetworkInfo
- Model.HostVolumeInfo
- Model.Job
- Model.JobChildrenSummary
- Model.JobDeregisterResponse
- Model.JobDiff
- Model.JobDispatchRequest
- Model.JobDispatchResponse
- Model.JobEvaluateRequest
- Model.JobListStub
- Model.JobPlanRequest
- Model.JobPlanResponse
- Model.JobRegisterRequest
- Model.JobRegisterResponse
- Model.JobRevertRequest
- Model.JobScaleStatusResponse
- Model.JobStabilityRequest
- Model.JobStabilityResponse
- Model.JobSummary
- Model.JobValidateRequest
- Model.JobValidateResponse
- Model.JobVersionsResponse
- Model.JobsParseRequest
- Model.LogConfig
- Model.MetricsSummary
- Model.MigrateStrategy
- Model.Multiregion
- Model.MultiregionRegion
- Model.MultiregionStrategy
- Model.Namespace
- Model.NamespaceCapabilities
- Model.NetworkResource
- Model.Node
- Model.NodeCpuResources
- Model.NodeDevice
- Model.NodeDeviceLocality
- Model.NodeDeviceResource
- Model.NodeDiskResources
- Model.NodeDrainUpdateResponse
- Model.NodeEligibilityUpdateResponse
- Model.NodeEvent
- Model.NodeListStub
- Model.NodeMemoryResources
- Model.NodePurgeResponse
- Model.NodeReservedCpuResources
- Model.NodeReservedDiskResources
- Model.NodeReservedMemoryResources
- Model.NodeReservedNetworkResources
- Model.NodeReservedResources
- Model.NodeResources
- Model.NodeScoreMeta
- Model.NodeUpdateDrainRequest
- Model.NodeUpdateEligibilityRequest
- Model.ObjectDiff
- Model.OneTimeToken
- Model.OneTimeTokenExchangeRequest
- Model.OperatorHealthReply
- Model.ParameterizedJobConfig
- Model.PeriodicConfig
- Model.PeriodicForceResponse
- Model.PlanAnnotations
- Model.PointValue
- Model.Port
- Model.PortMapping
- Model.PreemptionConfig
- Model.QuotaLimit
- Model.QuotaSpec
- Model.RaftConfiguration
- Model.RaftServer
- Model.RequestedDevice
- Model.RescheduleEvent
- Model.ReschedulePolicy
- Model.RescheduleTracker
- Model.Resources
- Model.RestartPolicy
- Model.SampledValue
- Model.ScalingEvent
- Model.ScalingPolicy
- Model.ScalingPolicyListStub
- Model.ScalingRequest
- Model.SchedulerConfiguration
- Model.SchedulerConfigurationResponse
- Model.SchedulerSetConfigurationResponse
- Model.SearchRequest
- Model.SearchResponse
- Model.ServerHealth
- Model.Service
- Model.ServiceCheck
- Model.ServiceRegistration
- Model.SidecarTask
- Model.Spread
- Model.SpreadTarget
- Model.Task
- Model.TaskArtifact
- Model.TaskCSIPluginConfig
- Model.TaskDiff
- Model.TaskEvent
- Model.TaskGroup
- Model.TaskGroupDiff
- Model.TaskGroupScaleStatus
- Model.TaskGroupSummary
- Model.TaskHandle
- Model.TaskLifecycle
- Model.TaskState
- Model.Template
- Model.UpdateStrategy
- Model.Vault
- Model.VolumeMount
- Model.VolumeRequest
- Model.WaitConfig
- Type: API key
- API key parameter name: X-Nomad-Token
- Location: HTTP header