public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.AWSSupport.Model.DescribeTrustedAdvisorCheckResultRequest(); if (cmdletContext.CheckId != null) { request.CheckId = cmdletContext.CheckId; } 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 invokeDescribeTrustedAdvisorCheckResult(DescribeTrustedAdvisorCheckResultRequest describeTrustedAdvisorCheckResultRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DescribeTrustedAdvisorCheckResultRequestMarshaller().Marshall(describeTrustedAdvisorCheckResultRequest); var unmarshaller = DescribeTrustedAdvisorCheckResultResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the DescribeTrustedAdvisorCheckResult operation. /// <seealso cref="Amazon.AWSSupport.IAmazonAWSSupport.DescribeTrustedAdvisorCheckResult"/> /// </summary> /// /// <param name="describeTrustedAdvisorCheckResultRequest">Container for the necessary parameters to execute the /// DescribeTrustedAdvisorCheckResult 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 /// EndDescribeTrustedAdvisorCheckResult operation.</returns> public IAsyncResult BeginDescribeTrustedAdvisorCheckResult(DescribeTrustedAdvisorCheckResultRequest describeTrustedAdvisorCheckResultRequest, AsyncCallback callback, object state) { return invokeDescribeTrustedAdvisorCheckResult(describeTrustedAdvisorCheckResultRequest, callback, state, false); }
/// <summary> /// <para>Returns the results of the Trusted Advisor check that has the specified check ID. Check IDs can be obtained by calling /// DescribeTrustedAdvisorChecks.</para> <para>The response contains a TrustedAdvisorCheckResult object, which contains these three /// objects:</para> /// <ul> /// <li> TrustedAdvisorCategorySpecificSummary </li> /// <li> TrustedAdvisorResourceDetail </li> /// <li> TrustedAdvisorResourcesSummary </li> /// /// </ul> /// <para>In addition, the response contains these fields:</para> /// <ul> /// <li> <b>Status.</b> The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".</li> /// <li> <b>Timestamp.</b> The time of the last refresh of the check.</li> /// <li> <b>CheckId.</b> The unique identifier for the check.</li> /// /// </ul> /// </summary> /// /// <param name="describeTrustedAdvisorCheckResultRequest">Container for the necessary parameters to execute the /// DescribeTrustedAdvisorCheckResult service method on AmazonAWSSupport.</param> /// /// <returns>The response from the DescribeTrustedAdvisorCheckResult service method, as returned by AmazonAWSSupport.</returns> /// /// <exception cref="InternalServerErrorException"/> public DescribeTrustedAdvisorCheckResultResponse DescribeTrustedAdvisorCheckResult(DescribeTrustedAdvisorCheckResultRequest describeTrustedAdvisorCheckResultRequest) { IAsyncResult asyncResult = invokeDescribeTrustedAdvisorCheckResult(describeTrustedAdvisorCheckResultRequest, null, null, true); return EndDescribeTrustedAdvisorCheckResult(asyncResult); }
private Amazon.AWSSupport.Model.DescribeTrustedAdvisorCheckResultResponse CallAWSServiceOperation(IAmazonAWSSupport client, Amazon.AWSSupport.Model.DescribeTrustedAdvisorCheckResultRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Support", "DescribeTrustedAdvisorCheckResult"); try { #if DESKTOP return(client.DescribeTrustedAdvisorCheckResult(request)); #elif CORECLR return(client.DescribeTrustedAdvisorCheckResultAsync(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 DescribeTrustedAdvisorCheckResult operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeTrustedAdvisorCheckResult 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 EndDescribeTrustedAdvisorCheckResult /// operation.</returns> public IAsyncResult BeginDescribeTrustedAdvisorCheckResult(DescribeTrustedAdvisorCheckResultRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeTrustedAdvisorCheckResultRequestMarshaller(); var unmarshaller = DescribeTrustedAdvisorCheckResultResponseUnmarshaller.Instance; return BeginInvoke<DescribeTrustedAdvisorCheckResultRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// <para>This action responds with the results of a Trusted Advisor check. Once you have obtained the list of available Trusted Advisor checks /// by calling <a href="http://docs.aws.amazon.com/awssupport/latest/APIReference/API_DescribeTrustedAdvisorChecks.html">DescribeTrustedAdvisorChecks</a> , you specify the <i>CheckId</i> for the check you want to retrieve from AWS Support.</para> <para>The /// response for this action contains a JSON-formatted <a href="http://docs.aws.amazon.com/awssupport/latest/APIReference/API_DescribeTrustedAdvisorCheckResultResult.html">TrustedAdvisorCheckResult</a> object</para> <para>, which is a container for the following three objects:</para> <ol> <li> <a href="http://docs.aws.amazon.com/awssupport/latest/APIReference/API_TrustedAdvisorCategorySpecificSummary.html">TrustedAdvisorCategorySpecificSummary</a> </li> /// <li> <a href="http://docs.aws.amazon.com/awssupport/latest/APIReference/API_TrustedAdvisorResourceDetail.html">TrustedAdvisorResourceDetail</a> </li> /// <li> <a href="http://docs.aws.amazon.com/awssupport/latest/APIReference/API_TrustedAdvisorResourcesSummary.html">TrustedAdvisorResourcesSummary</a> </li> /// </ol> <para>In addition, the response contains the following fields:</para> <ol> <li> <b>Status</b> . Overall status of the check.</li> /// <li> <b>Timestamp</b> . Time at which Trusted Advisor last ran the check. </li> /// <li> <b>CheckId</b> . Unique identifier for the specific check returned by the request.</li> /// </ol> /// </summary> /// /// <param name="describeTrustedAdvisorCheckResultRequest">Container for the necessary parameters to execute the /// DescribeTrustedAdvisorCheckResult service method on AmazonAWSSupport.</param> /// /// <returns>The response from the DescribeTrustedAdvisorCheckResult 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<DescribeTrustedAdvisorCheckResultResponse> DescribeTrustedAdvisorCheckResultAsync(DescribeTrustedAdvisorCheckResultRequest describeTrustedAdvisorCheckResultRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeTrustedAdvisorCheckResultRequestMarshaller(); var unmarshaller = DescribeTrustedAdvisorCheckResultResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DescribeTrustedAdvisorCheckResultRequest, DescribeTrustedAdvisorCheckResultResponse>(describeTrustedAdvisorCheckResultRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// Returns the results of the Trusted Advisor check that has the specified check ID. /// Check IDs can be obtained by calling <a>DescribeTrustedAdvisorChecks</a>. /// /// /// <para> /// The response contains a <a>TrustedAdvisorCheckResult</a> object, which contains these /// three objects: /// </para> /// <ul> <li><a>TrustedAdvisorCategorySpecificSummary</a></li> <li><a>TrustedAdvisorResourceDetail</a></li> /// <li><a>TrustedAdvisorResourcesSummary</a></li> </ul> /// <para> /// In addition, the response contains these fields: /// </para> /// <ul> <li> <b>Status.</b> The alert status of the check: "ok" (green), "warning" (yellow), /// "error" (red), or "not_available".</li> <li> <b>Timestamp.</b> The time of the last /// refresh of the check.</li> <li> <b>CheckId.</b> The unique identifier for the check.</li> /// </ul> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeTrustedAdvisorCheckResult service method.</param> /// /// <returns>The response from the DescribeTrustedAdvisorCheckResult service method, as returned by AWSSupport.</returns> /// <exception cref="Amazon.AWSSupport.Model.InternalServerErrorException"> /// An internal server error occurred. /// </exception> public DescribeTrustedAdvisorCheckResultResponse DescribeTrustedAdvisorCheckResult(DescribeTrustedAdvisorCheckResultRequest request) { var marshaller = new DescribeTrustedAdvisorCheckResultRequestMarshaller(); var unmarshaller = DescribeTrustedAdvisorCheckResultResponseUnmarshaller.Instance; return Invoke<DescribeTrustedAdvisorCheckResultRequest,DescribeTrustedAdvisorCheckResultResponse>(request, marshaller, unmarshaller); }
internal DescribeTrustedAdvisorCheckResultResponse DescribeTrustedAdvisorCheckResult(DescribeTrustedAdvisorCheckResultRequest request) { var task = DescribeTrustedAdvisorCheckResultAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// Initiates the asynchronous execution of the DescribeTrustedAdvisorCheckResult operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeTrustedAdvisorCheckResult 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<DescribeTrustedAdvisorCheckResultResponse> DescribeTrustedAdvisorCheckResultAsync(DescribeTrustedAdvisorCheckResultRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeTrustedAdvisorCheckResultRequestMarshaller(); var unmarshaller = DescribeTrustedAdvisorCheckResultResponseUnmarshaller.Instance; return InvokeAsync<DescribeTrustedAdvisorCheckResultRequest,DescribeTrustedAdvisorCheckResultResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the DescribeTrustedAdvisorCheckResult operation. /// <seealso cref="Amazon.AWSSupport.IAmazonAWSSupport.DescribeTrustedAdvisorCheckResult"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeTrustedAdvisorCheckResult 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<DescribeTrustedAdvisorCheckResultResponse> DescribeTrustedAdvisorCheckResultAsync(DescribeTrustedAdvisorCheckResultRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeTrustedAdvisorCheckResultRequestMarshaller(); var unmarshaller = DescribeTrustedAdvisorCheckResultResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DescribeTrustedAdvisorCheckResultRequest, DescribeTrustedAdvisorCheckResultResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>Returns the results of the Trusted Advisor check that has the specified check ID. Check IDs can be obtained by calling /// DescribeTrustedAdvisorChecks.</para> <para>The response contains a TrustedAdvisorCheckResult object, which contains these three /// objects:</para> /// <ul> /// <li> TrustedAdvisorCategorySpecificSummary </li> /// <li> TrustedAdvisorResourceDetail </li> /// <li> TrustedAdvisorResourcesSummary </li> /// /// </ul> /// <para>In addition, the response contains these fields:</para> /// <ul> /// <li> <b>Status.</b> The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".</li> /// <li> <b>Timestamp.</b> The time of the last refresh of the check.</li> /// <li> <b>CheckId.</b> The unique identifier for the check.</li> /// /// </ul> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the /// DescribeTrustedAdvisorCheckResult service method on AmazonAWSSupport.</param> /// /// <returns>The response from the DescribeTrustedAdvisorCheckResult service method, as returned by AmazonAWSSupport.</returns> /// /// <exception cref="T:Amazon.AWSSupport.Model.InternalServerErrorException" /> public DescribeTrustedAdvisorCheckResultResponse DescribeTrustedAdvisorCheckResult(DescribeTrustedAdvisorCheckResultRequest request) { var task = DescribeTrustedAdvisorCheckResultAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
IAsyncResult invokeDescribeTrustedAdvisorCheckResult(DescribeTrustedAdvisorCheckResultRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new DescribeTrustedAdvisorCheckResultRequestMarshaller(); var unmarshaller = DescribeTrustedAdvisorCheckResultResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }