public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.AWSSupport.Model.DescribeSeverityLevelsRequest(); if (cmdletContext.Language != null) { request.Language = cmdletContext.Language; } 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); }
IAsyncResult invokeDescribeSeverityLevels(DescribeSeverityLevelsRequest describeSeverityLevelsRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DescribeSeverityLevelsRequestMarshaller().Marshall(describeSeverityLevelsRequest); var unmarshaller = DescribeSeverityLevelsResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the DescribeSeverityLevels operation. /// <seealso cref="Amazon.AWSSupport.IAmazonAWSSupport.DescribeSeverityLevels"/> /// </summary> /// /// <param name="describeSeverityLevelsRequest">Container for the necessary parameters to execute the DescribeSeverityLevels operation on /// AmazonAWSSupport.</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 /// EndDescribeSeverityLevels operation.</returns> public IAsyncResult BeginDescribeSeverityLevels(DescribeSeverityLevelsRequest describeSeverityLevelsRequest, AsyncCallback callback, object state) { return invokeDescribeSeverityLevels(describeSeverityLevelsRequest, callback, state, false); }
/// <summary> /// <para>Returns the list of severity levels that you can assign to an AWS Support case. The severity level for a case is also a field in the /// CaseDetails data type included in any CreateCase request. </para> /// </summary> /// /// <param name="describeSeverityLevelsRequest">Container for the necessary parameters to execute the DescribeSeverityLevels service method on /// AmazonAWSSupport.</param> /// /// <returns>The response from the DescribeSeverityLevels service method, as returned by AmazonAWSSupport.</returns> /// /// <exception cref="InternalServerErrorException"/> public DescribeSeverityLevelsResponse DescribeSeverityLevels(DescribeSeverityLevelsRequest describeSeverityLevelsRequest) { IAsyncResult asyncResult = invokeDescribeSeverityLevels(describeSeverityLevelsRequest, null, null, true); return EndDescribeSeverityLevels(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the DescribeSeverityLevels operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeSeverityLevels operation on AmazonAWSSupportClient.</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 EndDescribeSeverityLevels /// operation.</returns> public IAsyncResult BeginDescribeSeverityLevels(DescribeSeverityLevelsRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeSeverityLevelsRequestMarshaller(); var unmarshaller = DescribeSeverityLevelsResponseUnmarshaller.Instance; return BeginInvoke<DescribeSeverityLevelsRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Returns the list of severity levels that you can assign to an AWS Support case. The /// severity level for a case is also a field in the <a>CaseDetails</a> data type included /// in any <a>CreateCase</a> request. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeSeverityLevels service method.</param> /// /// <returns>The response from the DescribeSeverityLevels service method, as returned by AWSSupport.</returns> /// <exception cref="Amazon.AWSSupport.Model.InternalServerErrorException"> /// An internal server error occurred. /// </exception> public DescribeSeverityLevelsResponse DescribeSeverityLevels(DescribeSeverityLevelsRequest request) { var marshaller = new DescribeSeverityLevelsRequestMarshaller(); var unmarshaller = DescribeSeverityLevelsResponseUnmarshaller.Instance; return Invoke<DescribeSeverityLevelsRequest,DescribeSeverityLevelsResponse>(request, marshaller, unmarshaller); }
/// <summary> /// <para>This action returns the list of severity levels that you can assign to an AWS Support case. The severity level for a case is also a /// field in the <a href="http://docs.aws.amazon.com/awssupport/latest/APIReference/API_CaseDetails.html">CaseDetails</a> data type included in /// any <a href="http://docs.aws.amazon.com/awssupport/latest/APIReference/API_CreateCase.html">CreateCase</a> request. </para> /// </summary> /// /// <param name="describeSeverityLevelsRequest">Container for the necessary parameters to execute the DescribeSeverityLevels service method on /// AmazonAWSSupport.</param> /// /// <returns>The response from the DescribeSeverityLevels service method, as returned by AmazonAWSSupport.</returns> /// /// <exception cref="T:Amazon.AWSSupport.Model.InternalServerErrorException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<DescribeSeverityLevelsResponse> DescribeSeverityLevelsAsync(DescribeSeverityLevelsRequest describeSeverityLevelsRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeSeverityLevelsRequestMarshaller(); var unmarshaller = DescribeSeverityLevelsResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DescribeSeverityLevelsRequest, DescribeSeverityLevelsResponse>(describeSeverityLevelsRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
internal DescribeSeverityLevelsResponse DescribeSeverityLevels(DescribeSeverityLevelsRequest request) { var task = DescribeSeverityLevelsAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
private Amazon.AWSSupport.Model.DescribeSeverityLevelsResponse CallAWSServiceOperation(IAmazonAWSSupport client, Amazon.AWSSupport.Model.DescribeSeverityLevelsRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Support", "DescribeSeverityLevels"); try { #if DESKTOP return(client.DescribeSeverityLevels(request)); #elif CORECLR return(client.DescribeSeverityLevelsAsync(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; } }
/// <summary> /// Initiates the asynchronous execution of the DescribeSeverityLevels operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeSeverityLevels 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<DescribeSeverityLevelsResponse> DescribeSeverityLevelsAsync(DescribeSeverityLevelsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeSeverityLevelsRequestMarshaller(); var unmarshaller = DescribeSeverityLevelsResponseUnmarshaller.Instance; return InvokeAsync<DescribeSeverityLevelsRequest,DescribeSeverityLevelsResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the DescribeSeverityLevels operation. /// <seealso cref="Amazon.AWSSupport.IAmazonAWSSupport.DescribeSeverityLevels"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeSeverityLevels 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<DescribeSeverityLevelsResponse> DescribeSeverityLevelsAsync(DescribeSeverityLevelsRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeSeverityLevelsRequestMarshaller(); var unmarshaller = DescribeSeverityLevelsResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DescribeSeverityLevelsRequest, DescribeSeverityLevelsResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>Returns the list of severity levels that you can assign to an AWS Support case. The severity level for a case is also a field in the /// CaseDetails data type included in any CreateCase request. </para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeSeverityLevels service method on /// AmazonAWSSupport.</param> /// /// <returns>The response from the DescribeSeverityLevels service method, as returned by AmazonAWSSupport.</returns> /// /// <exception cref="T:Amazon.AWSSupport.Model.InternalServerErrorException" /> public DescribeSeverityLevelsResponse DescribeSeverityLevels(DescribeSeverityLevelsRequest request) { var task = DescribeSeverityLevelsAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
IAsyncResult invokeDescribeSeverityLevels(DescribeSeverityLevelsRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new DescribeSeverityLevelsRequestMarshaller(); var unmarshaller = DescribeSeverityLevelsResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }