public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.Redshift.Model.RevokeClusterSecurityGroupIngressRequest(); if (cmdletContext.CIDRIP != null) { request.CIDRIP = cmdletContext.CIDRIP; } if (cmdletContext.ClusterSecurityGroupName != null) { request.ClusterSecurityGroupName = cmdletContext.ClusterSecurityGroupName; } if (cmdletContext.EC2SecurityGroupName != null) { request.EC2SecurityGroupName = cmdletContext.EC2SecurityGroupName; } if (cmdletContext.EC2SecurityGroupOwnerId != null) { request.EC2SecurityGroupOwnerId = cmdletContext.EC2SecurityGroupOwnerId; } 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 invokeRevokeClusterSecurityGroupIngress(RevokeClusterSecurityGroupIngressRequest revokeClusterSecurityGroupIngressRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new RevokeClusterSecurityGroupIngressRequestMarshaller().Marshall(revokeClusterSecurityGroupIngressRequest); var unmarshaller = RevokeClusterSecurityGroupIngressResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the RevokeClusterSecurityGroupIngress operation. /// <seealso cref="Amazon.Redshift.IAmazonRedshift.RevokeClusterSecurityGroupIngress"/> /// </summary> /// /// <param name="revokeClusterSecurityGroupIngressRequest">Container for the necessary parameters to execute the /// RevokeClusterSecurityGroupIngress operation on AmazonRedshift.</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 /// EndRevokeClusterSecurityGroupIngress operation.</returns> public IAsyncResult BeginRevokeClusterSecurityGroupIngress(RevokeClusterSecurityGroupIngressRequest revokeClusterSecurityGroupIngressRequest, AsyncCallback callback, object state) { return invokeRevokeClusterSecurityGroupIngress(revokeClusterSecurityGroupIngressRequest, callback, state, false); }
/// <summary> /// <para> Revokes an ingress rule in an Amazon Redshift security group for a previously authorized IP range or Amazon EC2 security group. To /// add an ingress rule, see AuthorizeClusterSecurityGroupIngress. For information about managing security groups, go to <a /// href="http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html" >Amazon Redshift Cluster Security Groups</a> in the /// <i>Amazon Redshift Management Guide</i> . /// </para> /// </summary> /// /// <param name="revokeClusterSecurityGroupIngressRequest">Container for the necessary parameters to execute the /// RevokeClusterSecurityGroupIngress service method on AmazonRedshift.</param> /// /// <returns>The response from the RevokeClusterSecurityGroupIngress service method, as returned by AmazonRedshift.</returns> /// /// <exception cref="InvalidClusterSecurityGroupStateException"/> /// <exception cref="AuthorizationNotFoundException"/> /// <exception cref="ClusterSecurityGroupNotFoundException"/> public RevokeClusterSecurityGroupIngressResponse RevokeClusterSecurityGroupIngress(RevokeClusterSecurityGroupIngressRequest revokeClusterSecurityGroupIngressRequest) { IAsyncResult asyncResult = invokeRevokeClusterSecurityGroupIngress(revokeClusterSecurityGroupIngressRequest, null, null, true); return EndRevokeClusterSecurityGroupIngress(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the RevokeClusterSecurityGroupIngress operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RevokeClusterSecurityGroupIngress operation on AmazonRedshiftClient.</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 EndRevokeClusterSecurityGroupIngress /// operation.</returns> public IAsyncResult BeginRevokeClusterSecurityGroupIngress(RevokeClusterSecurityGroupIngressRequest request, AsyncCallback callback, object state) { var marshaller = new RevokeClusterSecurityGroupIngressRequestMarshaller(); var unmarshaller = RevokeClusterSecurityGroupIngressResponseUnmarshaller.Instance; return BeginInvoke<RevokeClusterSecurityGroupIngressRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Revokes an ingress rule in an Amazon Redshift security group for a previously authorized /// IP range or Amazon EC2 security group. To add an ingress rule, see <a>AuthorizeClusterSecurityGroupIngress</a>. /// For information about managing security groups, go to <a href="http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html">Amazon /// Redshift Cluster Security Groups</a> in the <i>Amazon Redshift Cluster Management /// Guide</i>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the RevokeClusterSecurityGroupIngress service method.</param> /// /// <returns>The response from the RevokeClusterSecurityGroupIngress service method, as returned by Redshift.</returns> /// <exception cref="Amazon.Redshift.Model.AuthorizationNotFoundException"> /// The specified CIDR IP range or EC2 security group is not authorized for the specified /// cluster security group. /// </exception> /// <exception cref="Amazon.Redshift.Model.ClusterSecurityGroupNotFoundException"> /// The cluster security group name does not refer to an existing cluster security group. /// </exception> /// <exception cref="Amazon.Redshift.Model.InvalidClusterSecurityGroupStateException"> /// The state of the cluster security group is not <code>available</code>. /// </exception> public RevokeClusterSecurityGroupIngressResponse RevokeClusterSecurityGroupIngress(RevokeClusterSecurityGroupIngressRequest request) { var marshaller = new RevokeClusterSecurityGroupIngressRequestMarshaller(); var unmarshaller = RevokeClusterSecurityGroupIngressResponseUnmarshaller.Instance; return Invoke<RevokeClusterSecurityGroupIngressRequest,RevokeClusterSecurityGroupIngressResponse>(request, marshaller, unmarshaller); }
/// <summary> /// <para> Revokes an ingress rule in an Amazon Redshift security group for a previously authorized IP range or Amazon EC2 security group. To /// add an ingress rule, see AuthorizeClusterSecurityGroupIngress. For information about managing security groups, go to <a href="http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html">Amazon Redshift Cluster Security Groups</a> in the /// <i>Amazon Redshift Management Guide</i> . /// </para> /// </summary> /// /// <param name="revokeClusterSecurityGroupIngressRequest">Container for the necessary parameters to execute the /// RevokeClusterSecurityGroupIngress service method on AmazonRedshift.</param> /// /// <returns>The response from the RevokeClusterSecurityGroupIngress service method, as returned by AmazonRedshift.</returns> /// /// <exception cref="T:Amazon.Redshift.Model.InvalidClusterSecurityGroupStateException" /> /// <exception cref="T:Amazon.Redshift.Model.AuthorizationNotFoundException" /> /// <exception cref="T:Amazon.Redshift.Model.ClusterSecurityGroupNotFoundException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<RevokeClusterSecurityGroupIngressResponse> RevokeClusterSecurityGroupIngressAsync(RevokeClusterSecurityGroupIngressRequest revokeClusterSecurityGroupIngressRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RevokeClusterSecurityGroupIngressRequestMarshaller(); var unmarshaller = RevokeClusterSecurityGroupIngressResponseUnmarshaller.GetInstance(); return Invoke<IRequest, RevokeClusterSecurityGroupIngressRequest, RevokeClusterSecurityGroupIngressResponse>(revokeClusterSecurityGroupIngressRequest, marshaller, unmarshaller, signer, cancellationToken); }
internal RevokeClusterSecurityGroupIngressResponse RevokeClusterSecurityGroupIngress(RevokeClusterSecurityGroupIngressRequest request) { var task = RevokeClusterSecurityGroupIngressAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// <para> Revokes an ingress rule in an Amazon Redshift security group for a previously authorized IP range or Amazon EC2 security group. To /// add an ingress rule, see AuthorizeClusterSecurityGroupIngress. For information about managing security groups, go to <a href="http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html">Amazon Redshift Cluster Security Groups</a> in the /// <i>Amazon Redshift Management Guide</i> . /// </para> /// </summary> /// /// <param name="revokeClusterSecurityGroupIngressRequest">Container for the necessary parameters to execute the /// RevokeClusterSecurityGroupIngress service method on AmazonRedshift.</param> /// /// <returns>The response from the RevokeClusterSecurityGroupIngress service method, as returned by AmazonRedshift.</returns> /// /// <exception cref="T:Amazon.Redshift.Model.InvalidClusterSecurityGroupStateException" /> /// <exception cref="T:Amazon.Redshift.Model.AuthorizationNotFoundException" /> /// <exception cref="T:Amazon.Redshift.Model.ClusterSecurityGroupNotFoundException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<RevokeClusterSecurityGroupIngressResponse> RevokeClusterSecurityGroupIngressAsync(RevokeClusterSecurityGroupIngressRequest revokeClusterSecurityGroupIngressRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RevokeClusterSecurityGroupIngressRequestMarshaller(); var unmarshaller = RevokeClusterSecurityGroupIngressResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, RevokeClusterSecurityGroupIngressRequest, RevokeClusterSecurityGroupIngressResponse>(revokeClusterSecurityGroupIngressRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
internal RevokeClusterSecurityGroupIngressResponse RevokeClusterSecurityGroupIngress(RevokeClusterSecurityGroupIngressRequest request) { var task = RevokeClusterSecurityGroupIngressAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// Initiates the asynchronous execution of the RevokeClusterSecurityGroupIngress operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RevokeClusterSecurityGroupIngress 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<RevokeClusterSecurityGroupIngressResponse> RevokeClusterSecurityGroupIngressAsync(RevokeClusterSecurityGroupIngressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RevokeClusterSecurityGroupIngressRequestMarshaller(); var unmarshaller = RevokeClusterSecurityGroupIngressResponseUnmarshaller.Instance; return InvokeAsync<RevokeClusterSecurityGroupIngressRequest,RevokeClusterSecurityGroupIngressResponse>(request, marshaller, unmarshaller, cancellationToken); }
IAsyncResult invokeRevokeClusterSecurityGroupIngress(RevokeClusterSecurityGroupIngressRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new RevokeClusterSecurityGroupIngressRequestMarshaller(); var unmarshaller = RevokeClusterSecurityGroupIngressResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
private Amazon.Redshift.Model.RevokeClusterSecurityGroupIngressResponse CallAWSServiceOperation(IAmazonRedshift client, Amazon.Redshift.Model.RevokeClusterSecurityGroupIngressRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Redshift", "RevokeClusterSecurityGroupIngress"); try { #if DESKTOP return(client.RevokeClusterSecurityGroupIngress(request)); #elif CORECLR return(client.RevokeClusterSecurityGroupIngressAsync(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; } }