Amazon AWS SDK User's Guide Page 46: NuGet Package Manager Console
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
Caution
The AWS Resource APIs for .NET are currently provided as a preview. This means that these
resource APIs may frequently change in response to customer feedback, and these changes
may happen without advance notice. Until these resource APIs exit the preview stage, please
be cautious about writing and distributing production-quality code that relies on them.
Using the AWS Resource APIs for .NET provide these benefits:
• The resource APIs in the SDK for .NET are easier to understand conceptually than their low-level API
counterparts. The low-level APIs in the SDK for .NET typically consist of sets of matching
request-and-response objects that correspond to HTTP-based API calls focusing on somewhat isolated
AWS service constructs. In contrast, these resource APIs represent logical relationships among
resources within AWS services and intuitively use familiar .NET programming constructs.
• Code that you write with the resource APIs is easier for you and others to comprehend when compared
to their low-level API equivalents. Instead of writing somewhat complex request-and-response style
code with the low-level APIs to access resources, you can get directly to resources with the resource
APIs. If you're working with a team of developers in the same code base, it's typically easier to
understand what has already been coded and to start contributing quickly to existing code.
• You will typically write less code with the resource APIs than with equivalent low-level API code.
Request-and-response style code with the low-level APIs can sometimes be quite long. Equivalent
resource APIs code is typically much shorter, more compact, and easer to debug.
Here's a brief example of using C# and the AWS Resource APIs for .NET to create a new IAM user
account:
// using Amazon.IdentityManagement.Resources;
// using Amazon.IdentityManagement.Model;
var iam = new IdentityManagementService();
try
{
var user = iam.CreateUser("DemoUser");
Console.WriteLine("User Name = '{0}', ARN = '{1}'",
user.Name, user.Arn);
}
catch (EntityAlreadyExistsException)
{
Console.WriteLine("User 'DemoUser' already exists.");
}
Compare this to an equivalent example of using the low-level APIs:
// using Amazon.IdentityManagement;
// using Amazon.IdentityManagement.Model;
var client = new AmazonIdentityManagementServiceClient();
var request = new CreateUserRequest
{
UserName = "DemoUser"
};
try
{
Version v2.0.0
42
AWS SDK for .NET Developer Guide
AWS Resource APIs for .NET
PDF file · ·
Questions about Amazon AWS SDK
No questions about this manual yet. Ask the first one.
Related products and manuals for Software Amazon AWS SDK
- Software Amazon Redshift User Manual
(24 pages) - Software Amazon Redshift User Manual
(11 pages) - Software Amazon AWS SDK User's Guide
(73 pages)