Container for the parameters to the DeregisterRdsDbInstance operation. Deregisters an Amazon RDS instance.

Required Permissions: To use this action, an IAM user must have a 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.DeregisterRdsDbInstanceRequest();

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

            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 DeregisterRdsDbInstance operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeregisterRdsDbInstance 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<DeregisterRdsDbInstanceResponse> DeregisterRdsDbInstanceAsync(DeregisterRdsDbInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeregisterRdsDbInstanceRequestMarshaller();
            var unmarshaller = DeregisterRdsDbInstanceResponseUnmarshaller.Instance;

            return InvokeAsync<DeregisterRdsDbInstanceRequest,DeregisterRdsDbInstanceResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        internal DeregisterRdsDbInstanceResponse DeregisterRdsDbInstance(DeregisterRdsDbInstanceRequest request)
        {
            var marshaller = new DeregisterRdsDbInstanceRequestMarshaller();
            var unmarshaller = DeregisterRdsDbInstanceResponseUnmarshaller.Instance;

            return Invoke<DeregisterRdsDbInstanceRequest,DeregisterRdsDbInstanceResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DeregisterRdsDbInstance operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeregisterRdsDbInstance 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 EndDeregisterRdsDbInstance
        ///         operation.</returns>
        public IAsyncResult BeginDeregisterRdsDbInstance(DeregisterRdsDbInstanceRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new DeregisterRdsDbInstanceRequestMarshaller();
            var unmarshaller = DeregisterRdsDbInstanceResponseUnmarshaller.Instance;

            return BeginInvoke<DeregisterRdsDbInstanceRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 internal DeregisterRdsDbInstanceResponse DeregisterRdsDbInstance(DeregisterRdsDbInstanceRequest request)
 {
     var task = DeregisterRdsDbInstanceAsync(request);
     try
     {
         return task.Result;
     }
     catch(AggregateException e)
     {
         ExceptionDispatchInfo.Capture(e.InnerException).Throw();
         return null;
     }
 }
        IAsyncResult invokeDeregisterRdsDbInstance(DeregisterRdsDbInstanceRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new DeregisterRdsDbInstanceRequestMarshaller();
            var unmarshaller = DeregisterRdsDbInstanceResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }
 /// <summary>
 /// Initiates the asynchronous execution of the DeregisterRdsDbInstance operation.
 /// <seealso cref="Amazon.OpsWorks.IAmazonOpsWorks"/>
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the DeregisterRdsDbInstance 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 EndDeregisterRdsDbInstance
 ///         operation.</returns>
 public IAsyncResult BeginDeregisterRdsDbInstance(DeregisterRdsDbInstanceRequest request, AsyncCallback callback, object state)
 {
     return invokeDeregisterRdsDbInstance(request, callback, state, false);
 }
 /// <summary>
 /// Deregisters an Amazon RDS instance.
 /// </summary>
 /// <param name="request">Container for the necessary parameters to execute the DeregisterRdsDbInstance service method.</param>
 /// 
 /// <returns>The response from the DeregisterRdsDbInstance 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 DeregisterRdsDbInstanceResponse DeregisterRdsDbInstance(DeregisterRdsDbInstanceRequest request)
 {
     IAsyncResult asyncResult = invokeDeregisterRdsDbInstance(request, null, null, true);
     return EndDeregisterRdsDbInstance(asyncResult);
 }
 private Amazon.OpsWorks.Model.DeregisterRdsDbInstanceResponse CallAWSServiceOperation(IAmazonOpsWorks client, Amazon.OpsWorks.Model.DeregisterRdsDbInstanceRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS OpsWorks", "DeregisterRdsDbInstance");
     try
     {
         #if DESKTOP
         return(client.DeregisterRdsDbInstance(request));
         #elif CORECLR
         return(client.DeregisterRdsDbInstanceAsync(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;
     }
 }
Example #10
0
 IAsyncResult invokeDeregisterRdsDbInstance(DeregisterRdsDbInstanceRequest request, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new DeregisterRdsDbInstanceRequestMarshaller().Marshall(request);
     var unmarshaller = DeregisterRdsDbInstanceResponseUnmarshaller.Instance;
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }