本文整理汇总了C#中DescribeAccountAttributesRequestMarshaller类的典型用法代码示例。如果您正苦于以下问题:C# DescribeAccountAttributesRequestMarshaller类的具体用法?C# DescribeAccountAttributesRequestMarshaller怎么用?C# DescribeAccountAttributesRequestMarshaller使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DescribeAccountAttributesRequestMarshaller类属于命名空间,在下文中一共展示了DescribeAccountAttributesRequestMarshaller类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DescribeAccountAttributesMarshallTest
public void DescribeAccountAttributesMarshallTest()
{
var operation = service_model.FindOperation("DescribeAccountAttributes");
var request = InstantiateClassGenerator.Execute<DescribeAccountAttributesRequest>();
var marshaller = new DescribeAccountAttributesRequestMarshaller();
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 = DescribeAccountAttributesResponseUnmarshaller.Instance.Unmarshall(context)
as DescribeAccountAttributesResponse;
InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
}
示例2: DescribeAccountAttributes
/// <summary>
/// Describes attributes of your AWS account. The following are the supported account
/// attributes:
///
/// <ul> <li>
/// <para>
/// <code>supported-platforms</code>: Indicates whether your account can launch instances
/// into EC2-Classic and EC2-VPC, or only into EC2-VPC.
/// </para>
/// </li> <li>
/// <para>
/// <code>default-vpc</code>: The ID of the default VPC for your account, or <code>none</code>.
/// </para>
/// </li> <li>
/// <para>
/// <code>max-instances</code>: The maximum number of On-Demand instances that you can
/// run.
/// </para>
/// </li> <li>
/// <para>
/// <code>vpc-max-security-groups-per-interface</code>: The maximum number of security
/// groups that you can assign to a network interface.
/// </para>
/// </li> <li>
/// <para>
/// <code>max-elastic-ips</code>: The maximum number of Elastic IP addresses that you
/// can allocate for use with EC2-Classic.
/// </para>
/// </li> <li>
/// <para>
/// <code>vpc-max-elastic-ips</code>: The maximum number of Elastic IP addresses that
/// you can allocate for use with EC2-VPC.
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeAccountAttributes service method.</param>
///
/// <returns>The response from the DescribeAccountAttributes service method, as returned by EC2.</returns>
public DescribeAccountAttributesResponse DescribeAccountAttributes(DescribeAccountAttributesRequest request)
{
var marshaller = new DescribeAccountAttributesRequestMarshaller();
var unmarshaller = DescribeAccountAttributesResponseUnmarshaller.Instance;
return Invoke<DescribeAccountAttributesRequest,DescribeAccountAttributesResponse>(request, marshaller, unmarshaller);
}
示例3: DescribeAccountAttributesAsync
/// <summary>
/// Initiates the asynchronous execution of the DescribeAccountAttributes operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeAccountAttributes 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<DescribeAccountAttributesResponse> DescribeAccountAttributesAsync(DescribeAccountAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = new DescribeAccountAttributesRequestMarshaller();
var unmarshaller = DescribeAccountAttributesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeAccountAttributesRequest,DescribeAccountAttributesResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
示例4: BeginDescribeAccountAttributes
/// <summary>
/// Initiates the asynchronous execution of the DescribeAccountAttributes operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeAccountAttributes 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 EndDescribeAccountAttributes
/// operation.</returns>
public IAsyncResult BeginDescribeAccountAttributes(DescribeAccountAttributesRequest request, AsyncCallback callback, object state)
{
var marshaller = new DescribeAccountAttributesRequestMarshaller();
var unmarshaller = DescribeAccountAttributesResponseUnmarshaller.Instance;
return BeginInvoke<DescribeAccountAttributesRequest>(request, marshaller, unmarshaller,
callback, state);
}
示例5: invokeDescribeAccountAttributes
IAsyncResult invokeDescribeAccountAttributes(DescribeAccountAttributesRequest describeAccountAttributesRequest, AsyncCallback callback, object state, bool synchronized)
{
IRequest irequest = new DescribeAccountAttributesRequestMarshaller().Marshall(describeAccountAttributesRequest);
var unmarshaller = DescribeAccountAttributesResponseUnmarshaller.GetInstance();
AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
Invoke(result);
return result;
}
示例6: DescribeAccountAttributesAsync
/// <summary>
/// <para>Describes the specified attribute of your AWS account.</para>
/// </summary>
///
/// <param name="describeAccountAttributesRequest">Container for the necessary parameters to execute the DescribeAccountAttributes service
/// method on AmazonEC2.</param>
///
/// <returns>The response from the DescribeAccountAttributes 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<DescribeAccountAttributesResponse> DescribeAccountAttributesAsync(DescribeAccountAttributesRequest describeAccountAttributesRequest, CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = new DescribeAccountAttributesRequestMarshaller();
var unmarshaller = DescribeAccountAttributesResponseUnmarshaller.GetInstance();
return Invoke<IRequest, DescribeAccountAttributesRequest, DescribeAccountAttributesResponse>(describeAccountAttributesRequest, marshaller, unmarshaller, signer, cancellationToken);
}
示例7: DescribeAccountAttributesAsync
/// <summary>
/// Initiates the asynchronous execution of the DescribeAccountAttributes operation.
/// <seealso cref="Amazon.EC2.IAmazonEC2.DescribeAccountAttributes"/>
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeAccountAttributes 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<DescribeAccountAttributesResponse> DescribeAccountAttributesAsync(DescribeAccountAttributesRequest request, CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = new DescribeAccountAttributesRequestMarshaller();
var unmarshaller = DescribeAccountAttributesResponseUnmarshaller.GetInstance();
var response = await Invoke<IRequest, DescribeAccountAttributesRequest, DescribeAccountAttributesResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
.ConfigureAwait(continueOnCapturedContext: false);
return response;
}
示例8: DescribeAccountAttributesMarshallTest
public void DescribeAccountAttributesMarshallTest()
{
var request = InstantiateClassGenerator.Execute<DescribeAccountAttributesRequest>();
var marshaller = new DescribeAccountAttributesRequestMarshaller();
var internalRequest = marshaller.Marshall(request);
var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content);
Comparer.CompareObjectToJson<DescribeAccountAttributesRequest>(request,jsonRequest);
var webResponse = new WebResponseData
{
Headers = {
{"x-amzn-RequestId", Guid.NewGuid().ToString()},
{"x-amz-crc32","0"}
}
};
var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("DescribeAccountAttributes").ResponseStructure).Execute();
webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString());
UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse);
var response = DescribeAccountAttributesResponseUnmarshaller.Instance.Unmarshall(context)
as DescribeAccountAttributesResponse;
InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
}