本文整理汇总了C#中DescribeSnapshotsRequestMarshaller类的典型用法代码示例。如果您正苦于以下问题:C# DescribeSnapshotsRequestMarshaller类的具体用法?C# DescribeSnapshotsRequestMarshaller怎么用?C# DescribeSnapshotsRequestMarshaller使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DescribeSnapshotsRequestMarshaller类属于命名空间,在下文中一共展示了DescribeSnapshotsRequestMarshaller类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: DescribeSnapshotsMarshallTest
public void DescribeSnapshotsMarshallTest()
{
var operation = service_model.FindOperation("DescribeSnapshots");
var request = InstantiateClassGenerator.Execute<DescribeSnapshotsRequest>();
var marshaller = new DescribeSnapshotsRequestMarshaller();
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 = DescribeSnapshotsResponseUnmarshaller.Instance.Unmarshall(context)
as DescribeSnapshotsResponse;
InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:17,代码来源:EC2MarshallingTests.cs
示例2: DescribeSnapshots
/// <summary>
/// Describes one or more of the EBS snapshots available to you. Available snapshots include
/// public snapshots available for any AWS account to launch, private snapshots that you
/// own, and private snapshots owned by another AWS account but for which you've been
/// given explicit create volume permissions.
///
///
/// <para>
/// The create volume permissions fall into the following categories:
/// </para>
/// <ul> <li> <i>public</i>: The owner of the snapshot granted create volume permissions
/// for the snapshot to the <code>all</code> group. All AWS accounts have create volume
/// permissions for these snapshots.</li> <li> <i>explicit</i>: The owner of the snapshot
/// granted create volume permissions to a specific AWS account.</li> <li> <i>implicit</i>:
/// An AWS account has implicit create volume permissions for all snapshots it owns.</li>
/// </ul>
/// <para>
/// The list of snapshots returned can be modified by specifying snapshot IDs, snapshot
/// owners, or AWS accounts with create volume permissions. If no options are specified,
/// Amazon EC2 returns all snapshots for which you have create volume permissions.
/// </para>
///
/// <para>
/// If you specify one or more snapshot IDs, only snapshots that have the specified IDs
/// are returned. If you specify an invalid snapshot ID, an error is returned. If you
/// specify a snapshot ID for which you do not have access, it is not included in the
/// returned results.
/// </para>
///
/// <para>
/// If you specify one or more snapshot owners, only snapshots from the specified owners
/// and for which you have access are returned. The results can include the AWS account
/// IDs of the specified owners, <code>amazon</code> for snapshots owned by Amazon, or
/// <code>self</code> for snapshots that you own.
/// </para>
///
/// <para>
/// If you specify a list of restorable users, only snapshots with create snapshot permissions
/// for those users are returned. You can specify AWS account IDs (if you own the snapshots),
/// <code>self</code> for snapshots for which you own or have explicit permissions, or
/// <code>all</code> for public snapshots.
/// </para>
///
/// <para>
/// If you are describing a long list of snapshots, you can paginate the output to make
/// the list more manageable. The <code>MaxResults</code> parameter sets the maximum number
/// of results returned in a single page. If the list of results exceeds your <code>MaxResults</code>
/// value, then that number of results is returned along with a <code>NextToken</code>
/// value that can be passed to a subsequent <code>DescribeSnapshots</code> request to
/// retrieve the remaining results.
/// </para>
///
/// <para>
/// For more information about EBS snapshots, see <a href='http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html'>Amazon
/// EBS Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSnapshots service method.</param>
///
/// <returns>The response from the DescribeSnapshots service method, as returned by EC2.</returns>
public DescribeSnapshotsResponse DescribeSnapshots(DescribeSnapshotsRequest request)
{
var marshaller = new DescribeSnapshotsRequestMarshaller();
var unmarshaller = DescribeSnapshotsResponseUnmarshaller.Instance;
return Invoke<DescribeSnapshotsRequest,DescribeSnapshotsResponse>(request, marshaller, unmarshaller);
}
开发者ID:reidwooten99apps,项目名称:aws-sdk-net,代码行数:67,代码来源:AmazonEC2Client.cs
示例3: DescribeSnapshotsAsync
/// <summary>
/// Initiates the asynchronous execution of the DescribeSnapshots operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeSnapshots 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<DescribeSnapshotsResponse> DescribeSnapshotsAsync(DescribeSnapshotsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = new DescribeSnapshotsRequestMarshaller();
var unmarshaller = DescribeSnapshotsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeSnapshotsRequest,DescribeSnapshotsResponse>(request, marshaller,
unmarshaller, cancellationToken);
}
开发者ID:reidwooten99apps,项目名称:aws-sdk-net,代码行数:17,代码来源:AmazonEC2Client.cs
示例4: BeginDescribeSnapshots
/// <summary>
/// Initiates the asynchronous execution of the DescribeSnapshots operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeSnapshots 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 EndDescribeSnapshots
/// operation.</returns>
public IAsyncResult BeginDescribeSnapshots(DescribeSnapshotsRequest request, AsyncCallback callback, object state)
{
var marshaller = new DescribeSnapshotsRequestMarshaller();
var unmarshaller = DescribeSnapshotsResponseUnmarshaller.Instance;
return BeginInvoke<DescribeSnapshotsRequest>(request, marshaller, unmarshaller,
callback, state);
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:19,代码来源:AmazonEC2Client.cs
示例5: DescribeSnapshotsMarshallTest
public void DescribeSnapshotsMarshallTest()
{
var request = InstantiateClassGenerator.Execute<DescribeSnapshotsRequest>();
var marshaller = new DescribeSnapshotsRequestMarshaller();
var internalRequest = marshaller.Marshall(request);
var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content);
Comparer.CompareObjectToJson<DescribeSnapshotsRequest>(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("DescribeSnapshots").ResponseStructure).Execute();
webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString());
UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse);
var response = DescribeSnapshotsResponseUnmarshaller.Instance.Unmarshall(context)
as DescribeSnapshotsResponse;
InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:23,代码来源:DirectoryServiceMarshallingTests.cs
示例6: invokeDescribeSnapshots
IAsyncResult invokeDescribeSnapshots(DescribeSnapshotsRequest describeSnapshotsRequest, AsyncCallback callback, object state, bool synchronized)
{
IRequest irequest = new DescribeSnapshotsRequestMarshaller().Marshall(describeSnapshotsRequest);
var unmarshaller = DescribeSnapshotsResponseUnmarshaller.GetInstance();
AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
Invoke(result);
return result;
}
开发者ID:rsparkyc,项目名称:aws-sdk-net,代码行数:8,代码来源:AmazonEC2Client.cs
示例7: DescribeSnapshotsAsync
/// <summary>
/// <para>Describes one or more of the Amazon EBS snapshots available to you. Available snapshots include public snapshots available for any AWS
/// account to launch, private snapshots that you own, and private snapshots owned by another AWS account but for which you've been given
/// explicit create volume permissions.</para> <para>The create volume permissions fall into the following categories:</para>
/// <ul>
/// <li> <i>public</i> : The owner of the snapshot granted create volume permissions for the snapshot to the <c>all</c> group. All AWS accounts
/// have create volume permissions for these snapshots.</li>
/// <li> <i>explicit</i> : The owner of the snapshot granted create volume permissions to a specific AWS account.</li>
/// <li> <i>implicit</i> : An AWS account has implicit create volume permissions for all snapshots it owns.</li>
///
/// </ul>
/// <para>The list of snapshots returned can be modified by specifying snapshot IDs, snapshot owners, or AWS accounts with create volume
/// permissions. If no options are specified, Amazon EC2 returns all snapshots for which you have create volume permissions.</para> <para>If you
/// specify one or more snapshot IDs, only snapshots that have the specified IDs are returned. If you specify an invalid snapshot ID, an error
/// is returned. If you specify a snapshot ID for which you do not have access, it is not included in the returned results.</para> <para>If you
/// specify one or more snapshot owners, only snapshots from the specified owners and for which you have access are returned. The results can
/// include the AWS account IDs of the specified owners, <c>amazon</c> for snapshots owned by Amazon, or <c>self</c> for snapshots that you
/// own.</para> <para>If you specify a list of restorable users, only snapshots with create snapshot permissions for those users are returned.
/// You can specify AWS account IDs (if you own the snapshots), <c>self</c> for snapshots for which you own or have explicit permissions, or
/// <c>all</c> for public snapshots.</para> <para>For more information about Amazon EBS snapshots, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html">Amazon EBS Snapshots</a> in the <i>Amazon Elastic Compute Cloud
/// User Guide</i> .</para>
/// </summary>
///
/// <param name="describeSnapshotsRequest">Container for the necessary parameters to execute the DescribeSnapshots service method on
/// AmazonEC2.</param>
///
/// <returns>The response from the DescribeSnapshots 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<DescribeSnapshotsResponse> DescribeSnapshotsAsync(DescribeSnapshotsRequest describeSnapshotsRequest, CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = new DescribeSnapshotsRequestMarshaller();
var unmarshaller = DescribeSnapshotsResponseUnmarshaller.GetInstance();
return Invoke<IRequest, DescribeSnapshotsRequest, DescribeSnapshotsResponse>(describeSnapshotsRequest, marshaller, unmarshaller, signer, cancellationToken);
}
开发者ID:virajs,项目名称:aws-sdk-net,代码行数:36,代码来源:AmazonEC2Client.cs
示例8: DescribeSnapshotsAsync
/// <summary>
/// Initiates the asynchronous execution of the DescribeSnapshots operation.
/// <seealso cref="Amazon.EC2.IAmazonEC2.DescribeSnapshots"/>
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeSnapshots 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<DescribeSnapshotsResponse> DescribeSnapshotsAsync(DescribeSnapshotsRequest request, CancellationToken cancellationToken = default(CancellationToken))
{
var marshaller = new DescribeSnapshotsRequestMarshaller();
var unmarshaller = DescribeSnapshotsResponseUnmarshaller.GetInstance();
var response = await Invoke<IRequest, DescribeSnapshotsRequest, DescribeSnapshotsResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
.ConfigureAwait(continueOnCapturedContext: false);
return response;
}
开发者ID:rinselmann,项目名称:aws-sdk-net,代码行数:18,代码来源:AmazonEC2Client.cs
注:本文中的DescribeSnapshotsRequestMarshaller类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论