Amazon AWS SDK Guide de l'utilisateur Page 1

Naviguer en ligne ou télécharger Guide de l'utilisateur pour Logiciel Amazon AWS SDK. Amazon AWS SDK User guide [en] [es] Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 155
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs

Résumé du contenu

Page 1 - AWS SDK for .NET

AWS SDK for .NETDeveloper GuideVersion v2.0.0

Page 2

3. Use the AWS Access Credentials dialog box to configure your application.• Specify which account profile your code should use to access AWS.To use a

Page 3 - Table of Contents

{ Console.WriteLine(" {0}", accessKey.Id); }}Get Group InformationThe following example displays information about an existing grou

Page 4

} Console.WriteLine(" Users:"); foreach (var user in group.GetUsers()) { Console.WriteLine(" {0}", user.Name); }}Get

Page 5 - AWS SDK for .NET Developer

Console.WriteLine(" Policies:"); foreach (var policy in role.GetPolicies()) { Console.WriteLine(" {0}", policy.Name);

Page 6 - About Amazon Web Services

Console.WriteLine("Group 'DemoGroup' already exists.");}Create a RoleThe following example creates a new role and then confirms

Page 7 - To sign up for an AWS account

var action = new ActionIdentifier("sts:AssumeRole"); var actions = new List<ActionIdentifier>(); actions.Add(action); var princip

