User guide

Console.WriteLine(" {0}", accessKey.Id);
}
}
For additional examples, see IAM Resource API Examples (p. 94).
For related API reference information, see Amazon.IdentityManagement.Resources.
AWS Identity and Access Management Code
Examples with the AWS Resource APIs for .NET
The following code examples demonstrate how to program with IAM by using the AWS Resource APIs
for .NET.
The AWS Resource APIs for .NET provide a resource-level programming model that enables you to write
code to work more directly with resources that are managed by AWS services. For more information
about the AWS Resource APIs for .NET, including how to download and reference these resource APIs,
see AWS Resource APIs for .NET (p. 41).
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.
Topics
Get User Account Information (p. 94)
Get Group Information (p. 96)
Get Role Information (p. 97)
Create a User Account (p. 98)
Create a Group (p. 98)
Create a Role (p. 99)
Add a User Account to a Group (p. 100)
Add a Policy to a User Account, Group, or Role (p. 101)
Create an Access Key for a User Account (p. 105)
Create a Login Profile for a User Account (p. 106)
Create an Instance Profile (p. 106)
Attach an Instance Profile to a Role (p. 107)
Get User Account Information
The following example displays information about an existing user account, including its associated
groups, policies, and access key IDs:
// using Amazon.IdentityManagement.Resources;
// using Amazon.IdentityManagement.Model;
var iam = new IdentityManagementService();
try
{
Version v2.0.0
94
AWS SDK for .NET Developer Guide
IAM Resource API Examples