Interface IMultiplayDeployer
Responsible to make available deployment functionality
Namespace: Unity.Services.Multiplay.Authoring.Core.Deployment
Syntax
public interface IMultiplayDeployer
Methods
BuildBinaries(IReadOnlyList<BuildItem>, CancellationToken)
Build the binaries associated with the build items
Declaration
Task<(List<BuildItem>, List<BuildItem>)> BuildBinaries(IReadOnlyList<BuildItem> buildItems, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyList<BuildItem> | buildItems | A read-only list of builds. |
System.Threading.CancellationToken | token | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.Collections.Generic.List<BuildItem>, System.Collections.Generic.List<BuildItem>>> | A tuple containing a list of successful builds and a list of failed builds. |
CreateAndSyncTestAllocationAsync(FleetName, BuildConfigurationName, CancellationToken)
Creates a test allocation for the associated Fleet
Declaration
Task<AllocationInformation> CreateAndSyncTestAllocationAsync(FleetName fleetName, BuildConfigurationName buildConfigurationName, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
FleetName | fleetName | The name of the fleet. |
BuildConfigurationName | buildConfigurationName | The name of the build configuration. |
System.Threading.CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Unity.Services.Multiplay.Authoring.Core.MultiplayApi.AllocationInformation> | The test allocation information. |
DeleteBuild(BuildId, CancellationToken)
Deletes the specified build
Declaration
Task DeleteBuild(BuildId buildId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
BuildId | buildId | The ID of the build. |
System.Threading.CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task for the operation. |
DeleteBuildConfig(BuildConfigurationId, CancellationToken)
Deletes the Build Configuration
Declaration
Task DeleteBuildConfig(BuildConfigurationId buildConfigurationId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
BuildConfigurationId | buildConfigurationId | The ID of the build configuration. |
System.Threading.CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task for the operation. |
DeleteFleet(FleetId)
Deletes the associated Fleet
Declaration
Task DeleteFleet(FleetId fleetName)
Parameters
Type | Name | Description |
---|---|---|
FleetId | fleetName | The name of the fleet. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task for the operation. |
Deploy(IReadOnlyList<DeploymentItem>, CancellationToken)
Deploy the associated Multiplay Config items. Builds will be built and uploaded, Build Configurations and fleets will be created or updated according to the item. The item status and progress will be updated along the way.
Declaration
Task Deploy(IReadOnlyList<DeploymentItem> items, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyList<Unity.Services.DeploymentApi.Editor.DeploymentItem> | items | A read-only list of Multiplay Config items. |
System.Threading.CancellationToken | token | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task for the operation. |
DeployBuildConfigs(IReadOnlyList<BuildConfigurationItem>, Dictionary<BuildName, BuildId>, CancellationToken)
Creates or Updates the associated build configurations
Declaration
Task<(Dictionary<BuildConfigurationName, BuildConfigurationId>, List<BuildConfigurationItem>)> DeployBuildConfigs(IReadOnlyList<BuildConfigurationItem> items, Dictionary<BuildName, BuildId> successfulUploads, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyList<BuildConfigurationItem> | items | A read-only list of build configurations. |
System.Collections.Generic.Dictionary<BuildName, BuildId> | successfulUploads | A dictionary of successful uploads. |
System.Threading.CancellationToken | token | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.Collections.Generic.Dictionary<BuildConfigurationName, BuildConfigurationId>, System.Collections.Generic.List<BuildConfigurationItem>>> | A tuple containing a dictionary of successful build configuration deployments and a list of failed build configuration deployments. |
DeployFleets(IReadOnlyList<FleetItem>, Dictionary<BuildConfigurationName, BuildConfigurationId>, CancellationToken)
Creates or Updates the associated fleets
Declaration
Task DeployFleets(IReadOnlyList<FleetItem> items, Dictionary<BuildConfigurationName, BuildConfigurationId> buildConfigIds = null, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyList<FleetItem> | items | A read-only list of fleets. |
System.Collections.Generic.Dictionary<BuildConfigurationName, BuildConfigurationId> | buildConfigIds | If the config IDs are known, they will not be searched remotely |
System.Threading.CancellationToken | token | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task for the operation. |
GetAvailableRegions()
Gets regions that are available for fleet scaling options
Declaration
Task<Dictionary<string, Guid>> GetAvailableRegions()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<System.String, System.Guid>> | A dictionary of region names and their corresponding region IDs. |
GetBuildConfigs(CancellationToken)
Gets the information of the build configurations for the current environment
Declaration
Task<IReadOnlyList<BuildConfigInfo>> GetBuildConfigs(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Unity.Services.Multiplay.Authoring.Core.MultiplayApi.BuildConfigInfo>> | A read-only list of build configurations. |
GetBuilds(CancellationToken)
Gets the information of the builds for the current environment
Declaration
Task<IReadOnlyList<BuildInfo>> GetBuilds(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Unity.Services.Multiplay.Authoring.Core.MultiplayApi.BuildInfo>> | A read-only list of builds. |
GetFleets()
Gets the information of the fleets
Declaration
Task<IReadOnlyList<FleetInfo>> GetFleets()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<FleetInfo>> | A read-only list of fleets. |
InitAsync()
Initialize the MultiplayDeployer with an authenticated client
Declaration
Task InitAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task for the operation. |
ListTestAllocations(FleetId, CancellationToken)
Lists existing test allocations for the associated fleet
Declaration
Task<List<AllocationInformation>> ListTestAllocations(FleetId fleetId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
FleetId | fleetId | The ID of the fleet. |
System.Threading.CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.List<Unity.Services.Multiplay.Authoring.Core.MultiplayApi.AllocationInformation>> | A list of test allocation information. |
RemoveTestAllocation(FleetId, Guid, CancellationToken)
Removes a test allocation
Declaration
Task RemoveTestAllocation(FleetId fleetId, Guid allocationId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
FleetId | fleetId | The ID of the fleet. |
System.Guid | allocationId | The ID of the allocation. |
System.Threading.CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task for the operation. |
UploadAndSyncBuilds(List<BuildItem>, CancellationToken)
Uploads the associated builds, and waits for them to be available.
Declaration
Task<UploadResult> UploadAndSyncBuilds(List<BuildItem> successfulBuilds, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<BuildItem> | successfulBuilds | A list of successful builds. |
System.Threading.CancellationToken | token | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<UploadResult> | The result of the upload. |
UploadResult(Dictionary<BuildItem, BuildUploadResult>, List<BuildItem>, Dictionary<BuildName, BuildId>, List<BuildItem>)
Represents the result of a build upload operation
Declaration
record UploadResult(Dictionary<BuildItem, BuildUploadResult> UploadResults, List<BuildItem> FailedUploads, Dictionary<BuildName, BuildId> SuccessfulSyncs, List<BuildItem> FailedSyncs)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<BuildItem, Unity.Services.Multiplay.Authoring.Core.Deployment.BuildUploadResult> | UploadResults | The individual upload result for the build item |
System.Collections.Generic.List<BuildItem> | FailedUploads | The Builds that failed to upload |
System.Collections.Generic.Dictionary<BuildName, BuildId> | SuccessfulSyncs | The builds that were successfully synced |
System.Collections.Generic.List<BuildItem> | FailedSyncs | The builds that failed to sync |
Returns
Type | Description |
---|---|
record |