User guide
Conclusion
Congratulations! You have just completed the getting started tutorial for developing Spot Instance software
with the AWS SDK for .NET.
Amazon Glacier Programming with the AWS
SDK for .NET
The AWS SDK for .NET supports Amazon Glacier, which is a storage service optimized for infrequently
used data, or "cold data." The service provides durable and extremely low-cost storage with security
features for data archiving and backup. For more information, see Amazon Glacier.
The following information introduces you to the Amazon Glacier programming models in the SDK for
.NET.
Programming Models
The SDK for .NET provides three programming models for working with Amazon Glacier. These
programming models are known as the low-level, high-level, and resource models.The following information
describes these models, why you would want to use them, and how to use them.
Low-Level APIs
The SDK for .NET provides low-level APIs for programming with Amazon Glacier. These low-level APIs
map closely the underlying REST API supported by Amazon Glacier. For each Amazon Glacier REST
operation, the low-level APIs provide a corresponding method, a request object for you to provide request
information, and a response object for you to process the Amazon Glacier response. The low-level APIs
are the most complete implementation of the underlying Amazon Glacier operations.
The following example shows how to use the low-level APIs to list accessible vaults in Amazon Glacier:
// using Amazon.Glacier;
// using Amazon.Glacier.Model;
var client = new AmazonGlacierClient();
var request = new ListVaultsRequest();
var response = client.ListVaults(request);
foreach (var vault in response.VaultList)
{
Console.WriteLine("Vault: {0}", vault.VaultName);
Console.WriteLine(" Creation date: {0}", vault.CreationDate);
Console.WriteLine(" Size in bytes: {0}", vault.SizeInBytes);
Console.WriteLine(" Number of archives: {0}", vault.NumberOfArchives);
try
{
var requestNotifications = new GetVaultNotificationsRequest
{
VaultName = vault.VaultName
};
var responseNotifications =
client.GetVaultNotifications(requestNotifications);
Version v2.0.0
87
AWS SDK for .NET Developer Guide
Amazon Glacier