Container for the parameters to the DescribeRdsDbInstances operation. Describes Amazon RDS instances.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Inheritance: AmazonOpsWorksRequest
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.OpsWorks.Model.DescribeRdsDbInstancesRequest();

            if (cmdletContext.RdsDbInstanceArn != null)
            {
                request.RdsDbInstanceArns = cmdletContext.RdsDbInstanceArn;
            }
            if (cmdletContext.StackId != null)
            {
                request.StackId = cmdletContext.StackId;
            }

            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 DescribeRdsDbInstances operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeRdsDbInstances 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<DescribeRdsDbInstancesResponse> DescribeRdsDbInstancesAsync(DescribeRdsDbInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DescribeRdsDbInstancesRequestMarshaller();
            var unmarshaller = DescribeRdsDbInstancesResponseUnmarshaller.Instance;

            return InvokeAsync<DescribeRdsDbInstancesRequest,DescribeRdsDbInstancesResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        internal DescribeRdsDbInstancesResponse DescribeRdsDbInstances(DescribeRdsDbInstancesRequest request)
        {
            var marshaller = new DescribeRdsDbInstancesRequestMarshaller();
            var unmarshaller = DescribeRdsDbInstancesResponseUnmarshaller.Instance;

            return Invoke<DescribeRdsDbInstancesRequest,DescribeRdsDbInstancesResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeRdsDbInstances operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeRdsDbInstances operation on AmazonOpsWorksClient.</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 EndDescribeRdsDbInstances
        ///         operation.</returns>
        public IAsyncResult BeginDescribeRdsDbInstances(DescribeRdsDbInstancesRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new DescribeRdsDbInstancesRequestMarshaller();
            var unmarshaller = DescribeRdsDbInstancesResponseUnmarshaller.Instance;

            return BeginInvoke<DescribeRdsDbInstancesRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 private Amazon.OpsWorks.Model.DescribeRdsDbInstancesResponse CallAWSServiceOperation(IAmazonOpsWorks client, Amazon.OpsWorks.Model.DescribeRdsDbInstancesRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS OpsWorks", "DescribeRdsDbInstances");
     try
     {
         #if DESKTOP
         return(client.DescribeRdsDbInstances(request));
         #elif CORECLR
         return(client.DescribeRdsDbInstancesAsync(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 DescribeRdsDbInstancesResponse DescribeRdsDbInstances(DescribeRdsDbInstancesRequest request)
 {
     var task = DescribeRdsDbInstancesAsync(request);
     try
     {
         return task.Result;
     }
     catch(AggregateException e)
     {
         ExceptionDispatchInfo.Capture(e.InnerException).Throw();
         return null;
     }
 }
        IAsyncResult invokeDescribeRdsDbInstances(DescribeRdsDbInstancesRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new DescribeRdsDbInstancesRequestMarshaller();
            var unmarshaller = DescribeRdsDbInstancesResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }
 /// <summary>
 /// Initiates the asynchronous execution of the DescribeRdsDbInstances operation.
 /// <seealso cref="Amazon.OpsWorks.IAmazonOpsWorks"/>
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the DescribeRdsDbInstances operation on AmazonOpsWorksClient.</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 EndDescribeRdsDbInstances
 ///         operation.</returns>
 public IAsyncResult BeginDescribeRdsDbInstances(DescribeRdsDbInstancesRequest request, AsyncCallback callback, object state)
 {
     return invokeDescribeRdsDbInstances(request, callback, state, false);
 }
 /// <summary>
 /// Describes Amazon RDS instances.
 /// </summary>
 /// <param name="request">Container for the necessary parameters to execute the DescribeRdsDbInstances service method.</param>
 /// 
 /// <returns>The response from the DescribeRdsDbInstances service method, as returned by OpsWorks.</returns>
 /// <exception cref="ResourceNotFoundException">
 /// Indicates that a resource was not found.
 /// </exception>
 /// <exception cref="ValidationException">
 /// Indicates that a request was invalid.
 /// </exception>
 public DescribeRdsDbInstancesResponse DescribeRdsDbInstances(DescribeRdsDbInstancesRequest request)
 {
     IAsyncResult asyncResult = invokeDescribeRdsDbInstances(request, null, null, true);
     return EndDescribeRdsDbInstances(asyncResult);
 }
Exemple #10
0
 IAsyncResult invokeDescribeRdsDbInstances(DescribeRdsDbInstancesRequest request, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new DescribeRdsDbInstancesRequestMarshaller().Marshall(request);
     var unmarshaller = DescribeRdsDbInstancesResponseUnmarshaller.Instance;
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }