Amazon AWS SDK Guia do Utilizador Página 1

Consulte online ou descarregue Guia do Utilizador para Software Amazon AWS SDK. Amazon AWS SDK User guide [en] [es] Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 155
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes

Resumo do Conteúdo

Página 1 - AWS SDK for .NET

AWS SDK for .NETDeveloper GuideVersion v2.0.0

Página 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

Página 3 - Table of Contents

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

Página 4

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

Página 5 - AWS SDK for .NET Developer

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

Página 6 - About Amazon Web Services

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

Página 7 - To sign up for an AWS account

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

Página 8 - Install the AWS SDK for .NET

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

Página 9 - Start a New Project

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

Página 10

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

Página 11

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

Página 12 - Programming with the AWS SDK

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

Página 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

Página 14 - Using the SDK Store

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

Página 15 - Using a Credentials File

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

Página 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.

Página 17 - AWS Region Selection

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

Página 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

Página 19

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

Página 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

Página 21

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

Página 22

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

Página 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

Página 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

Página 25

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

Página 26

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

Página 27

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

Página 28

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 34 - Complete Sample

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

Página 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

Página 36

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

Página 37

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

Página 38 - What's Different

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

Página 39 - Breaking Changes

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

Página 40 - Configuring the AWS Region

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

Página 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

Página 42 - AWS SDK for Windows Phone 8

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

Página 43 - NuGet from Solution Explorer

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

Página 44 - NuGet Package Manager Console

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

Página 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

Página 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

Página 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

Página 48

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

Página 49

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

Página 50

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

Página 51

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

Página 52

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

Página 53

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

Página 54 - Document

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

Página 55 - Object Persistence

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

Página 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.

Página 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

Página 58

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

Página 59

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

Página 60 - Primary Key

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

Página 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

Página 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

Página 63

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

Página 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

Página 65

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

Página 66

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

Página 67

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

Página 68

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

Página 69 - DynamoDB

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

Página 70

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

Página 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

Página 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

Página 73

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

Página 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

Página 75

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

Página 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

Página 77 - Enumerating Your Key Pairs

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

Página 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

Página 79

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

Página 80

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

Página 81

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

Página 82

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

Página 83

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

Página 84 - Prerequisites

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

Página 85

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

Página 86

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

Página 87

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

Página 88

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

Página 89

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

Página 90

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

Página 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

Página 92

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

Página 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

Página 94

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

Página 95

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

Página 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

Página 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

Página 98 - Get User Account Information

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

Página 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,

Página 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

Página 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

Página 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

Página 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

Página 104 - Add a User Account to a Group

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

Página 105

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

Página 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

Página 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

Página 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

Página 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

Página 110 - Create an Instance Profile

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

Página 111

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

Página 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

Página 113 - To test the sample code

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

Página 114 - Create an IAM Role

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

Página 115

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

Página 116 - SDK for .NET

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

Página 117

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

Página 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

Página 119

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

Página 120 - To monitor update status

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

Página 121 - Programming Models

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

Página 122 - Resource APIs

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

Página 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

Página 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

Página 125

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

Página 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

Página 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

Página 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

Página 129

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

Página 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

Página 131

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

Página 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

Página 133

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

Página 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

Página 135

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

Página 136

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

Página 137

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

Página 138

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

Página 139

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

Página 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

Página 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

Página 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

Página 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

Página 144

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

Página 145

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

Página 146 - Additional Services

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

Página 147

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

Página 148

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

Página 149

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

Página 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

Página 151

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

Página 152

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

Página 153 - Additional Resources

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

Página 154 - Document History

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

Página 155

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

Comentários a estes Manuais

Sem comentários