public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ElasticBeanstalk.Model.CheckDNSAvailabilityRequest(); if (cmdletContext.CNAMEPrefix != null) { request.CNAMEPrefix = cmdletContext.CNAMEPrefix; } 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> Checks if the specified CNAME is available. </para> /// </summary> /// /// <param name="checkDNSAvailabilityRequest">Container for the necessary parameters to execute the CheckDNSAvailability service method on /// AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CheckDNSAvailability service method, as returned by AmazonElasticBeanstalk.</returns> /// public CheckDNSAvailabilityResponse CheckDNSAvailability(CheckDNSAvailabilityRequest checkDNSAvailabilityRequest) { IAsyncResult asyncResult = invokeCheckDNSAvailability(checkDNSAvailabilityRequest, null, null, true); return EndCheckDNSAvailability(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the CheckDNSAvailability operation. /// <seealso cref="Amazon.ElasticBeanstalk.AmazonElasticBeanstalk.CheckDNSAvailability"/> /// </summary> /// /// <param name="checkDNSAvailabilityRequest">Container for the necessary parameters to execute the CheckDNSAvailability 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 /// EndCheckDNSAvailability operation.</returns> public IAsyncResult BeginCheckDNSAvailability(CheckDNSAvailabilityRequest checkDNSAvailabilityRequest, AsyncCallback callback, object state) { return invokeCheckDNSAvailability(checkDNSAvailabilityRequest, callback, state, false); }
IAsyncResult invokeCheckDNSAvailability(CheckDNSAvailabilityRequest checkDNSAvailabilityRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CheckDNSAvailabilityRequestMarshaller().Marshall(checkDNSAvailabilityRequest); var unmarshaller = CheckDNSAvailabilityResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
private Amazon.ElasticBeanstalk.Model.CheckDNSAvailabilityResponse CallAWSServiceOperation(IAmazonElasticBeanstalk client, Amazon.ElasticBeanstalk.Model.CheckDNSAvailabilityRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elastic Beanstalk", "CheckDNSAvailability"); try { #if DESKTOP return(client.CheckDNSAvailability(request)); #elif CORECLR return(client.CheckDNSAvailabilityAsync(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; } }
internal CheckDNSAvailabilityResponse CheckDNSAvailability(CheckDNSAvailabilityRequest request) { var marshaller = new CheckDNSAvailabilityRequestMarshaller(); var unmarshaller = CheckDNSAvailabilityResponseUnmarshaller.Instance; return Invoke<CheckDNSAvailabilityRequest,CheckDNSAvailabilityResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CheckDNSAvailability operation. /// <seealso cref="Amazon.ElasticBeanstalk.IAmazonElasticBeanstalk"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CheckDNSAvailability 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<CheckDNSAvailabilityResponse> CheckDNSAvailabilityAsync(CheckDNSAvailabilityRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CheckDNSAvailabilityRequestMarshaller(); var unmarshaller = CheckDNSAvailabilityResponseUnmarshaller.Instance; return InvokeAsync<CheckDNSAvailabilityRequest,CheckDNSAvailabilityResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// <para> Checks if the specified CNAME is available. </para> /// </summary> /// /// <param name="checkDNSAvailabilityRequest">Container for the necessary parameters to execute the CheckDNSAvailability service method on /// AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CheckDNSAvailability service method, as returned by AmazonElasticBeanstalk.</returns> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<CheckDNSAvailabilityResponse> CheckDNSAvailabilityAsync(CheckDNSAvailabilityRequest checkDNSAvailabilityRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CheckDNSAvailabilityRequestMarshaller(); var unmarshaller = CheckDNSAvailabilityResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CheckDNSAvailabilityRequest, CheckDNSAvailabilityResponse>(checkDNSAvailabilityRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para> Checks if the specified CNAME is available. </para> /// </summary> /// /// <param name="checkDNSAvailabilityRequest">Container for the necessary parameters to execute the CheckDNSAvailability service method on /// AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CheckDNSAvailability service method, as returned by AmazonElasticBeanstalk.</returns> /// public CheckDNSAvailabilityResponse CheckDNSAvailability(CheckDNSAvailabilityRequest checkDNSAvailabilityRequest) { IRequest<CheckDNSAvailabilityRequest> request = new CheckDNSAvailabilityRequestMarshaller().Marshall(checkDNSAvailabilityRequest); CheckDNSAvailabilityResponse response = Invoke<CheckDNSAvailabilityRequest, CheckDNSAvailabilityResponse> (request, this.signer, CheckDNSAvailabilityResponseUnmarshaller.GetInstance()); return response; }
internal CheckDNSAvailabilityResponse CheckDNSAvailability(CheckDNSAvailabilityRequest request) { var task = CheckDNSAvailabilityAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// Initiates the asynchronous execution of the CheckDNSAvailability operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CheckDNSAvailability 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 EndCheckDNSAvailability /// operation.</returns> public IAsyncResult BeginCheckDNSAvailability(CheckDNSAvailabilityRequest request, AsyncCallback callback, object state) { var marshaller = new CheckDNSAvailabilityRequestMarshaller(); var unmarshaller = CheckDNSAvailabilityResponseUnmarshaller.Instance; return BeginInvoke<CheckDNSAvailabilityRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeCheckDNSAvailability(CheckDNSAvailabilityRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new CheckDNSAvailabilityRequestMarshaller(); var unmarshaller = CheckDNSAvailabilityResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
/// <summary> /// <para> Checks if the specified CNAME is available. </para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CheckDNSAvailability service method on /// AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CheckDNSAvailability service method, as returned by AmazonElasticBeanstalk.</returns> public CheckDNSAvailabilityResponse CheckDNSAvailability(CheckDNSAvailabilityRequest request) { var task = CheckDNSAvailabilityAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// <para> Checks if the specified CNAME is available. </para> /// </summary> /// /// <param name="checkDNSAvailabilityRequest">Container for the necessary parameters to execute the CheckDNSAvailability service method on /// AmazonElasticBeanstalk.</param> /// /// <returns>The response from the CheckDNSAvailability service method, as returned by AmazonElasticBeanstalk.</returns> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<CheckDNSAvailabilityResponse> CheckDNSAvailabilityAsync(CheckDNSAvailabilityRequest checkDNSAvailabilityRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CheckDNSAvailabilityRequestMarshaller(); var unmarshaller = CheckDNSAvailabilityResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CheckDNSAvailabilityRequest, CheckDNSAvailabilityResponse>(checkDNSAvailabilityRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }