-
Notifications
You must be signed in to change notification settings - Fork 0
/
multiplayer.ts
3038 lines (2790 loc) · 119 KB
/
multiplayer.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// deno-lint-ignore-file
import { dispatchRequest, RequestOptions } from "./support/runtime.ts";
export interface AssetReference {
/** The asset's file name. This is a filename with the .zip, .tar, or .tar.gz extension. */
FileName?: string;
/** The asset's mount path. */
MountPath?: string;
}
export interface AssetReferenceParams {
/** The asset's file name. */
FileName: string;
/** The asset's mount path. */
MountPath?: string;
}
export interface AssetSummary {
/** The asset's file name. This is a filename with the .zip, .tar, or .tar.gz extension. */
FileName?: string;
/** The metadata associated with the asset. */
Metadata?: Record<string, unknown>;
}
export enum AttributeMergeFunction {
Min = "Min",
Max = "Max",
Average = "Average",
}
export enum AttributeNotSpecifiedBehavior {
UseDefault = "UseDefault",
MatchAny = "MatchAny",
}
export enum AttributeSource {
User = "User",
PlayerEntity = "PlayerEntity",
}
export enum AzureRegion {
AustraliaEast = "AustraliaEast",
AustraliaSoutheast = "AustraliaSoutheast",
BrazilSouth = "BrazilSouth",
CentralUs = "CentralUs",
EastAsia = "EastAsia",
EastUs = "EastUs",
EastUs2 = "EastUs2",
JapanEast = "JapanEast",
JapanWest = "JapanWest",
NorthCentralUs = "NorthCentralUs",
NorthEurope = "NorthEurope",
SouthCentralUs = "SouthCentralUs",
SoutheastAsia = "SoutheastAsia",
WestEurope = "WestEurope",
WestUs = "WestUs",
SouthAfricaNorth = "SouthAfricaNorth",
WestCentralUs = "WestCentralUs",
KoreaCentral = "KoreaCentral",
FranceCentral = "FranceCentral",
WestUs2 = "WestUs2",
CentralIndia = "CentralIndia",
UaeNorth = "UaeNorth",
UkSouth = "UkSouth",
}
export enum AzureVmFamily {
A = "A",
Av2 = "Av2",
Dv2 = "Dv2",
Dv3 = "Dv3",
F = "F",
Fsv2 = "Fsv2",
Dasv4 = "Dasv4",
Dav4 = "Dav4",
Eav4 = "Eav4",
Easv4 = "Easv4",
Ev4 = "Ev4",
Esv4 = "Esv4",
Dsv3 = "Dsv3",
Dsv2 = "Dsv2",
NCasT4_v3 = "NCasT4_v3",
}
export enum AzureVmSize {
Standard_A1 = "Standard_A1",
Standard_A2 = "Standard_A2",
Standard_A3 = "Standard_A3",
Standard_A4 = "Standard_A4",
Standard_A1_v2 = "Standard_A1_v2",
Standard_A2_v2 = "Standard_A2_v2",
Standard_A4_v2 = "Standard_A4_v2",
Standard_A8_v2 = "Standard_A8_v2",
Standard_D1_v2 = "Standard_D1_v2",
Standard_D2_v2 = "Standard_D2_v2",
Standard_D3_v2 = "Standard_D3_v2",
Standard_D4_v2 = "Standard_D4_v2",
Standard_D5_v2 = "Standard_D5_v2",
Standard_D2_v3 = "Standard_D2_v3",
Standard_D4_v3 = "Standard_D4_v3",
Standard_D8_v3 = "Standard_D8_v3",
Standard_D16_v3 = "Standard_D16_v3",
Standard_F1 = "Standard_F1",
Standard_F2 = "Standard_F2",
Standard_F4 = "Standard_F4",
Standard_F8 = "Standard_F8",
Standard_F16 = "Standard_F16",
Standard_F2s_v2 = "Standard_F2s_v2",
Standard_F4s_v2 = "Standard_F4s_v2",
Standard_F8s_v2 = "Standard_F8s_v2",
Standard_F16s_v2 = "Standard_F16s_v2",
Standard_D2as_v4 = "Standard_D2as_v4",
Standard_D4as_v4 = "Standard_D4as_v4",
Standard_D8as_v4 = "Standard_D8as_v4",
Standard_D16as_v4 = "Standard_D16as_v4",
Standard_D2a_v4 = "Standard_D2a_v4",
Standard_D4a_v4 = "Standard_D4a_v4",
Standard_D8a_v4 = "Standard_D8a_v4",
Standard_D16a_v4 = "Standard_D16a_v4",
Standard_E2a_v4 = "Standard_E2a_v4",
Standard_E4a_v4 = "Standard_E4a_v4",
Standard_E8a_v4 = "Standard_E8a_v4",
Standard_E16a_v4 = "Standard_E16a_v4",
Standard_E2as_v4 = "Standard_E2as_v4",
Standard_E4as_v4 = "Standard_E4as_v4",
Standard_E8as_v4 = "Standard_E8as_v4",
Standard_E16as_v4 = "Standard_E16as_v4",
Standard_D2s_v3 = "Standard_D2s_v3",
Standard_D4s_v3 = "Standard_D4s_v3",
Standard_D8s_v3 = "Standard_D8s_v3",
Standard_D16s_v3 = "Standard_D16s_v3",
Standard_DS1_v2 = "Standard_DS1_v2",
Standard_DS2_v2 = "Standard_DS2_v2",
Standard_DS3_v2 = "Standard_DS3_v2",
Standard_DS4_v2 = "Standard_DS4_v2",
Standard_DS5_v2 = "Standard_DS5_v2",
Standard_NC4as_T4_v3 = "Standard_NC4as_T4_v3",
}
export interface BuildAliasDetailsResponse {
/** The guid string alias Id of the alias to be created or updated. */
AliasId?: string;
/** The alias name. */
AliasName?: string;
/** Array of build selection criteria. */
BuildSelectionCriteria?: BuildSelectionCriterion[];
}
export interface BuildAliasParams {
/** The guid string alias ID to use for the request. */
AliasId: string;
}
export interface BuildRegion {
/** The current multiplayer server stats for the region. */
CurrentServerStats?: CurrentServerStats;
/** Optional settings to control dynamic adjustment of standby target */
DynamicStandbySettings?: DynamicStandbySettings;
/** The maximum number of multiplayer servers for the region. */
MaxServers: number;
/** The build region. */
Region?: AzureRegion;
/** Optional settings to set the standby target to specified values during the supplied schedules */
ScheduledStandbySettings?: ScheduledStandbySettings;
/** The target number of standby multiplayer servers for the region. */
StandbyServers: number;
/** The status of multiplayer servers in the build region. Valid values are - Unknown, Initialized, Deploying, Deployed, Unhealthy, Deleting, Deleted. */
Status?: string;
}
export interface BuildRegionParams {
/** Optional settings to control dynamic adjustment of standby target. If not specified, dynamic standby is disabled */
DynamicStandbySettings?: DynamicStandbySettings;
/** The maximum number of multiplayer servers for the region. */
MaxServers: number;
/** The build region. */
Region: AzureRegion;
/** Optional settings to set the standby target to specified values during the supplied schedules */
ScheduledStandbySettings?: ScheduledStandbySettings;
/** The number of standby multiplayer servers for the region. */
StandbyServers: number;
}
export interface BuildSelectionCriterion {
/** Dictionary of build ids and their respective weights for distribution of allocation requests. */
BuildWeightDistribution?: Record<string, unknown>;
}
export interface BuildSummary {
/** The guid string build ID of the build. */
BuildId?: string;
/** The build name. */
BuildName?: string;
/** The time the build was created in UTC. */
CreationTime?: string;
/** The metadata of the build. */
Metadata?: Record<string, unknown>;
/** The configuration and status for each region in the build. */
RegionConfigurations?: BuildRegion[];
}
/** Cancels all tickets of which the player is a member in a given queue that are not cancelled or matched. This API is useful if you lose track of what tickets the player is a member of (if the title crashes for instance) and want to "reset". The Entity field is optional if the caller is a player and defaults to that player. Players may not cancel tickets for other people. The Entity field is required if the caller is a server (authenticated as the title). */
export interface CancelAllMatchmakingTicketsForPlayerRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The entity key of the player whose tickets should be canceled. */
Entity?: EntityKey;
/** The name of the queue from which a player's tickets should be canceled. */
QueueName: string;
}
export interface CancelAllMatchmakingTicketsForPlayerResult {}
/** Cancels all backfill tickets of which the player is a member in a given queue that are not cancelled or matched. This API is useful if you lose track of what tickets the player is a member of (if the server crashes for instance) and want to "reset". */
export interface CancelAllServerBackfillTicketsForPlayerRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The entity key of the player whose backfill tickets should be canceled. */
Entity: EntityKey;
/** The name of the queue from which a player's backfill tickets should be canceled. */
QueueName: string;
}
export interface CancelAllServerBackfillTicketsForPlayerResult {}
export enum CancellationReason {
Requested = "Requested",
Internal = "Internal",
Timeout = "Timeout",
}
/** Only servers and ticket members can cancel a ticket. The ticket can be in five different states when it is cancelled. 1: the ticket is waiting for members to join it, and it has not started matching. If the ticket is cancelled at this stage, it will never match. 2: the ticket is matching. If the ticket is cancelled, it will stop matching. 3: the ticket is matched. A matched ticket cannot be cancelled. 4: the ticket is already cancelled and nothing happens. 5: the ticket is waiting for a server. If the ticket is cancelled, server allocation will be stopped. A server may still be allocated due to a race condition, but that will not be reflected in the ticket. There may be race conditions between the ticket getting matched and the client making a cancellation request. The client must handle the possibility that the cancel request fails if a match is found before the cancellation request is processed. We do not allow resubmitting a cancelled ticket because players must consent to enter matchmaking again. Create a new ticket instead. */
export interface CancelMatchmakingTicketRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The name of the queue the ticket is in. */
QueueName: string;
/** The Id of the ticket to find a match for. */
TicketId: string;
}
export interface CancelMatchmakingTicketResult {}
/** Only servers can cancel a backfill ticket. The ticket can be in three different states when it is cancelled. 1: the ticket is matching. If the ticket is cancelled, it will stop matching. 2: the ticket is matched. A matched ticket cannot be cancelled. 3: the ticket is already cancelled and nothing happens. There may be race conditions between the ticket getting matched and the server making a cancellation request. The server must handle the possibility that the cancel request fails if a match is found before the cancellation request is processed. We do not allow resubmitting a cancelled ticket. Create a new ticket instead. */
export interface CancelServerBackfillTicketRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The name of the queue the ticket is in. */
QueueName: string;
/** The Id of the ticket to find a match for. */
TicketId: string;
}
export interface CancelServerBackfillTicketResult {}
export interface Certificate {
/** Base64 encoded string contents of the certificate. */
Base64EncodedValue: string;
/** A name for the certificate. This is used to reference certificates in build configurations. */
Name: string;
/** If required for your PFX certificate, use this field to provide a password that will be used to install the certificate on the container. */
Password?: string;
}
export interface CertificateSummary {
/** The name of the certificate. */
Name?: string;
/** The thumbprint for the certificate. */
Thumbprint?: string;
}
export interface ConnectedPlayer {
/** The player ID of the player connected to the multiplayer server. */
PlayerId?: string;
}
export enum ContainerFlavor {
ManagedWindowsServerCore = "ManagedWindowsServerCore",
CustomLinux = "CustomLinux",
ManagedWindowsServerCorePreview = "ManagedWindowsServerCorePreview",
Invalid = "Invalid",
}
export interface ContainerImageReference {
/** The container image name. */
ImageName: string;
/** The container tag. */
Tag?: string;
}
export interface CoreCapacity {
/** The available core capacity for the (Region, VmFamily) */
Available: number;
/** The AzureRegion */
Region?: AzureRegion;
/** The total core capacity for the (Region, VmFamily) */
Total: number;
/** The AzureVmFamily */
VmFamily?: AzureVmFamily;
}
export interface CoreCapacityChange {
/** New quota core limit for the given vm family/region. */
NewCoreLimit: number;
/** Region to change. */
Region: AzureRegion;
/** Virtual machine family to change. */
VmFamily: AzureVmFamily;
}
/** Creates a multiplayer server build alias and returns the created alias. */
export interface CreateBuildAliasRequest {
/** The alias name. */
AliasName: string;
/** Array of build selection criteria. */
BuildSelectionCriteria?: BuildSelectionCriterion[];
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
}
/** Creates a multiplayer server build with a custom container and returns information about the build creation request. */
export interface CreateBuildWithCustomContainerRequest {
/** When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or will have the same assets mounted in the container. */
AreAssetsReadonly?: boolean;
/** The build name. */
BuildName: string;
/** The flavor of container to create a build from. */
ContainerFlavor?: ContainerFlavor;
/** The container reference, consisting of the image name and tag. */
ContainerImageReference?: ContainerImageReference;
/** The container command to run when the multiplayer server has been allocated, including any arguments. */
ContainerRunCommand?: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The list of game assets related to the build. */
GameAssetReferences?: AssetReferenceParams[];
/** The game certificates for the build. */
GameCertificateReferences?: GameCertificateReferenceParams[];
/** The Linux instrumentation configuration for the build. */
LinuxInstrumentationConfiguration?: LinuxInstrumentationConfiguration;
/** Metadata to tag the build. The keys are case insensitive. The build metadata is made available to the server through Game Server SDK (GSDK).Constraints: Maximum number of keys: 30, Maximum key length: 50, Maximum value length: 100 */
Metadata?: Record<string, unknown>;
/** The number of multiplayer servers to host on a single VM. */
MultiplayerServerCountPerVm: number;
/** The ports to map the build on. */
Ports: Port[];
/** The region configurations for the build. */
RegionConfigurations: BuildRegionParams[];
/** When true, assets will be downloaded and uncompressed in memory, without the compressedversion being written first to disc. */
UseStreamingForAssetDownloads?: boolean;
/** The VM size to create the build on. */
VmSize?: AzureVmSize;
}
export interface CreateBuildWithCustomContainerResponse {
/** When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or will have the same assets mounted in the container. */
AreAssetsReadonly?: boolean;
/** The guid string build ID. Must be unique for every build. */
BuildId?: string;
/** The build name. */
BuildName?: string;
/** The flavor of container of the build. */
ContainerFlavor?: ContainerFlavor;
/** The container command to run when the multiplayer server has been allocated, including any arguments. */
ContainerRunCommand?: string;
/** The time the build was created in UTC. */
CreationTime?: string;
/** The custom game container image reference information. */
CustomGameContainerImage?: ContainerImageReference;
/** The game assets for the build. */
GameAssetReferences?: AssetReference[];
/** The game certificates for the build. */
GameCertificateReferences?: GameCertificateReference[];
/** The Linux instrumentation configuration for this build. */
LinuxInstrumentationConfiguration?: LinuxInstrumentationConfiguration;
/** The metadata of the build. */
Metadata?: Record<string, unknown>;
/** The number of multiplayer servers to host on a single VM of the build. */
MultiplayerServerCountPerVm: number;
/** The OS platform used for running the game process. */
OsPlatform?: OsPlatform;
/** The ports the build is mapped on. */
Ports?: Port[];
/** The region configuration for the build. */
RegionConfigurations?: BuildRegion[];
/** The type of game server being hosted. */
ServerType?: ServerType;
/** When true, assets will be downloaded and uncompressed in memory, without the compressedversion being written first to disc. */
UseStreamingForAssetDownloads?: boolean;
/** The VM size the build was created on. */
VmSize?: AzureVmSize;
}
/** Creates a multiplayer server build with a managed container and returns information about the build creation request. */
export interface CreateBuildWithManagedContainerRequest {
/** When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or will have the same assets mounted in the container. */
AreAssetsReadonly?: boolean;
/** The build name. */
BuildName: string;
/** The flavor of container to create a build from. */
ContainerFlavor?: ContainerFlavor;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The list of game assets related to the build. */
GameAssetReferences: AssetReferenceParams[];
/** The game certificates for the build. */
GameCertificateReferences?: GameCertificateReferenceParams[];
/** The directory containing the game executable. This would be the start path of the game assets that contain the main game server executable. If not provided, a best effort will be made to extract it from the start game command. */
GameWorkingDirectory?: string;
/** The instrumentation configuration for the build. */
InstrumentationConfiguration?: InstrumentationConfiguration;
/** Metadata to tag the build. The keys are case insensitive. The build metadata is made available to the server through Game Server SDK (GSDK).Constraints: Maximum number of keys: 30, Maximum key length: 50, Maximum value length: 100 */
Metadata?: Record<string, unknown>;
/** The number of multiplayer servers to host on a single VM. */
MultiplayerServerCountPerVm: number;
/** The ports to map the build on. */
Ports: Port[];
/** The region configurations for the build. */
RegionConfigurations: BuildRegionParams[];
/** The command to run when the multiplayer server is started, including any arguments. */
StartMultiplayerServerCommand: string;
/** When true, assets will be downloaded and uncompressed in memory, without the compressedversion being written first to disc. */
UseStreamingForAssetDownloads?: boolean;
/** The VM size to create the build on. */
VmSize?: AzureVmSize;
}
export interface CreateBuildWithManagedContainerResponse {
/** When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or will have the same assets mounted in the container. */
AreAssetsReadonly?: boolean;
/** The guid string build ID. Must be unique for every build. */
BuildId?: string;
/** The build name. */
BuildName?: string;
/** The flavor of container of the build. */
ContainerFlavor?: ContainerFlavor;
/** The time the build was created in UTC. */
CreationTime?: string;
/** The game assets for the build. */
GameAssetReferences?: AssetReference[];
/** The game certificates for the build. */
GameCertificateReferences?: GameCertificateReference[];
/** The directory containing the game executable. This would be the start path of the game assets that contain the main game server executable. If not provided, a best effort will be made to extract it from the start game command. */
GameWorkingDirectory?: string;
/** The instrumentation configuration for this build. */
InstrumentationConfiguration?: InstrumentationConfiguration;
/** The metadata of the build. */
Metadata?: Record<string, unknown>;
/** The number of multiplayer servers to host on a single VM of the build. */
MultiplayerServerCountPerVm: number;
/** The OS platform used for running the game process. */
OsPlatform?: OsPlatform;
/** The ports the build is mapped on. */
Ports?: Port[];
/** The region configuration for the build. */
RegionConfigurations?: BuildRegion[];
/** The type of game server being hosted. */
ServerType?: ServerType;
/** The command to run when the multiplayer server has been allocated, including any arguments. */
StartMultiplayerServerCommand?: string;
/** When true, assets will be downloaded and uncompressed in memory, without the compressedversion being written first to disc. */
UseStreamingForAssetDownloads?: boolean;
/** The VM size the build was created on. */
VmSize?: AzureVmSize;
}
/** Creates a multiplayer server build with the game server running as a process and returns information about the build creation request. */
export interface CreateBuildWithProcessBasedServerRequest {
/** When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or will have the same assets mounted in the container. */
AreAssetsReadonly?: boolean;
/** The build name. */
BuildName: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The list of game assets related to the build. */
GameAssetReferences: AssetReferenceParams[];
/** The game certificates for the build. */
GameCertificateReferences?: GameCertificateReferenceParams[];
/** The working directory for the game process. If this is not provided, the working directory will be set based on the mount path of the game server executable. */
GameWorkingDirectory?: string;
/** The instrumentation configuration for the build. */
InstrumentationConfiguration?: InstrumentationConfiguration;
/** Indicates whether this build will be created using the OS Preview versionPreview OS is recommended for dev builds to detect any breaking changes before they are released to retail. Retail builds should set this value to false. */
IsOSPreview?: boolean;
/** Metadata to tag the build. The keys are case insensitive. The build metadata is made available to the server through Game Server SDK (GSDK).Constraints: Maximum number of keys: 30, Maximum key length: 50, Maximum value length: 100 */
Metadata?: Record<string, unknown>;
/** The number of multiplayer servers to host on a single VM. */
MultiplayerServerCountPerVm: number;
/** The OS platform used for running the game process. */
OsPlatform?: OsPlatform;
/** The ports to map the build on. */
Ports: Port[];
/** The region configurations for the build. */
RegionConfigurations: BuildRegionParams[];
/** The command to run when the multiplayer server is started, including any arguments. The path to any executable should be relative to the root asset folder when unzipped. */
StartMultiplayerServerCommand: string;
/** When true, assets will be downloaded and uncompressed in memory, without the compressedversion being written first to disc. */
UseStreamingForAssetDownloads?: boolean;
/** The VM size to create the build on. */
VmSize?: AzureVmSize;
}
export interface CreateBuildWithProcessBasedServerResponse {
/** When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or will have the same assets mounted in the container. */
AreAssetsReadonly?: boolean;
/** The guid string build ID. Must be unique for every build. */
BuildId?: string;
/** The build name. */
BuildName?: string;
/** The flavor of container of the build. */
ContainerFlavor?: ContainerFlavor;
/** The time the build was created in UTC. */
CreationTime?: string;
/** The game assets for the build. */
GameAssetReferences?: AssetReference[];
/** The game certificates for the build. */
GameCertificateReferences?: GameCertificateReference[];
/** The working directory for the game process. If this is not provided, the working directory will be set based on the mount path of the game server executable. */
GameWorkingDirectory?: string;
/** The instrumentation configuration for this build. */
InstrumentationConfiguration?: InstrumentationConfiguration;
/** Indicates whether this build will be created using the OS Preview versionPreview OS is recommended for dev builds to detect any breaking changes before they are released to retail. Retail builds should set this value to false. */
IsOSPreview?: boolean;
/** The metadata of the build. */
Metadata?: Record<string, unknown>;
/** The number of multiplayer servers to host on a single VM of the build. */
MultiplayerServerCountPerVm: number;
/** The OS platform used for running the game process. */
OsPlatform?: OsPlatform;
/** The ports the build is mapped on. */
Ports?: Port[];
/** The region configuration for the build. */
RegionConfigurations?: BuildRegion[];
/** The type of game server being hosted. */
ServerType?: ServerType;
/** The command to run when the multiplayer server is started, including any arguments. The path to any executable is relative to the root asset folder when unzipped. */
StartMultiplayerServerCommand?: string;
/** When true, assets will be downloaded and uncompressed in memory, without the compressedversion being written first to disc. */
UseStreamingForAssetDownloads?: boolean;
/** The VM size the build was created on. */
VmSize?: AzureVmSize;
}
/** The client specifies the creator's attributes and optionally a list of other users to match with. */
export interface CreateMatchmakingTicketRequest {
/** The User who created this ticket. */
Creator: MatchmakingPlayer;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** How long to attempt matching this ticket in seconds. */
GiveUpAfterSeconds: number;
/** A list of Entity Keys of other users to match with. */
MembersToMatchWith?: EntityKey[];
/** The Id of a match queue. */
QueueName: string;
}
export interface CreateMatchmakingTicketResult {
/** The Id of the ticket to find a match for. */
TicketId: string;
}
/** Creates a remote user to log on to a VM for a multiplayer server build in a specific region. Returns user credential information necessary to log on. */
export interface CreateRemoteUserRequest {
/** The guid string build ID of to create the remote user for. */
BuildId: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The expiration time for the remote user created. Defaults to expiring in one day if not specified. */
ExpirationTime?: string;
/** The region of virtual machine to create the remote user for. */
Region: AzureRegion;
/** The username to create the remote user with. */
Username: string;
/** The virtual machine ID the multiplayer server is located on. */
VmId: string;
}
export interface CreateRemoteUserResponse {
/** The expiration time for the remote user created. */
ExpirationTime?: string;
/** The generated password for the remote user that was created. */
Password?: string;
/** The username for the remote user that was created. */
Username?: string;
}
/** The server specifies all the members, their teams and their attributes, and the server details if applicable. */
export interface CreateServerBackfillTicketRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** How long to attempt matching this ticket in seconds. */
GiveUpAfterSeconds: number;
/** The users who will be part of this ticket, along with their team assignments. */
Members: MatchmakingPlayerWithTeamAssignment[];
/** The Id of a match queue. */
QueueName: string;
/** The details of the server the members are connected to. */
ServerDetails?: ServerDetails;
}
export interface CreateServerBackfillTicketResult {
/** The Id of the ticket to find a match for. */
TicketId: string;
}
/** The server specifies all the members and their attributes. */
export interface CreateServerMatchmakingTicketRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** How long to attempt matching this ticket in seconds. */
GiveUpAfterSeconds: number;
/** The users who will be part of this ticket. */
Members: MatchmakingPlayer[];
/** The Id of a match queue. */
QueueName: string;
}
/** Creates a request to change a title's multiplayer server quotas. */
export interface CreateTitleMultiplayerServersQuotaChangeRequest {
/** A brief description of the requested changes. */
ChangeDescription?: string;
/** Changes to make to the titles cores quota. */
Changes: CoreCapacityChange[];
/** Email to be contacted by our team about this request. Only required when a request is not approved. */
ContactEmail?: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** Additional information about this request that our team can use to better understand the requirements. */
Notes?: string;
/** When these changes would need to be in effect. Only required when a request is not approved. */
StartDate?: string;
}
export interface CreateTitleMultiplayerServersQuotaChangeResponse {
/** Id of the change request that was created. */
RequestId?: string;
/** Determines if the request was approved or not. When false, our team is reviewing and may respond within 2 business days. */
WasApproved: boolean;
}
export interface CurrentServerStats {
/** The number of active multiplayer servers. */
Active: number;
/** The number of multiplayer servers still downloading game resources (such as assets). */
Propping: number;
/** The number of standingby multiplayer servers. */
StandingBy: number;
/** The total number of multiplayer servers. */
Total: number;
}
export interface CustomDifferenceRuleExpansion {
/** Manually specify the values to use for each expansion interval (this overrides Difference, Delta, and MaxDifference). */
DifferenceOverrides: OverrideDouble[];
/** How many seconds before this rule is expanded. */
SecondsBetweenExpansions: number;
}
export interface CustomRegionSelectionRuleExpansion {
/** Manually specify the maximum latency to use for each expansion interval. */
MaxLatencyOverrides: OverrideUnsignedInt[];
/** How many seconds before this rule is expanded. */
SecondsBetweenExpansions: number;
}
export interface CustomSetIntersectionRuleExpansion {
/** Manually specify the values to use for each expansion interval. */
MinIntersectionSizeOverrides: OverrideUnsignedInt[];
/** How many seconds before this rule is expanded. */
SecondsBetweenExpansions: number;
}
export interface CustomTeamDifferenceRuleExpansion {
/** Manually specify the team difference value to use for each expansion interval. */
DifferenceOverrides: OverrideDouble[];
/** How many seconds before this rule is expanded. */
SecondsBetweenExpansions: number;
}
export interface CustomTeamSizeBalanceRuleExpansion {
/** Manually specify the team size difference to use for each expansion interval. */
DifferenceOverrides: OverrideUnsignedInt[];
/** How many seconds before this rule is expanded. */
SecondsBetweenExpansions: number;
}
/** Deletes a multiplayer server game asset for a title. */
export interface DeleteAssetRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The filename of the asset to delete. */
FileName: string;
}
/** Deletes a multiplayer server build alias. */
export interface DeleteBuildAliasRequest {
/** The guid string alias ID of the alias to perform the action on. */
AliasId: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
}
/** Removes a multiplayer server build's region. */
export interface DeleteBuildRegionRequest {
/** The guid string ID of the build we want to update regions for. */
BuildId: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The build region to delete. */
Region: AzureRegion;
}
/** Deletes a multiplayer server build. */
export interface DeleteBuildRequest {
/** The guid string build ID of the build to delete. */
BuildId: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
}
/** Deletes a multiplayer server game certificate. */
export interface DeleteCertificateRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The name of the certificate. */
Name: string;
}
/** Removes the specified container image repository. After this operation, a 'docker pull' will fail for all the tags of the specified image. Morever, ListContainerImages will not return the specified image. */
export interface DeleteContainerImageRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The container image repository we want to delete. */
ImageName?: string;
}
/** Deletes a remote user to log on to a VM for a multiplayer server build in a specific region. Returns user credential information necessary to log on. */
export interface DeleteRemoteUserRequest {
/** The guid string build ID of the multiplayer server where the remote user is to delete. */
BuildId: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The region of the multiplayer server where the remote user is to delete. */
Region: AzureRegion;
/** The username of the remote user to delete. */
Username: string;
/** The virtual machine ID the multiplayer server is located on. */
VmId: string;
}
export interface DifferenceRule {
/** Description of the attribute used by this rule to match tickets. */
Attribute: QueueRuleAttribute;
/** Describes the behavior when an attribute is not specified in the ticket creation request or in the user's entity profile. */
AttributeNotSpecifiedBehavior: AttributeNotSpecifiedBehavior;
/** Collection of fields relating to expanding this rule at set intervals. Only one expansion can be set per rule. When this is set, Difference is ignored. */
CustomExpansion?: CustomDifferenceRuleExpansion;
/** The default value assigned to tickets that are missing the attribute specified by AttributePath (assuming that AttributeNotSpecifiedBehavior is false). Optional. */
DefaultAttributeValue?: number;
/** The allowed difference between any two tickets at the start of matchmaking. */
Difference: number;
/** Collection of fields relating to expanding this rule at set intervals. Only one expansion can be set per rule. */
LinearExpansion?: LinearDifferenceRuleExpansion;
/** How values are treated when there are multiple players in a single ticket. */
MergeFunction: AttributeMergeFunction;
/** Friendly name chosen by developer. */
Name: string;
/** How many seconds before this rule is no longer enforced (but tickets that comply with this rule will still be prioritized over those that don't). Leave blank if this rule is always enforced. */
SecondsUntilOptional?: number;
/** The relative weight of this rule compared to others. */
Weight: number;
}
export interface DynamicStandbySettings {
/** List of auto standing by trigger values and corresponding standing by multiplier. Defaults to 1.5X at 50%, 3X at 25%, and 4X at 5% */
DynamicFloorMultiplierThresholds?: DynamicStandbyThreshold[];
/** When true, dynamic standby will be enabled */
IsEnabled: boolean;
/** The time it takes to reduce target standing by to configured floor value after an increase. Defaults to 30 minutes */
RampDownSeconds?: number;
}
export interface DynamicStandbyThreshold {
/** When the trigger threshold is reached, multiply by this value */
Multiplier: number;
/** The multiplier will be applied when the actual standby divided by target standby floor is less than this value */
TriggerThresholdPercentage: number;
}
export interface EmptyResponse {}
/** Enables the multiplayer server feature for a title and returns the enabled status. The enabled status can be Initializing, Enabled, and Disabled. It can up to 20 minutes or more for the title to be enabled for the feature. On average, it can take up to 20 minutes for the title to be enabled for the feature. */
export interface EnableMultiplayerServersForTitleRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
}
export interface EnableMultiplayerServersForTitleResponse {
/** The enabled status for the multiplayer server features for the title. */
Status?: TitleMultiplayerServerEnabledStatus;
}
/** Combined entity type and ID structure which uniquely identifies a single entity. */
export interface EntityKey {
/** Unique ID of the entity. */
Id: string;
/** Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types */
Type?: string;
}
export interface GameCertificateReference {
/** An alias for the game certificate. The game server will reference this alias via GSDK config to retrieve the game certificate. This alias is used as an identifier in game server code to allow a new certificate with different Name field to be uploaded without the need to change any game server code to reference the new Name. */
GsdkAlias?: string;
/** The name of the game certificate. This name should match the name of a certificate that was previously uploaded to this title. */
Name?: string;
}
export interface GameCertificateReferenceParams {
/** An alias for the game certificate. The game server will reference this alias via GSDK config to retrieve the game certificate. This alias is used as an identifier in game server code to allow a new certificate with different Name field to be uploaded without the need to change any game server code to reference the new Name. */
GsdkAlias: string;
/** The name of the game certificate. This name should match the name of a certificate that was previously uploaded to this title. */
Name: string;
}
/** Gets the URL to upload assets to. */
export interface GetAssetUploadUrlRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The asset's file name to get the upload URL for. */
FileName: string;
}
export interface GetAssetUploadUrlResponse {
/** The asset's upload URL. */
AssetUploadUrl?: string;
/** The asset's file name to get the upload URL for. */
FileName?: string;
}
/** Returns the details about a multiplayer server build alias. */
export interface GetBuildAliasRequest {
/** The guid string alias ID of the alias to perform the action on. */
AliasId: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
}
/** Returns the details about a multiplayer server build. */
export interface GetBuildRequest {
/** The guid string build ID of the build to get. */
BuildId: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
}
export interface GetBuildResponse {
/** When true, assets will not be copied for each server inside the VM. All serverswill run from the same set of assets, or will have the same assets mounted in the container. */
AreAssetsReadonly?: boolean;
/** The guid string build ID of the build. */
BuildId?: string;
/** The build name. */
BuildName?: string;
/** The current build status. Valid values are - Deploying, Deployed, DeletingRegion, Unhealthy. */
BuildStatus?: string;
/** The flavor of container of he build. */
ContainerFlavor?: ContainerFlavor;
/** The container command to run when the multiplayer server has been allocated, including any arguments. This only applies to custom builds. If the build is a managed build, this field will be null. */
ContainerRunCommand?: string;
/** The time the build was created in UTC. */
CreationTime?: string;
/** The custom game container image for a custom build. */
CustomGameContainerImage?: ContainerImageReference;
/** The game assets for the build. */
GameAssetReferences?: AssetReference[];
/** The game certificates for the build. */
GameCertificateReferences?: GameCertificateReference[];
/** The instrumentation configuration of the build. */
InstrumentationConfiguration?: InstrumentationConfiguration;
/** Metadata of the build. The keys are case insensitive. The build metadata is made available to the server through Game Server SDK (GSDK). */
Metadata?: Record<string, unknown>;
/** The number of multiplayer servers to hosted on a single VM of the build. */
MultiplayerServerCountPerVm: number;
/** The OS platform used for running the game process. */
OsPlatform?: OsPlatform;
/** The ports the build is mapped on. */
Ports?: Port[];
/** The region configuration for the build. */
RegionConfigurations?: BuildRegion[];
/** The type of game server being hosted. */
ServerType?: ServerType;
/** The command to run when the multiplayer server has been allocated, including any arguments. This only applies to managed builds. If the build is a custom build, this field will be null. */
StartMultiplayerServerCommand?: string;
/** When true, assets will be downloaded and uncompressed in memory, without the compressedversion being written first to disc. */
UseStreamingForAssetDownloads?: boolean;
/** The VM size the build was created on. */
VmSize?: AzureVmSize;
}
/** Gets credentials to the container registry where game developers can upload custom container images to before creating a new build. */
export interface GetContainerRegistryCredentialsRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
}
export interface GetContainerRegistryCredentialsResponse {
/** The url of the container registry. */
DnsName?: string;
/** The password for accessing the container registry. */
Password?: string;
/** The username for accessing the container registry. */
Username?: string;
}
/** Gets the current configuration for a queue. */
export interface GetMatchmakingQueueRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The Id of the matchmaking queue to retrieve. */
QueueName?: string;
}
export interface GetMatchmakingQueueResult {
/** The matchmaking queue config. */
MatchmakingQueue?: MatchmakingQueueConfig;
}
/** The ticket includes the invited players, their attributes if they have joined, the ticket status, the match Id when applicable, etc. Only servers, the ticket creator and the invited players can get the ticket. */
export interface GetMatchmakingTicketRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** Determines whether the matchmaking attributes will be returned as an escaped JSON string or as an un-escaped JSON object. */
EscapeObject: boolean;
/** The name of the queue to find a match for. */
QueueName: string;
/** The Id of the ticket to find a match for. */
TicketId: string;
}
export interface GetMatchmakingTicketResult {
/** The reason why the current ticket was canceled. This field is only set if the ticket is in canceled state. */
CancellationReasonString?: string;
/** The server date and time at which ticket was created. */
Created: string;
/** The Creator's entity key. */
Creator: EntityKey;
/** How long to attempt matching this ticket in seconds. */
GiveUpAfterSeconds: number;
/** The Id of a match. */
MatchId?: string;
/** A list of Users that have joined this ticket. */
Members: MatchmakingPlayer[];
/** A list of PlayFab Ids of Users to match with. */
MembersToMatchWith?: EntityKey[];
/** The Id of a match queue. */
QueueName: string;
/** The current ticket status. Possible values are: WaitingForPlayers, WaitingForMatch, WaitingForServer, Canceled and Matched. */
Status: string;
/** The Id of the ticket to find a match for. */
TicketId: string;
}
/** When matchmaking has successfully matched together a collection of tickets, it produces a 'match' with an Id. The match contains all of the players that were matched together, and their team assigments. Only servers and ticket members can get the match. */
export interface GetMatchRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** Determines whether the matchmaking attributes will be returned as an escaped JSON string or as an un-escaped JSON object. */
EscapeObject: boolean;
/** The Id of a match. */
MatchId: string;
/** The name of the queue to join. */
QueueName: string;
/** Determines whether the matchmaking attributes for each user should be returned in the response for match request. */
ReturnMemberAttributes: boolean;
}
export interface GetMatchResult {
/** The Id of a match. */
MatchId: string;
/** A list of Users that are matched together, along with their team assignments. */
Members: MatchmakingPlayerWithTeamAssignment[];
/** A list of regions that the match could be played in sorted by preference. This value is only set if the queue has a region selection rule. */
RegionPreferences?: string[];
/** The details of the server that the match has been allocated to. */
ServerDetails?: ServerDetails;
}
/** Gets multiplayer server session details for a build in a specific region. */
export interface GetMultiplayerServerDetailsRequest {
/** The guid string build ID of the multiplayer server to get details for. */
BuildId: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The region the multiplayer server is located in to get details for. */
Region: AzureRegion;
/** The title generated guid string session ID of the multiplayer server to get details for. This is to keep track of multiplayer server sessions. */
SessionId: string;
}
export interface GetMultiplayerServerDetailsResponse {