/// <summary> /// <para> Launches an environment for the specified application using the specified configuration. </para> /// </summary> /// /// <param name="createEnvironmentRequest">Container for the necessary parameters to execute the CreateEnvironment service method on /// AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CreateEnvironment service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="TooManyEnvironmentsException"/> public CreateEnvironmentResponse CreateEnvironment(CreateEnvironmentRequest createEnvironmentRequest) { IRequest <CreateEnvironmentRequest> request = new CreateEnvironmentRequestMarshaller().Marshall(createEnvironmentRequest); CreateEnvironmentResponse response = Invoke <CreateEnvironmentRequest, CreateEnvironmentResponse> (request, this.signer, CreateEnvironmentResponseUnmarshaller.GetInstance()); return(response); }
public void CreateEnvironmentMarshallTest() { var operation = service_model.FindOperation("CreateEnvironment"); var request = InstantiateClassGenerator.Execute <CreateEnvironmentRequest>(); var marshaller = new CreateEnvironmentRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateEnvironment", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" } } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = CreateEnvironmentResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateEnvironmentResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void CreateEnvironmentMarshallTest() { var operation = service_model.FindOperation("CreateEnvironment"); var request = InstantiateClassGenerator.Execute <CreateEnvironmentRequest>(); var marshaller = new CreateEnvironmentRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CreateEnvironmentResponseUnmarshaller.Instance.Unmarshall(context) as CreateEnvironmentResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
IAsyncResult invokeCreateEnvironment(CreateEnvironmentRequest createEnvironmentRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateEnvironmentRequestMarshaller().Marshall(createEnvironmentRequest); var unmarshaller = CreateEnvironmentResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the CreateEnvironment operation. /// <seealso cref="Amazon.ElasticBeanstalk.IAmazonElasticBeanstalk"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateEnvironment operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task<CreateEnvironmentResponse> CreateEnvironmentAsync(CreateEnvironmentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateEnvironmentRequestMarshaller(); var unmarshaller = CreateEnvironmentResponseUnmarshaller.Instance; return InvokeAsync<CreateEnvironmentRequest,CreateEnvironmentResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal CreateEnvironmentResponse CreateEnvironment(CreateEnvironmentRequest request) { var marshaller = new CreateEnvironmentRequestMarshaller(); var unmarshaller = CreateEnvironmentResponseUnmarshaller.Instance; return Invoke<CreateEnvironmentRequest,CreateEnvironmentResponse>(request, marshaller, unmarshaller); }
/// <summary> /// <para> Launches an environment for the specified application using the specified configuration. </para> /// </summary> /// /// <param name="createEnvironmentRequest">Container for the necessary parameters to execute the CreateEnvironment service method on /// AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CreateEnvironment service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="TooManyEnvironmentsException"/> public CreateEnvironmentResponse CreateEnvironment(CreateEnvironmentRequest createEnvironmentRequest) { IRequest<CreateEnvironmentRequest> request = new CreateEnvironmentRequestMarshaller().Marshall(createEnvironmentRequest); CreateEnvironmentResponse response = Invoke<CreateEnvironmentRequest, CreateEnvironmentResponse> (request, this.signer, CreateEnvironmentResponseUnmarshaller.GetInstance()); return response; }
public void CreateEnvironmentMarshallTest() { var operation = service_model.FindOperation("CreateEnvironment"); var request = InstantiateClassGenerator.Execute<CreateEnvironmentRequest>(); var marshaller = new CreateEnvironmentRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CreateEnvironmentResponseUnmarshaller.Instance.Unmarshall(context) as CreateEnvironmentResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// <para> Launches an environment for the specified application using the specified configuration. </para> /// </summary> /// /// <param name="createEnvironmentRequest">Container for the necessary parameters to execute the CreateEnvironment service method on /// AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CreateEnvironment service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="T:Amazon.ElasticBeanstalk.Model.TooManyEnvironmentsException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.InsufficientPrivilegesException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<CreateEnvironmentResponse> CreateEnvironmentAsync(CreateEnvironmentRequest createEnvironmentRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateEnvironmentRequestMarshaller(); var unmarshaller = CreateEnvironmentResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreateEnvironmentRequest, CreateEnvironmentResponse>(createEnvironmentRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the CreateEnvironment operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateEnvironment operation on AmazonElasticBeanstalkClient.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateEnvironment /// operation.</returns> public IAsyncResult BeginCreateEnvironment(CreateEnvironmentRequest request, AsyncCallback callback, object state) { var marshaller = new CreateEnvironmentRequestMarshaller(); var unmarshaller = CreateEnvironmentResponseUnmarshaller.Instance; return BeginInvoke<CreateEnvironmentRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeCreateEnvironment(CreateEnvironmentRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new CreateEnvironmentRequestMarshaller(); var unmarshaller = CreateEnvironmentResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
/// <summary> /// <para> Launches an environment for the specified application using the specified configuration. </para> /// </summary> /// /// <param name="createEnvironmentRequest">Container for the necessary parameters to execute the CreateEnvironment service method on /// AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CreateEnvironment service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="T:Amazon.ElasticBeanstalk.Model.TooManyEnvironmentsException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.InsufficientPrivilegesException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<CreateEnvironmentResponse> CreateEnvironmentAsync(CreateEnvironmentRequest createEnvironmentRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateEnvironmentRequestMarshaller(); var unmarshaller = CreateEnvironmentResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CreateEnvironmentRequest, CreateEnvironmentResponse>(createEnvironmentRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }