Amazon AWS SDK Guide de l'utilisateur Page 48 : 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
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, make sure that these three files remain
together in the same folder.
3.
From the project in Visual Studio that you want to use the resource APIs with, set a reference to the
AWS Resource APIs for .NET library file that you just unzipped. To do this for example in
Solution
Explorer
in Visual Studio, right-click the
References
folder; click
Add Reference
; click
Browse
;
browse to and select the
AWSSDK.dll
file that you just unzipped; click
Add
and then click
OK
.
4.
Import the specific resource APIs in the AWS Resource APIs for .NET that you want to use in your
project's code. These APIs typically take the format
Amazon.
ServiceName
.Resources
, where
ServiceName
is typically some recognizable phrase that corresponds to the specific service. For
example for the AWS Identity and Access Management resource APIs, in C# you would include the
following
using
directive at the top of a class file:
using Amazon.IdentityManagement.Resources;
5.
As needed, import any corresponding low-level APIs that the specific resource APIs rely upon.These
APIs typically take the format
Amazon.
ServiceName
.Model
and sometimes also
Amazon.
ServiceName
, where
ServiceName
is typically some recognizable phrase that corresponds
to the specific service. For example for the AWS Identity and Access Management low-level APIs,
in C# you would include the following
using
directives at the top of a class file:
using Amazon.IdentityManagement.Model;
// Possibly also the following, depending on which of the resource APIs that
you use:
using Amazon.IdentityManagement
6.
Because the resource APIs are currently provided as a preview, you should be cautious about writing
production-quality code that relies on them, especially as the resource APIs may undergo frequent
changes during the preview stage. However, if you choose to distribute the project anyway, make
sure to include a copy of the AWS Resource APIs for .NET library file. To do this for example in
Solution Explorer
in Visual Studio, within the
References
folder, click
AWSSDK
; in the
Properties
window, next to
Copy Local
, select
True
if it is not already selected.
Note
If you distribute a project that has a copy of the resource APIs library file included, and then
the resource library APIs change, the only way for your project to include the new changes
is to redistribute your project with an updated resource APIs library file copied locally.
Code Examples for Resource APIs
The following links provide code examples for AWS services that support resource-level APIs in the SDK
for .NET.
•
AWS CloudFormation (p. 46)
•
Amazon Glacier (p. 90)
•
AWS Identity and Access Management (IAM) (p. 94)
•
Amazon Simple Notification Service (Amazon SNS) (p. 118)
•
Amazon Simple Queue Service (Amazon SQS) (p. 121)
Version v2.0.0
44
AWS SDK for .NET Developer Guide
Code Examples for Resource APIs
Fichier PDF · ·
Questions sur Amazon AWS SDK
Pas encore de questions sur ce manuel. Posez la première.
Produits connexes et manuels pour Logiciel Amazon AWS SDK
- Logiciel Amazon Redshift Manuel d'utilisateur
(24 pages) - Logiciel Amazon Redshift Manuel d'utilisateur
(11 pages) - Logiciel Amazon AWS SDK Guide de l'utilisateur
(73 pages)