Documentation

AllocationsApi

Import

Import

  • const { AllocationsApi } = require("@unity-services/multiplay-1.0");

Constructors

Constructor

Methods

Get Allocation

  • getAllocation(projectId: string, environmentId: string, fleetId: string, allocationId: string, options?: AxiosRequestConfig<any>): Promise<AxiosResponse<MultiplayAllocationsAllocation, any>>
  • Gets the allocation for a given fleet by its UUID.

    summary

    Get an allocation by its UUID

    throws

    {RequiredError}

    memberof

    AllocationsApi

    Parameters

    • projectId: string

      ID of the project

    • environmentId: string

      Environment Id of a project

    • fleetId: string

      Fleet ID

    • allocationId: string

      Allocation ID

    • Optional options: AxiosRequestConfig<any>

    Returns Promise<AxiosResponse<MultiplayAllocationsAllocation, any>>

List Allocations

  • listAllocations(projectId: string, environmentId: string, fleetId: string, age?: string, limit?: number, offset?: number, ids?: string, options?: AxiosRequestConfig<any>): Promise<AxiosResponse<MultiplayAllocationsListAllocationsResponse, any>>
  • Lists the allocations for a given fleet where the last activity took place within a given age duration.

    summary

    List fleet allocations

    throws

    {RequiredError}

    memberof

    AllocationsApi

    Parameters

    • projectId: string

      ID of the project

    • environmentId: string

      Environment Id of a project

    • fleetId: string

      Fleet ID

    • Optional age: string
    • Optional limit: number
    • Optional offset: number
    • Optional ids: string
    • Optional options: AxiosRequestConfig<any>

    Returns Promise<AxiosResponse<MultiplayAllocationsListAllocationsResponse, any>>

Process Allocation

  • Queues a request to allocate a server in a fleet.

    summary

    Queue an allocation request

    throws

    {RequiredError}

    memberof

    AllocationsApi

    Parameters

    • projectId: string

      ID of the project

    • environmentId: string

      Environment Id of a project

    • fleetId: string

      Fleet ID

    • Optional multiplayAllocationsAllocateRequest: MultiplayAllocationsAllocateRequest
    • Optional options: AxiosRequestConfig<any>

    Returns Promise<AxiosResponse<MultiplayAllocationsAllocateResponse, any>>

Process Deallocation

  • processDeallocation(projectId: string, environmentId: string, fleetId: string, allocationId: string, options?: AxiosRequestConfig<any>): Promise<AxiosResponse<void, any>>
  • Queues a request to deallocate a server in a fleet.

    summary

    Remove an allocation

    throws

    {RequiredError}

    memberof

    AllocationsApi

    Parameters

    • projectId: string

      ID of the project

    • environmentId: string

      Environment Id of a project

    • fleetId: string

      Fleet ID

    • allocationId: string

      Allocation ID

    • Optional options: AxiosRequestConfig<any>

    Returns Promise<AxiosResponse<void, any>>