public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.AWSSupport.Model.RefreshTrustedAdvisorCheckRequest(); if (cmdletContext.CheckId != null) { request.CheckId = cmdletContext.CheckId; } 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 invokeRefreshTrustedAdvisorCheck(RefreshTrustedAdvisorCheckRequest refreshTrustedAdvisorCheckRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new RefreshTrustedAdvisorCheckRequestMarshaller().Marshall(refreshTrustedAdvisorCheckRequest); var unmarshaller = RefreshTrustedAdvisorCheckResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the RefreshTrustedAdvisorCheck operation. /// <seealso cref="Amazon.AWSSupport.IAmazonAWSSupport.RefreshTrustedAdvisorCheck"/> /// </summary> /// /// <param name="refreshTrustedAdvisorCheckRequest">Container for the necessary parameters to execute the RefreshTrustedAdvisorCheck 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 /// EndRefreshTrustedAdvisorCheck operation.</returns> public IAsyncResult BeginRefreshTrustedAdvisorCheck(RefreshTrustedAdvisorCheckRequest refreshTrustedAdvisorCheckRequest, AsyncCallback callback, object state) { return invokeRefreshTrustedAdvisorCheck(refreshTrustedAdvisorCheckRequest, callback, state, false); }
/// <summary> /// <para>Requests a refresh 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 RefreshTrustedAdvisorCheckResult object, which contains these /// fields:</para> /// <ul> /// <li> <b>Status.</b> The refresh status of the check: "none", "enqueued", "processing", "success", or "abandoned".</li> /// <li> <b>MillisUntilNextRefreshable.</b> The amount of time, in milliseconds, until the check is eligible for refresh.</li> /// <li> <b>CheckId.</b> The unique identifier for the check.</li> /// /// </ul> /// </summary> /// /// <param name="refreshTrustedAdvisorCheckRequest">Container for the necessary parameters to execute the RefreshTrustedAdvisorCheck service /// method on AmazonAWSSupport.</param> /// /// <returns>The response from the RefreshTrustedAdvisorCheck service method, as returned by AmazonAWSSupport.</returns> /// /// <exception cref="InternalServerErrorException"/> public RefreshTrustedAdvisorCheckResponse RefreshTrustedAdvisorCheck(RefreshTrustedAdvisorCheckRequest refreshTrustedAdvisorCheckRequest) { IAsyncResult asyncResult = invokeRefreshTrustedAdvisorCheck(refreshTrustedAdvisorCheckRequest, null, null, true); return EndRefreshTrustedAdvisorCheck(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the RefreshTrustedAdvisorCheck operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RefreshTrustedAdvisorCheck 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 EndRefreshTrustedAdvisorCheck /// operation.</returns> public IAsyncResult BeginRefreshTrustedAdvisorCheck(RefreshTrustedAdvisorCheckRequest request, AsyncCallback callback, object state) { var marshaller = new RefreshTrustedAdvisorCheckRequestMarshaller(); var unmarshaller = RefreshTrustedAdvisorCheckResponseUnmarshaller.Instance; return BeginInvoke<RefreshTrustedAdvisorCheckRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Requests a refresh 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>TrustedAdvisorCheckRefreshStatus</a> object, which contains /// these fields: /// </para> /// <ul> <li> <b>Status.</b> The refresh status of the check: "none", "enqueued", "processing", /// "success", or "abandoned".</li> <li> <b>MillisUntilNextRefreshable.</b> The amount /// of time, in milliseconds, until the check is eligible for refresh.</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 RefreshTrustedAdvisorCheck service method.</param> /// /// <returns>The response from the RefreshTrustedAdvisorCheck service method, as returned by AWSSupport.</returns> /// <exception cref="Amazon.AWSSupport.Model.InternalServerErrorException"> /// An internal server error occurred. /// </exception> public RefreshTrustedAdvisorCheckResponse RefreshTrustedAdvisorCheck(RefreshTrustedAdvisorCheckRequest request) { var marshaller = new RefreshTrustedAdvisorCheckRequestMarshaller(); var unmarshaller = RefreshTrustedAdvisorCheckResponseUnmarshaller.Instance; return Invoke<RefreshTrustedAdvisorCheckRequest,RefreshTrustedAdvisorCheckResponse>(request, marshaller, unmarshaller); }
private Amazon.AWSSupport.Model.RefreshTrustedAdvisorCheckResponse CallAWSServiceOperation(IAmazonAWSSupport client, Amazon.AWSSupport.Model.RefreshTrustedAdvisorCheckRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Support", "RefreshTrustedAdvisorCheck"); try { #if DESKTOP return(client.RefreshTrustedAdvisorCheck(request)); #elif CORECLR return(client.RefreshTrustedAdvisorCheckAsync(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> /// <para>This action enables you to query the service to request a refresh for a specific Trusted Advisor check. Your request body contains a /// <i>CheckId</i> for which you are querying. The response body contains a <a href="http://docs.aws.amazon.com/awssupport/latest/APIReference/API_RefreshTrustedAdvisorCheckResult.html">RefreshTrustedAdvisorCheckResult</a> object containing <i>Status</i> and <i>TimeUntilNextRefresh</i> fields.</para> /// </summary> /// /// <param name="refreshTrustedAdvisorCheckRequest">Container for the necessary parameters to execute the RefreshTrustedAdvisorCheck service /// method on AmazonAWSSupport.</param> /// /// <returns>The response from the RefreshTrustedAdvisorCheck 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<RefreshTrustedAdvisorCheckResponse> RefreshTrustedAdvisorCheckAsync(RefreshTrustedAdvisorCheckRequest refreshTrustedAdvisorCheckRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RefreshTrustedAdvisorCheckRequestMarshaller(); var unmarshaller = RefreshTrustedAdvisorCheckResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, RefreshTrustedAdvisorCheckRequest, RefreshTrustedAdvisorCheckResponse>(refreshTrustedAdvisorCheckRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
internal RefreshTrustedAdvisorCheckResponse RefreshTrustedAdvisorCheck(RefreshTrustedAdvisorCheckRequest request) { var task = RefreshTrustedAdvisorCheckAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// Initiates the asynchronous execution of the RefreshTrustedAdvisorCheck operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RefreshTrustedAdvisorCheck 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<RefreshTrustedAdvisorCheckResponse> RefreshTrustedAdvisorCheckAsync(RefreshTrustedAdvisorCheckRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RefreshTrustedAdvisorCheckRequestMarshaller(); var unmarshaller = RefreshTrustedAdvisorCheckResponseUnmarshaller.Instance; return InvokeAsync<RefreshTrustedAdvisorCheckRequest,RefreshTrustedAdvisorCheckResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the RefreshTrustedAdvisorCheck operation. /// <seealso cref="Amazon.AWSSupport.IAmazonAWSSupport.RefreshTrustedAdvisorCheck"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RefreshTrustedAdvisorCheck 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<RefreshTrustedAdvisorCheckResponse> RefreshTrustedAdvisorCheckAsync(RefreshTrustedAdvisorCheckRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RefreshTrustedAdvisorCheckRequestMarshaller(); var unmarshaller = RefreshTrustedAdvisorCheckResponseUnmarshaller.GetInstance(); return Invoke<IRequest, RefreshTrustedAdvisorCheckRequest, RefreshTrustedAdvisorCheckResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>Requests a refresh 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 RefreshTrustedAdvisorCheckResult object, which contains these /// fields:</para> /// <ul> /// <li> <b>Status.</b> The refresh status of the check: "none", "enqueued", "processing", "success", or "abandoned".</li> /// <li> <b>MillisUntilNextRefreshable.</b> The amount of time, in milliseconds, until the check is eligible for refresh.</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 RefreshTrustedAdvisorCheck service /// method on AmazonAWSSupport.</param> /// /// <returns>The response from the RefreshTrustedAdvisorCheck service method, as returned by AmazonAWSSupport.</returns> /// /// <exception cref="T:Amazon.AWSSupport.Model.InternalServerErrorException" /> public RefreshTrustedAdvisorCheckResponse RefreshTrustedAdvisorCheck(RefreshTrustedAdvisorCheckRequest request) { var task = RefreshTrustedAdvisorCheckAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
IAsyncResult invokeRefreshTrustedAdvisorCheck(RefreshTrustedAdvisorCheckRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new RefreshTrustedAdvisorCheckRequestMarshaller(); var unmarshaller = RefreshTrustedAdvisorCheckResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }