public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.RDS.Model.DescribeEventCategoriesRequest(); if (cmdletContext.Filter != null) { request.Filters = cmdletContext.Filter; } if (cmdletContext.SourceType != null) { request.SourceType = cmdletContext.SourceType; } 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> /// Initiates the asynchronous execution of the DescribeEventCategories operation. /// <seealso cref="Amazon.RDS.AmazonRDS.DescribeEventCategories"/> /// </summary> /// /// <param name="describeEventCategoriesRequest">Container for the necessary parameters to execute the DescribeEventCategories operation on /// AmazonRDS.</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 /// EndDescribeEventCategories operation.</returns> public IAsyncResult BeginDescribeEventCategories(DescribeEventCategoriesRequest describeEventCategoriesRequest, AsyncCallback callback, object state) { return invokeDescribeEventCategories(describeEventCategoriesRequest, callback, state, false); }
IAsyncResult invokeDescribeEventCategories(DescribeEventCategoriesRequest describeEventCategoriesRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DescribeEventCategoriesRequestMarshaller().Marshall(describeEventCategoriesRequest); var unmarshaller = DescribeEventCategoriesResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Displays a list of categories for all event source types, or, if specified, for a specified source type. You can see a list of the /// event categories and source types in the Events topic in the Amazon RDS User Guide.</para> /// </summary> /// /// <param name="describeEventCategoriesRequest">Container for the necessary parameters to execute the DescribeEventCategories service method on /// AmazonRDS.</param> /// /// <returns>The response from the DescribeEventCategories service method, as returned by AmazonRDS.</returns> /// public DescribeEventCategoriesResponse DescribeEventCategories(DescribeEventCategoriesRequest describeEventCategoriesRequest) { IAsyncResult asyncResult = invokeDescribeEventCategories(describeEventCategoriesRequest, null, null, true); return EndDescribeEventCategories(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the DescribeEventCategories operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeEventCategories 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<DescribeEventCategoriesResponse> DescribeEventCategoriesAsync(DescribeEventCategoriesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeEventCategoriesRequestMarshaller(); var unmarshaller = DescribeEventCategoriesResponseUnmarshaller.Instance; return InvokeAsync<DescribeEventCategoriesRequest,DescribeEventCategoriesResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Displays a list of categories for all event source types, or, if specified, for a /// specified source type. You can see a list of the event categories and source types /// in the <a href="http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html"> /// Events</a> topic in the <i>Amazon RDS User Guide.</i> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeEventCategories service method.</param> /// /// <returns>The response from the DescribeEventCategories service method, as returned by RDS.</returns> public DescribeEventCategoriesResponse DescribeEventCategories(DescribeEventCategoriesRequest request) { var marshaller = new DescribeEventCategoriesRequestMarshaller(); var unmarshaller = DescribeEventCategoriesResponseUnmarshaller.Instance; return Invoke<DescribeEventCategoriesRequest,DescribeEventCategoriesResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DescribeEventCategories operation. /// <seealso cref="Amazon.RDS.IAmazonRDS.DescribeEventCategories"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeEventCategories 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<DescribeEventCategoriesResponse> DescribeEventCategoriesAsync(DescribeEventCategoriesRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeEventCategoriesRequestMarshaller(); var unmarshaller = DescribeEventCategoriesResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DescribeEventCategoriesRequest, DescribeEventCategoriesResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>Displays a list of categories for all event source types, or, if specified, for a specified source type. You can see a list of the /// event categories and source types in the <a href="http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html"> Events</a> topic /// in the Amazon RDS User Guide.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeEventCategories service method on /// AmazonRDS.</param> /// /// <returns>The response from the DescribeEventCategories service method, as returned by AmazonRDS.</returns> public DescribeEventCategoriesResponse DescribeEventCategories(DescribeEventCategoriesRequest request) { var task = DescribeEventCategoriesAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
private Amazon.RDS.Model.DescribeEventCategoriesResponse CallAWSServiceOperation(IAmazonRDS client, Amazon.RDS.Model.DescribeEventCategoriesRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Relational Database Service", "DescribeEventCategories"); try { #if DESKTOP return(client.DescribeEventCategories(request)); #elif CORECLR return(client.DescribeEventCategoriesAsync(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>Displays a list of categories for all event source types, or, if specified, for a specified source type. You can see a list of the /// event categories and source types in the <a href="http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html"> Events</a> topic /// in the Amazon RDS User Guide.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeEventCategories service method on /// AmazonRDS.</param> /// /// <returns>The response from the DescribeEventCategories service method, as returned by AmazonRDS.</returns> public DescribeEventCategoriesResponse DescribeEventCategories(DescribeEventCategoriesRequest request) { var task = DescribeEventCategoriesAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// <para>Displays a list of categories for all event source types, or, if specified, for a specified source type. You can see a list of the /// event categories and source types in the <a href="http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html"> Events</a> topic /// in the Amazon RDS User Guide.</para> /// </summary> /// /// <param name="describeEventCategoriesRequest">Container for the necessary parameters to execute the DescribeEventCategories service method on /// AmazonRDS.</param> /// /// <returns>The response from the DescribeEventCategories service method, as returned by AmazonRDS.</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<DescribeEventCategoriesResponse> DescribeEventCategoriesAsync(DescribeEventCategoriesRequest describeEventCategoriesRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeEventCategoriesRequestMarshaller(); var unmarshaller = DescribeEventCategoriesResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DescribeEventCategoriesRequest, DescribeEventCategoriesResponse>(describeEventCategoriesRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// Initiates the asynchronous execution of the DescribeEventCategories operation. /// <seealso cref="Amazon.RDS.IAmazonRDS"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeEventCategories operation on AmazonRDSClient.</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 EndDescribeEventCategories /// operation.</returns> public IAsyncResult BeginDescribeEventCategories(DescribeEventCategoriesRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeEventCategoriesRequestMarshaller(); var unmarshaller = DescribeEventCategoriesResponseUnmarshaller.Instance; return BeginInvoke<DescribeEventCategoriesRequest>(request, marshaller, unmarshaller, callback, state); }