Page 8 - Install the AWS SDK for .NET

}catch (NoSuchEntityException){ Console.WriteLine("Group 'DemoGroup' or " + "user 'DemoUser' does not exist.&qu

Page 9 - Start a New Project

"Statement" : [ { "Sid" : "ListDeploymentsStatement", "Effect" : "Allow",

Page 10

group.CreatePolicy(policyDoc, "ListDeploymentConfigsPolicy"); Console.WriteLine("Policies for group {0}:", group.Name); foreac

Page 11

statements.Add(statement); var policy = new Policy { Id = "ListDeploymentConfigsPolicy", Version = "2012-10-17", Stat

Page 12 - Programming with the AWS SDK

"Version" : "2012-10-17", "Id" : "DemoEC2Permissions", "Statement" : [ { &quo

Page 13 - Configuring AWS Credentials

NoteAlthough using the appSettings element is still supported, we recommend that you moveto using the aws element instead, for example:<configurati

Page 14 - Using the SDK Store

var iam = new IdentityManagementService();try{ var user = iam.GetUserByName("DemoUser"); var accessKey = user.CreateAccessKey(); Console.

Page 15 - Using a Credentials File

// using Amazon.IdentityManagement;// using Amazon.IdentityManagement.Model; var client = new AmazonIdentityManagementServiceClient();var request = ne

Page 16 - Specifying a Profile

Tutorial: Grant Access Using an IAM Role and theAWS SDK for .NETAll requests to AWS must be cryptographically signed using credentials issued by AWS.

Page 17 - AWS Region Selection

namespace s3.amazon.com.docsamples.retrieveobject{ class S3Sample { static string bucketName = "bucket-name"; static string keyName

Page 18

If the program fails, ensure that you are using credentials that provide you with access to the bucket.5. (Optional) Transfer the sample program to a

Page 19

NoteAlternatively, connect using the Toolkit for Visual Studio (as described in Connecting to anAmazon EC2 Instance in the AWS Toolkit for Visual Stud

Page 20

Amazon Route 53 Programming with the AWSSDK for .NETThe AWS SDK for .NET supports Amazon Route 53, which is a highly available and scalable DomainName

Page 21

using System;using System.Collections.Generic;using System.Threading;using Amazon;using Amazon.Route53;using Amazon.Route53.Model;namespace Route53_Re

Page 22

ChangeBatch = changeBatch }; ChangeResourceRecordSetsResponse recordsetResponse = route53Cli ent.ChangeResourceRecordSets(recordsetR

Page 23 - Allowed Elements

• CallerReference – (Required) An arbitrary user-defined string that serves as a request IDand can be used to retry failed requests.If you run this ap

Page 24 - Elements Reference

Programming with the AWS SDKfor .NETThis section provides general information for developing software with the AWS SDK for .NET.For information about

Page 25

2. Pass the ChangeResourceRecordSetsRequest object to the client object'sChangeResourceRecordSets method. It returns a ChangeResourceRecordSetsRe

Page 26

• Specifying Server-Side Encryption with Customer-Provided Encryption KeysAmazon Simple Notification ServiceProgramming with the AWS SDK for .NETThe A

Page 27

{ Console.WriteLine(" {0}", sub.SubscriptionArn); } } var attrs = client.GetTopicAttributes( new GetTopicAtt

Page 28

if (topic.Attributes.Count > 0) { Console.WriteLine(" Attributes:"); foreach (var attr in topic.Attributes) {

Page 29

• Creating and Using an Amazon SQS Queue (p. 121)Programming ModelsThe SDK for .NET provides two programming models for working with Amazon SQS.These

Page 30 - Asynchronous API for .NET 3.5

Resource APIsThe SDK for .NET provides the AWS Resource APIs for .NET for programming with Amazon SQS.Theseresource APIs provide a resource-level prog

Page 31 - Examples

Create an Amazon SQS ClientYou will need an Amazon SQS client in order to create and use an Amazon SQS queue. Before configuringyour client, you shoul

Page 32 - Simple Callback

Create an Amazon SQS QueueYou can use the AWS SDK for .NET to programmatically create an Amazon SQS queue. Creating anAmazon SQS Queue is an administr

Page 33 - Callback with State Object

Send an Amazon SQS MessageYou can use the Amazon SDK for .NET to send a message to an Amazon SQS queue.ImportantDue to the distributed nature of the q

Page 34 - Complete Sample

2. Pass the request object as a parameter to the ReceiveMessage method, as follows:ReceiveMessageResponse receiveMessageResponse = amazonSQSClient.

Page 35

Another way to configure an application is to edit the appSettings element in the project's App.configor Web.config file.The following example sp

Page 36

DeleteMessageResponse response = amazonSQSClient.DeleteMessage(deleteMessageRequest);Calling DeleteMessage unconditionally removes the message fro

Page 37

Re-sourcesDescriptionServiceSeeAWSCloud-Form-a-tionPro-gram-ming (p.45)SeealsoAmazon.Cloud-Form-a-tion,Amazon.Cloud-Form-a-tion.Mod-el,andAmazon.Cloud

Page 38 - What's Different

Re-sourcesDescriptionServiceSeeAmazon.CloudHSMandAmazon.CloudHSM.Mod-elSecure cryptographic key storage through hardwaresecurity modules (HSMs) in the

Page 39 - Breaking Changes

Re-sourcesDescriptionServiceSeeAmazonCog-nitoCre-den-tialsPro-viderandCach-ingAmazonCog-nitoIden-tityIDsSeealsoAmazon.Cog-nitoIden-tity,Amazon.Cog-nit

Page 40 - Configuring the AWS Region

Re-sourcesDescriptionServiceSeeAmazon.Data-PipelineandAmazon.Data-Pipeline.Mod-elOrchestration for data-driven workflowsAWS Data PipelineSeeAmazon.Dir

Page 41 - Response and Result Classes

Re-sourcesDescriptionServiceSeeDy-namoDBPro-gram-ming (p.46)andEn-hance-mentstotheDy-namoDBSDKSeealsoAmazon.Dy-namoD-Bv2,Amazon.Dy-namoD-Bv2.DataMod-e

Page 42 - AWS SDK for Windows Phone 8

Re-sourcesDescriptionServiceSee:• AmazonEC2Pro-gram-ming (p.68)• IAMRolesforAmazonEC2In-stances• Im-port-ingVMIm-agesandVolumeswithPower-ShellandC#See

Page 43 - NuGet from Solution Explorer

Re-sourcesDescriptionServiceSeeUs-ingtheElast-iC-acheClusterCli-entfor.NETandUtil-iz-ingAmazonElast-iC-acheAutoDis-cov-eryin.NETThroughEn-yimSeealsoAm

Page 44 - NuGet Package Manager Console

Re-sourcesDescriptionServiceSeeCre-at-ingandDe-ploy-ingElast-icBean-stalkAp-plic-a-tionsin.NETUs-ingAWSToolkitforVisu-alStu-dioSeealsoAmazon.Elast-ic-

Page 45 - Programming AWS Services with

Re-sourcesDescriptionServiceSeeAmazon.Elast-ic-Load-Bal-an-cingandAmazon.Elast-ic-Load-Bal-an-cing.Mod-elDistribute incoming application traffic acros

Page 46

IAM credentials are easier to revoke if they are compromised and you can apply a policy to each userthat restricts them to a specified set of resource

Page 47

Re-sourcesDescriptionServiceSeeAmazonGla-ci-erPro-gram-ming (p.87)SeealsoAmazon.Gla-ci-er,Amazon.Gla-ci-er.Mod-el,andAmazon.Gla-ci-er.Trans-ferArchive

Page 48

Re-sourcesDescriptionServiceAccess control and key managementAWS Identity and Access Management (IAM)Version v2.0.0137AWS SDK for .NET Developer Guide

Page 49

Re-sourcesDescriptionServiceSee:• IAMPro-gram-ming (p.91)• Us-ingIAMUsers• IAMCre-den-tialRo-ta-tionSeealsoAmazon.Iden-tity-Man-age-mentandAmazon.Iden

Page 50

Re-sourcesDescriptionServiceandAmazon.Se-cur-ity-Token.Mod-elSeeAmazon.Im-por-tEx-portandAmazon.Im-por-tEx-port.Mod-elTransferring data between the AW

Page 51

Re-sourcesDescriptionServiceSeeAmazon.OpsWorksandAmazon.OpsWorks.Mod-elDevOps application management serviceAWS OpsWorksSeeAmazon.RDSandAmazon.RDS.Mod

Page 52

Re-sourcesDescriptionServiceScalable storage in the cloudAmazon Simple Storage Service (Amazon S3)Version v2.0.0141AWS SDK for .NET Developer GuideAdd

Page 53

Re-sourcesDescriptionServiceSee:• AmazonS3Pro-gram-ming (p.116)• TheThreeDif-fer-entAPIsforAmazonS3• AmazonS3Li-fe-cycleMan-age-ment• Work-ingwithAmaz

Page 54 - Document

Re-sourcesDescriptionServiceS3• AmazonS3Trans-ferUtil-ityforWin-dowsStoreandWin-dowsPhoneSeealsoAmazon.S3,Amazon.S3.En-cryp-tion,Amazon.S3.IO,Amazon.S

Page 55 - Object Persistence

Re-sourcesDescriptionServiceSeeSend-inganEmailThroughtheAmazonSESSMTPIn-ter-facewithC#andSend-inganEmailThroughAmazonSESSeealsoAmazon.Sim-pleE-mailand

Page 56

Re-sourcesDescriptionServiceSeeAmazonSNSPro-gram-ming (p.117)SeealsoAmazon.Sim-pleN-o-ti-fic-a-tion-Ser-vice,Amazon.Sim-pleN-o-ti-fic-a-tion-Ser-vice.

Page 57 - Sample Data

Using a Credentials FileYou can also store profiles in a credentials file, which can also be used by the other AWS SDKS, theAWS CLI, and AWS Tools for

Page 58

Re-sourcesDescriptionServiceSee:• AmazonSQSPro-gram-ming (p.119)• Sub-scrib-inganSQSQueuetoanSNSTop-ic• Us-ingAmazonSQSDeadLet-terQueuesSeealsoAmazon.

Page 59

Re-sourcesDescriptionServiceSee:• Find-ingSnap-shots• De-let-ingSnap-shots• Up-dat-ingGate-wayBand-widthRateLim-its• Up-dat-ingGate-way-VTLBand-widthR

Page 60 - Primary Key

Re-sourcesDescriptionAreaSeeAmazon.AWS-Sup-portandAmazon.AWS-Sup-port.Mod-elProgrammatic access to AWS Support cases andTrusted Advisor featuresAWS Su

Page 61

Additional ResourcesHome Page for AWS SDK for .NETFor more information about the AWS SDK for .NET, go to the home page for the SDK at http://aws.amazo

Page 62 - Print an Item

Document HistoryThe following table describes the important changes since the last release of the AWS SDK for .NETDeveloper Guide.Last documentation u

Page 63

Release DateDescriptionChangeDecember 16, 2014The Programming with AWS Services (p. 41) section ofthe Table of Contents was reorganized to group topic

Page 64

Specifying a ProfileProfiles are the preferred way to use credentials in an application running locally.You can store profilesin the SDK Store or in t

Page 65

Although you can reference a profile programmatically by usingAmazon.Runtime.StoredProfileAWSCredentials, we recommend that you use the aws elementins

Page 66

AmazonEC2Config config = new AmazonEC2Config();config.ServiceURL = "https://us-east-1.amazonaws.com";Amazon.Runtime.AWSCredentials credentia

Page 67

<aws endpointDefinition="c:\config\endpoints.xml""/>Alternatively, you can set the AWSEndpointDefinition key in the <appSettin

Page 68

AWS SDK for .NET: Developer GuideCopyright © 2015 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.The following are trademarks of

Page 69 - DynamoDB

<logging logMetrics="true"/>Alternatively, set the AWSLogMetrics key in the <appSettings> section:<add key="AWSLogMetric

Page 70

AWSConfigs.ResponseLogging = ResponseLoggingOption.OnError;Changes to this setting take effect immediately.AWS.DynamoDBContext.TableNamePrefixConfigur

Page 71 - Web.config Options

To set Signature Version 4 signing for Amazon S3 in the .config file, the recommended approachis to set the useSignatureVersion4 attribute of the s3 e

Page 72

• Allowed Elements (p. 19)• Elements Reference (p. 20)Declaring an AWS Settings SectionYou specify AWS settings in an App.config or Web.config file fr

Page 73

toTable="string value" /> <map type="NameSpace.Class, Assembly" targetTable="string value&qu

Page 74 - Creating a Security Group

• toTable — The to-table portion of the from-table to to-table mapping. (This attribute maps to theAmazon.Util.TableAlias.ToTable property in the AWS

Page 75

</aws>...dynamoDBThe dynamoDB element represents a collection of settings for Amazon DynamoDB. This element caninclude the conversionSchema attr

Page 76

from the Amazon.AWSConfigs.EC2Config.UseSignatureVersion4 property in the AWS SDK for.NET.)The parent of the ec2 element is the aws (p. 21) element.Th

Page 77 - Enumerating Your Key Pairs

...<logging logTo="SystemDiagnostics" logResponses="OnError" logMetrics="true" logMetricsFormat="JSON"

Page 78 - Launching an EC2 Instance

The parent of the property element is the map (p. 24) element.The property element contains no child elements.The following is an example of the prope

Page 79

Table of ContentsAWS SDK for .NET Developer Guide ... 1Ho

Page 80

...<s3 useSignatureVersion4="true" />...Amazon Web Services Asynchronous APIs for.NETTopics• Asynchronous API for .NET 4.5, Windows S

Page 81

PutItemResponse PutItem( PutItemRequest putItemRequest)Asynchronous MethodIAsyncResult BeginPutItem( GetSessionTokenRequest getSessionTokenRequest,A

Page 82

// // You will need to use your own bucket name below in order // to run this sample code. // PutObjectRequest request = new PutObjectRequest {

Page 83

Callback with ClientThis example assumes that the following callback function has been defined.public static void CallbackWithClient(IAsyncResult asyn

Page 84 - Prerequisites

PutObjectResponse response = state.Client.EndPutObject(asyncResult); Console.WriteLine("Finished PutObject. Elapsed time: {0}",

Page 85

public DateTime Start { get { return startTime; } set { startTime = value; } } } class Program { public sta

Page 86

catch (AmazonS3Exception s3Exception) { // // Code to process exception // } } public stat

Page 87

request.Key = "Item2"; asyncResult = client.BeginPutObject(request, SimpleCallback, null); request.Key = "Item

Page 88

• Updated names for classes and properties to follow .NET conventionsWhat's DifferentArchitectureThe AWS SDK for .NET uses a common runtime libra

Page 89

TransferUtilityUploadRequest uploadRequest = new TransferUtilityUploadRequest() { BucketName = "my-bucket", Key = "test", FilePat

Page 90

Amazon Simple Notification Service (Amazon SNS) ... 117Programming Models ...

Page 91

As a result, many of the exception properties have changed; the XML property is no longer provided,for example.Amazon Redshift• The ClusterVersion.Nam

Page 92

<configuration> <appSettings> <add key="AWSProfileName" value="profile_name"/> <add key="AWSRegio

Page 93 - High-Level APIs

AWS SDK for .NET Framework 4.5The version of the SDK for .NET compiled against .NET Framework 4.5 supports the same set of servicesas version 1 of SDK

Page 94

• IO NamespaceAlso, the Windows Phone 8 version of the SDK does not support decryption of the Windows passwordusing the GetDecryptedPassword method.In

Page 95

NuGet Package Manager ConsoleTo use NuGet from the Package Manager Console within Visual Studio:• Visual Studio 2010 – From the Tools menu, select Lib

Page 96

Programming AWS Services withthe AWS SDK for .NETThe following concepts, tutorials, and examples demonstrate how to use the AWS SDK for .NET to workwi

Page 97

CautionThe AWS Resource APIs for .NET are currently provided as a preview. This means that theseresource APIs may frequently change in response to cus

Page 98 - Get User Account Information

var response = client.CreateUser(request); Console.WriteLine("User Name = '{0}', ARN = '{1}'", response.User.User

Page 99

Note that after unzipping, there will be three files: AWSSDK.dll, AWSSDK.pdb, and AWSSDK.xml.To enable robust debugging and help within Visual Studio,

Page 100 - Get Group Information

AWS CloudFormation Programming with theAWS SDK for .NETThe AWS SDK for .NET supports AWS CloudFormation, which creates and provision AWS infrastructur

Page 101 - Get Role Information

AWS SDK for .NET DeveloperGuideThe AWS SDK for .NET is a single downloadable package that includes Visual Studio project templates,the AWS .NET librar

Page 102 - Create a Group

For related API reference information, see Amazon.CloudFormation andAmazon.CloudFormation.Model in the AWS SDK for .NET API Reference.Resource APIsThe

Page 103 - Create a Role

• Using Expressions with DynamoDB (p. 52)• JSON Support in Amazon DynamoDB (p. 63)• Managing ASP.NET Session State with Amazon DynamoDB (p. 65)Program

Page 104 - Add a User Account to a Group

// "HASH" = hash key, "RANGE" = range key. KeyType = "HASH" }, new KeySchemaElement { Attribute

Page 105

}} while (status != TableStatus.ACTIVE);In the preceding example, the target table to check is referenced through the AmazonDynamoDBClientclass&apos

Page 106 - Add a Policy to a Group

DocumentThe document programming model provides an easier way to work with data in DynamoDB.This modelis specifically intended for accessing tables an

Page 107

int id = item["Id"].AsInt();Or, you could simply perform an explicit cast here by using (int):int id = (int)item["Id"];For more in

Page 108 - Add a Policy to a Role

context.Save(item);In the preceding example, the item is inserted through the DynamoDBContext class's Save method,which takes an initialized inst

Page 109

Topics• Sample Data (p. 53)• Get a Single Item by Using Expressions and the Item's Primary Key (p. 56)• Get Multiple Items by Using Expressions a

Page 110 - Create an Instance Profile

"N": "1" }, "RelatedItems": { "NS": [ "341", "472", "649"

Page 111

"S": "301 description" }, "BicycleType": { "S": "Road" }, "Brand": { "S

Page 112

Programming with the AWS SDK for .NET (p. 8)The basics of how to implement applications with the SDK for .NET that applies to all AWS services.This ch

Page 113 - To test the sample code

} ] }, "ProductReviews": { "M": { "FiveStar": { "SS": [ "My daughter r

Page 114 - Create an IAM Role

Get Multiple Items by Using Expressions and the Table'sPrimary KeyThe following example features the Amazon.DynamoDBv2.AmazonDynamoDBClient.Query

Page 115

Get Multiple Items by Using Expressions and Other ItemAttributesThe following example features the Amazon.DynamoDBv2.AmazonDynamoDBClient.Scan methoda

Page 116 - SDK for .NET

foreach (KeyValuePair<string, AttributeValue> kvp in attrs) { Console.Write(kvp.Key + " = "); PrintValue(kvp.Value); }}// Wr

Page 117

else if (value.SS.Count > 0) { Console.Write("{0}", string.Join("\n", value.SS.ToArray())); } // Otherwise, boolean val

Page 118 - To create a hosted zone

// using Amazon.DynamoDBv2.Model;// Provides a sample item that can be added to a table.public static Dictionary<string, AttributeValue> CreateI

Page 119

// using Amazon.DynamoDBv2;// using Amazon.DynamoDBv2.Model;var client = new AmazonDynamoDBClient();var request = new UpdateItemRequest{ TableName =

Page 120 - To monitor update status

In the preceding example, the ExpressionAttributeNames property specifies the placeholder #titleto represent the Title attribute.The ExpressionAttribu

Page 121 - Programming Models

Console.WriteLine(jsonPrettyText);// Output:// {// "Name" : "Shadow",// "Type" : "Horse",// &quo

Page 122 - Resource APIs

Additional ResourcesFor additional information and examples of programming JSON with DynamoDB with the SDK for .NET,see:• DynamoDB JSON Support• Amazo

Page 123

Getting Started with the AWS SDKfor .NETTo get started with the AWS SDK for .NET, complete the following tasks:Tasks• Create an AWS Account and Creden

Page 124

NoteFor now, you can leave the provisioned throughput settings at their minimum values of 1read capacity unit and 1 write capacity unit. This will all

Page 125

/> </providers></sessionState>The profile represents the AWS credentials that are used to communicate with DynamoDB to storea

Page 126 - Create an Amazon SQS Client

Security ConsiderationsOnce the DynamoDB table is created and the application is configured, sessions can be used as withany other session provider.As

Page 127 - Amazon SQS Queue URLs

The sample code in this tutorial is written in C#, but you can use the AWS SDK for .NET with any compatiblelanguage.The AWS SDK for .NET installs a se

Page 128 - Send an Amazon SQS Message

Enumerating Your Security GroupsYou can enumerate your security groups and check whether a particular security group exists.To enumerate your security

Page 129

To create a security group for EC2-ClassicCreate and initialize a CreateSecurityGroupRequest object. Assign a name and description to theGroupName and

Page 130

Adding Rules to Your Security GroupUse the following procedure to add a rule to allow inbound traffic on TCP port 3389 (RDP). This enablesyou to conne

Page 131

4. Pass the request object to the AuthorizeSecurityGroupIngress method, which returns anAuthorizeSecurityGroupIngressResponse object.var ingressRespon

Page 132

This example saves the private key in the current directory, using the name of the key pair as the basefile name of the .pem file.if (myKeyPair == nul

Page 133

SecurityGroupIds = groups};ImageIdThe ID of the AMI. For a list of public AMIs provided by Amazon, see Amazon Machine Images.InstanceTypeAn instan

Page 134

The preferred approach for handling credentials is to create a profile for each set of credentials in theSDK Store.You can create and manage profiles

Page 135

InstanceProfile = instanceProfile3. Launch the instances by passing the request object to the RunInstances method. Save the IDs ofthe instances, as yo

Page 136

string amiID = "ami-e189c8d1";string keyPairName = "my-sample-key";var launchRequest = new RunInstancesRequest(){ ImageId = ami

Page 137

var instanceProfile = new IamInstanceProfile();instanceProfile.Id = "winapp-instance-role-1";instanceProfile.Arn = "arn:aws:iam::4444-

Page 138

List<Instance> runningInstances = statusResponse.DescribeInstancesResult.Re servation[0].Instance;foreach (Instance instance in runningInstances

Page 139

Tutorial: Amazon EC2 Spot InstancesOverviewSpot Instances enable you to bid on unused Amazon EC2 capacity and run any instances that you acquirefor as

Page 140

Step 1: Setting Up Your CredentialsTo begin using this code sample, you need to populate the App.config file with your AWS credentials,which identify

Page 141 - DescriptionService

computer. If your connection to the Internet is mediated by a firewall or some other type of proxy, you willneed to determine the external IP address

Page 142

three common strategies: bid to ensure cost is less than on-demand pricing; bid based on the value ofthe resulting computation; bid so as to acquire c

Page 143

There are other options you can use to configure your Spot Requests.To learn more, seeRequestSpotInstances in the AWS SDK for .NET.Running this code w

Page 144

foreach (SpotInstanceRequest spotInstanceRequest in de scribeResponse.DescribeSpotInstanceRequestsResult.SpotInstanceRequest)

Page 145

To configure the .NET CLRTo ensure the best performance of your server-based applications on systems with multiple processorsor processor cores, we re

Page 146 - Additional Services

1 try { // Cancel requests. CancelSpotInstanceRequestsRequest cancelRequest = new CancelSpotInstan ceRequestsRequest(); 5

Page 147

ConclusionCongratulations! You have just completed the getting started tutorial for developing Spot Instance softwarewith the AWS SDK for .NET.Amazon

Page 148

Console.WriteLine(" Notifications:"); Console.WriteLine(" Topic: {0}", responseNotifications.VaultNotificationCon

Page 149

job.StatusMessage); } } else { Console.WriteLine(" No jobs."); }}For additional examples, see:• Using the AWS SDK for .NE

Page 150

Resource APIsThe SDK for .NET provides the AWS Resource APIs for .NET for programming with Amazon Glacier.These resource APIs provide a resource-level

Page 151

foreach (var job in jobs) { Console.WriteLine(" For job ID: {0}", job.Id); Console.WriteLine("Archive ID: {0

Page 152

Programming ModelsThe SDK for .NET provides two programming models for working with IAM. These programming modelsare known as the low-level model and

Page 153 - Additional Resources

Console.WriteLine(" Access keys:"); foreach (var accessKey in responseAccessKeys.AccessKeyMetadata) { Console.WriteLine(" {0

Page 154 - Document History

Console.WriteLine(" {0}", accessKey.Id); }}For additional examples, see IAM Resource API Examples (p. 94).For related API reference

Page 155

var user = iam.GetUserByName("DemoUser"); Console.WriteLine("For user {0}:", user.Name); Console.WriteLine(" In groups:

Commentaires sur ces manuels

Pas de commentaire