/// <summary> /// <para>Creates a configuration template. Templates are associated with a specific application and are used to deploy different versions of /// the application with the same configuration settings.</para> <para>Related Topics</para> /// <ul> /// <li> DescribeConfigurationOptions </li> /// <li> DescribeConfigurationSettings </li> /// <li> ListAvailableSolutionStacks </li> /// /// </ul> /// </summary> /// /// <param name="createConfigurationTemplateRequest">Container for the necessary parameters to execute the CreateConfigurationTemplate service /// method on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CreateConfigurationTemplate service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="TooManyConfigurationTemplatesException"/> public CreateConfigurationTemplateResponse CreateConfigurationTemplate(CreateConfigurationTemplateRequest createConfigurationTemplateRequest) { IAsyncResult asyncResult = invokeCreateConfigurationTemplate(createConfigurationTemplateRequest, null, null, true); return EndCreateConfigurationTemplate(asyncResult); }
IAsyncResult invokeCreateConfigurationTemplate(CreateConfigurationTemplateRequest createConfigurationTemplateRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateConfigurationTemplateRequestMarshaller().Marshall(createConfigurationTemplateRequest); var unmarshaller = CreateConfigurationTemplateResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the CreateConfigurationTemplate operation. /// <seealso cref="Amazon.ElasticBeanstalk.AmazonElasticBeanstalk.CreateConfigurationTemplate"/> /// </summary> /// /// <param name="createConfigurationTemplateRequest">Container for the necessary parameters to execute the CreateConfigurationTemplate operation /// on AmazonElasticBeanstalk.</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 /// EndCreateConfigurationTemplate operation.</returns> public IAsyncResult BeginCreateConfigurationTemplate(CreateConfigurationTemplateRequest createConfigurationTemplateRequest, AsyncCallback callback, object state) { return invokeCreateConfigurationTemplate(createConfigurationTemplateRequest, callback, state, false); }
internal CreateConfigurationTemplateResponse CreateConfigurationTemplate(CreateConfigurationTemplateRequest request) { var marshaller = new CreateConfigurationTemplateRequestMarshaller(); var unmarshaller = CreateConfigurationTemplateResponseUnmarshaller.Instance; return Invoke<CreateConfigurationTemplateRequest,CreateConfigurationTemplateResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CreateConfigurationTemplate operation. /// <seealso cref="Amazon.ElasticBeanstalk.IAmazonElasticBeanstalk"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateConfigurationTemplate 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<CreateConfigurationTemplateResponse> CreateConfigurationTemplateAsync(CreateConfigurationTemplateRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateConfigurationTemplateRequestMarshaller(); var unmarshaller = CreateConfigurationTemplateResponseUnmarshaller.Instance; return InvokeAsync<CreateConfigurationTemplateRequest,CreateConfigurationTemplateResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// <para>Creates a configuration template. Templates are associated with a specific application and are used to deploy different versions of /// the application with the same configuration settings.</para> <para>Related Topics</para> /// <ul> /// <li> DescribeConfigurationOptions </li> /// <li> DescribeConfigurationSettings </li> /// <li> ListAvailableSolutionStacks </li> /// /// </ul> /// </summary> /// /// <param name="createConfigurationTemplateRequest">Container for the necessary parameters to execute the CreateConfigurationTemplate service /// method on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CreateConfigurationTemplate service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="T:Amazon.ElasticBeanstalk.Model.InsufficientPrivilegesException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.TooManyConfigurationTemplatesException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<CreateConfigurationTemplateResponse> CreateConfigurationTemplateAsync(CreateConfigurationTemplateRequest createConfigurationTemplateRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateConfigurationTemplateRequestMarshaller(); var unmarshaller = CreateConfigurationTemplateResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreateConfigurationTemplateRequest, CreateConfigurationTemplateResponse>(createConfigurationTemplateRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>Creates a configuration template. Templates are associated with a specific application and are used to deploy different versions of /// the application with the same configuration settings.</para> <para>Related Topics</para> /// <ul> /// <li> DescribeConfigurationOptions </li> /// <li> DescribeConfigurationSettings </li> /// <li> ListAvailableSolutionStacks </li> /// /// </ul> /// </summary> /// /// <param name="createConfigurationTemplateRequest">Container for the necessary parameters to execute the CreateConfigurationTemplate service /// method on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CreateConfigurationTemplate service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="TooManyConfigurationTemplatesException"/> public CreateConfigurationTemplateResponse CreateConfigurationTemplate(CreateConfigurationTemplateRequest createConfigurationTemplateRequest) { IRequest<CreateConfigurationTemplateRequest> request = new CreateConfigurationTemplateRequestMarshaller().Marshall(createConfigurationTemplateRequest); CreateConfigurationTemplateResponse response = Invoke<CreateConfigurationTemplateRequest, CreateConfigurationTemplateResponse> (request, this.signer, CreateConfigurationTemplateResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// Initiates the asynchronous execution of the CreateConfigurationTemplate operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateConfigurationTemplate 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 EndCreateConfigurationTemplate /// operation.</returns> public IAsyncResult BeginCreateConfigurationTemplate(CreateConfigurationTemplateRequest request, AsyncCallback callback, object state) { var marshaller = new CreateConfigurationTemplateRequestMarshaller(); var unmarshaller = CreateConfigurationTemplateResponseUnmarshaller.Instance; return BeginInvoke<CreateConfigurationTemplateRequest>(request, marshaller, unmarshaller, callback, state); }
internal CreateConfigurationTemplateResponse CreateConfigurationTemplate(CreateConfigurationTemplateRequest request) { var task = CreateConfigurationTemplateAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
IAsyncResult invokeCreateConfigurationTemplate(CreateConfigurationTemplateRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new CreateConfigurationTemplateRequestMarshaller(); var unmarshaller = CreateConfigurationTemplateResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
private Amazon.ElasticBeanstalk.Model.CreateConfigurationTemplateResponse CallAWSServiceOperation(IAmazonElasticBeanstalk client, Amazon.ElasticBeanstalk.Model.CreateConfigurationTemplateRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elastic Beanstalk", "CreateConfigurationTemplate"); try { #if DESKTOP return(client.CreateConfigurationTemplate(request)); #elif CORECLR return(client.CreateConfigurationTemplateAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ElasticBeanstalk.Model.CreateConfigurationTemplateRequest(); if (cmdletContext.ApplicationName != null) { request.ApplicationName = cmdletContext.ApplicationName; } if (cmdletContext.Description != null) { request.Description = cmdletContext.Description; } if (cmdletContext.EnvironmentId != null) { request.EnvironmentId = cmdletContext.EnvironmentId; } if (cmdletContext.OptionSetting != null) { request.OptionSettings = cmdletContext.OptionSetting; } if (cmdletContext.PlatformArn != null) { request.PlatformArn = cmdletContext.PlatformArn; } if (cmdletContext.SolutionStackName != null) { request.SolutionStackName = cmdletContext.SolutionStackName; } // populate SourceConfiguration var requestSourceConfigurationIsNull = true; request.SourceConfiguration = new Amazon.ElasticBeanstalk.Model.SourceConfiguration(); System.String requestSourceConfiguration_sourceConfiguration_ApplicationName = null; if (cmdletContext.SourceConfiguration_ApplicationName != null) { requestSourceConfiguration_sourceConfiguration_ApplicationName = cmdletContext.SourceConfiguration_ApplicationName; } if (requestSourceConfiguration_sourceConfiguration_ApplicationName != null) { request.SourceConfiguration.ApplicationName = requestSourceConfiguration_sourceConfiguration_ApplicationName; requestSourceConfigurationIsNull = false; } System.String requestSourceConfiguration_sourceConfiguration_TemplateName = null; if (cmdletContext.SourceConfiguration_TemplateName != null) { requestSourceConfiguration_sourceConfiguration_TemplateName = cmdletContext.SourceConfiguration_TemplateName; } if (requestSourceConfiguration_sourceConfiguration_TemplateName != null) { request.SourceConfiguration.TemplateName = requestSourceConfiguration_sourceConfiguration_TemplateName; requestSourceConfigurationIsNull = false; } // determine if request.SourceConfiguration should be set to null if (requestSourceConfigurationIsNull) { request.SourceConfiguration = null; } if (cmdletContext.Tag != null) { request.Tags = cmdletContext.Tag; } if (cmdletContext.TemplateName != null) { request.TemplateName = cmdletContext.TemplateName; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
/// <summary> /// <para>Creates a configuration template. Templates are associated with a specific application and are used to deploy different versions of /// the application with the same configuration settings.</para> <para>Related Topics</para> /// <ul> /// <li> DescribeConfigurationOptions </li> /// <li> DescribeConfigurationSettings </li> /// <li> ListAvailableSolutionStacks </li> /// /// </ul> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateConfigurationTemplate service /// method on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CreateConfigurationTemplate service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="T:Amazon.ElasticBeanstalk.Model.InsufficientPrivilegesException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.TooManyConfigurationTemplatesException" /> public CreateConfigurationTemplateResponse CreateConfigurationTemplate(CreateConfigurationTemplateRequest request) { var task = CreateConfigurationTemplateAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// <para>Creates a configuration template. Templates are associated with a specific application and are used to deploy different versions of /// the application with the same configuration settings.</para> <para>Related Topics</para> /// <ul> /// <li> DescribeConfigurationOptions </li> /// <li> DescribeConfigurationSettings </li> /// <li> ListAvailableSolutionStacks </li> /// /// </ul> /// </summary> /// /// <param name="createConfigurationTemplateRequest">Container for the necessary parameters to execute the CreateConfigurationTemplate service /// method on AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CreateConfigurationTemplate service method, as returned by AmazonElasticBeanstalk.</returns> /// /// <exception cref="T:Amazon.ElasticBeanstalk.Model.InsufficientPrivilegesException" /> /// <exception cref="T:Amazon.ElasticBeanstalk.Model.TooManyConfigurationTemplatesException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<CreateConfigurationTemplateResponse> CreateConfigurationTemplateAsync(CreateConfigurationTemplateRequest createConfigurationTemplateRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateConfigurationTemplateRequestMarshaller(); var unmarshaller = CreateConfigurationTemplateResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CreateConfigurationTemplateRequest, CreateConfigurationTemplateResponse>(createConfigurationTemplateRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }