/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { UpdateAliasResponse response = new UpdateAliasResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Alias", targetDepth)) { var unmarshaller = AliasUnmarshaller.Instance; response.Alias = unmarshaller.Unmarshall(context); continue; } } return response; }
private static async Task <string> UpdateAlias(string aliasUpdate, string fleetId) { var config = new AmazonGameLiftConfig(); config.RegionEndpoint = region; using (AmazonGameLiftClient aglc = new AmazonGameLiftClient(config)) { // create a new alias var uareq = new Amazon.GameLift.Model.UpdateAliasRequest(); uareq.AliasId = aliasUpdate; uareq.RoutingStrategy = new RoutingStrategy { Type = RoutingStrategyType.SIMPLE, FleetId = fleetId, Message = "" }; Amazon.GameLift.Model.UpdateAliasResponse cares = await aglc.UpdateAliasAsync(uareq); return(cares.Alias.AliasId); } }