Class MultiplayAllocationsApi
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: Unity.Services.Apis.Multiplay
Assembly: Unity.Services.Apis.dll
Syntax
public class MultiplayAllocationsApi : IMultiplayAllocationsApi, IApiAccessor
Constructors
MultiplayAllocationsApi(IApiClient)
Initializes a new instance of the Multiplay
Declaration
public MultiplayAllocationsApi(IApiClient apiClient)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
MultiplayAllocationsApi(IApiClient, IApiConfiguration)
Initializes a new instance of the Multiplay
Declaration
public MultiplayAllocationsApi(IApiClient apiClient, IApiConfiguration apiConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
IApi |
apiConfiguration | The configuration object. |
Properties
Client
The client for accessing this underlying API asynchronously.
Declaration
public IApiClient Client { get; }
Property Value
Type | Description |
---|---|
IApi |
Configuration
Gets the configuration object
Declaration
public IApiConfiguration Configuration { get; }
Property Value
Type | Description |
---|---|
IApi |
An instance of the Configuration |
Methods
GetAllocation(string, string, string, string, CancellationToken)
Get an allocation by its UUID Gets the allocation for a given fleet by its UUID.
Declaration
public ApiOperation<MultiplayAllocationsAllocation> GetAllocation(string projectId, string environmentId, string fleetId, string allocationId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project |
string | environmentId | Environment Id of a project |
string | fleetId | Fleet ID |
string | allocationId | Allocation ID |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetBasePath()
Gets the base path of the API client.
Declaration
public string GetBasePath()
Returns
Type | Description |
---|---|
string | The base path |
ListAllocations(string, string, string, string, int?, int?, string, CancellationToken)
List fleet allocations Lists the allocations for a given fleet where the last activity took place within a given age duration.
Declaration
public ApiOperation<MultiplayAllocationsListAllocationsResponse> ListAllocations(string projectId, string environmentId, string fleetId, string age = null, int? limit = null, int? offset = null, string ids = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project |
string | environmentId | Environment Id of a project |
string | fleetId | Fleet ID |
string | age | Optional parameter representing the minimum time each allocation has been active. For example, providing a value of '24h' would return all allocations that have been active for longer than 24 hours. Not providing this parameter would return all allocations regardless of age (but taking into account other filters). (optional) |
int? | limit | Optional parameter used for pagination. Represents the max number of allocations to include in the response. This must be a value between 1 and 50. Anything above will be hard limited to 50 results. (optional) |
int? | offset | Optional parameter used for pagination. Represents the offset at which to start pagination. (optional) |
string | ids | Optional parameter containing a comma-separated list of allocationIds to limit the response list to. Note that if one or more ids are specified, the other filters of age and pagination are ignored. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
ProcessAllocation(string, string, string, MultiplayAllocationsAllocateRequest, CancellationToken)
Queue an allocation request Queues a request to allocate a server in a fleet.
Declaration
public ApiOperation<MultiplayAllocationsAllocateResponse> ProcessAllocation(string projectId, string environmentId, string fleetId, MultiplayAllocationsAllocateRequest multiplayAllocationsAllocateRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project |
string | environmentId | Environment Id of a project |
string | fleetId | Fleet ID |
Multiplay |
multiplayAllocationsAllocateRequest | The request body of the allocate endpoint. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
ProcessDeallocation(string, string, string, string, CancellationToken)
Remove an allocation Queues a request to deallocate a server in a fleet.
Declaration
public ApiOperation ProcessDeallocation(string projectId, string environmentId, string fleetId, string allocationId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project |
string | environmentId | Environment Id of a project |
string | fleetId | Fleet ID |
string | allocationId | Allocation ID |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |