/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateAliasResponse response = new CreateAliasResponse(); return response; }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateAliasResponse response = new CreateAliasResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Alias", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Alias = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DirectoryId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DirectoryId = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateAliasResponse response = new CreateAliasResponse(); return(response); }
public static CreateAliasResponse Unmarshall(UnmarshallerContext context) { CreateAliasResponse createAliasResponse = new CreateAliasResponse(); createAliasResponse.HttpResponse = context.HttpResponse; createAliasResponse.RequestId = context.StringValue("CreateAlias.RequestId"); return(createAliasResponse); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateAliasResponse response = new CreateAliasResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AliasArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AliasArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FunctionVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.FunctionVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RevisionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RevisionId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RoutingConfig", targetDepth)) { var unmarshaller = AliasRoutingConfigurationUnmarshaller.Instance; response.RoutingConfig = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Creates an alias that points to the specified Lambda function version. /// </summary> /// <param name="functionName">The name of an AWS Lambda function.</param> /// <param name="settings">The <see cref="AliasSettings"/> used during the request to AWS.</param> /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> public async Task <bool> CreateAlias(string functionName, AliasSettings settings, CancellationToken cancellationToken = default(CancellationToken)) { if (String.IsNullOrEmpty(functionName)) { throw new ArgumentNullException(nameof(functionName)); } // Create Request AmazonLambdaClient client = this.CreateClient(settings); CreateAliasRequest request = new CreateAliasRequest() { Name = settings.Name, FunctionName = functionName, FunctionVersion = settings.Version, Description = settings.Description }; // Check Response CreateAliasResponse response = await client.CreateAliasAsync(request, cancellationToken); if (response.HttpStatusCode == HttpStatusCode.OK) { _Log.Verbose("Successfully published function '{0}'", functionName); return(true); } else { _Log.Error("Failed to published function '{0}'", functionName); return(false); } }
public async Task <IActionResult> CreateVisaAliasAsync([FromBody] CreateAliasRequest request) { CreateAliasResponse response = await _AcbaVisaAliasService.CreateVisaAliasAsync(request); return(Ok(response)); }