/// <summary> /// Initiates the asynchronous execution of the DescribeSecurityGroups operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeSecurityGroups 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<DescribeSecurityGroupsResponse> DescribeSecurityGroupsAsync(DescribeSecurityGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeSecurityGroupsRequestMarshaller(); var unmarshaller = DescribeSecurityGroupsResponseUnmarshaller.Instance; return InvokeAsync<DescribeSecurityGroupsRequest,DescribeSecurityGroupsResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void DescribeSecurityGroupsMarshallTest() { var operation = service_model.FindOperation("DescribeSecurityGroups"); var request = InstantiateClassGenerator.Execute<DescribeSecurityGroupsRequest>(); var marshaller = new DescribeSecurityGroupsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); UnmarshallerContext context = new EC2UnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, new WebResponseData()); var response = DescribeSecurityGroupsResponseUnmarshaller.Instance.Unmarshall(context) as DescribeSecurityGroupsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Describes one or more of your security groups. /// /// /// <para> /// A security group is for use with instances either in the EC2-Classic platform or in /// a specific VPC. For more information, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html">Amazon /// EC2 Security Groups</a> in the <i>Amazon Elastic Compute Cloud User Guide</i> and /// <a href="http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html">Security /// Groups for Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeSecurityGroups service method.</param> /// /// <returns>The response from the DescribeSecurityGroups service method, as returned by EC2.</returns> public DescribeSecurityGroupsResponse DescribeSecurityGroups(DescribeSecurityGroupsRequest request) { var marshaller = new DescribeSecurityGroupsRequestMarshaller(); var unmarshaller = DescribeSecurityGroupsResponseUnmarshaller.Instance; return Invoke<DescribeSecurityGroupsRequest,DescribeSecurityGroupsResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DescribeSecurityGroups operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeSecurityGroups operation on AmazonEC2Client.</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 EndDescribeSecurityGroups /// operation.</returns> public IAsyncResult BeginDescribeSecurityGroups(DescribeSecurityGroupsRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeSecurityGroupsRequestMarshaller(); var unmarshaller = DescribeSecurityGroupsResponseUnmarshaller.Instance; return BeginInvoke<DescribeSecurityGroupsRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeDescribeSecurityGroups(DescribeSecurityGroupsRequest describeSecurityGroupsRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DescribeSecurityGroupsRequestMarshaller().Marshall(describeSecurityGroupsRequest); var unmarshaller = DescribeSecurityGroupsResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Describes one or more of your security groups.</para> <para>A security group is for use with instances either in the EC2-Classic /// platform or in a specific VPC. For more information, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html">Amazon EC2 Security Groups</a> in the <i>Amazon /// Elastic Compute Cloud User Guide</i> and <a href="http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html">Security /// Groups for Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i> .</para> /// </summary> /// /// <param name="describeSecurityGroupsRequest">Container for the necessary parameters to execute the DescribeSecurityGroups service method on /// AmazonEC2.</param> /// /// <returns>The response from the DescribeSecurityGroups service method, as returned by AmazonEC2.</returns> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<DescribeSecurityGroupsResponse> DescribeSecurityGroupsAsync(DescribeSecurityGroupsRequest describeSecurityGroupsRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeSecurityGroupsRequestMarshaller(); var unmarshaller = DescribeSecurityGroupsResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DescribeSecurityGroupsRequest, DescribeSecurityGroupsResponse>(describeSecurityGroupsRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the DescribeSecurityGroups operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.DescribeSecurityGroups"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeSecurityGroups 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 async Task<DescribeSecurityGroupsResponse> DescribeSecurityGroupsAsync(DescribeSecurityGroupsRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeSecurityGroupsRequestMarshaller(); var unmarshaller = DescribeSecurityGroupsResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DescribeSecurityGroupsRequest, DescribeSecurityGroupsResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }