Exemplo n.º 1
0
        static async Task <string> CreateAlias(string name, string fleetId)
        {
            var config = new AmazonGameLiftConfig();

            config.RegionEndpoint = region;
            using (AmazonGameLiftClient aglc = new AmazonGameLiftClient(config))
            {
                // create fleet
                var careq = new Amazon.GameLift.Model.CreateAliasRequest();
                careq.Name            = name;
                careq.Description     = "Alias to direct traffic to " + fleetId;
                careq.RoutingStrategy = new RoutingStrategy
                {
                    Type    = RoutingStrategyType.SIMPLE,
                    FleetId = fleetId,
                    Message = ""
                };
                Amazon.GameLift.Model.CreateAliasResponse cares = await aglc.CreateAliasAsync(careq);

                return(cares.Alias.AliasId);
            }
        }