Code examples for IAM using Amazon SDKs
The following code examples show how to use IAM with an Amazon software development kit (SDK).
For a complete list of Amazon SDK developer guides and code examples, see Using IAM with an Amazon SDK. This topic also includes information about getting started and details about previous SDK versions.
Code examples
- IAM examples
- Actions
- Add a user to a group
- Attach a policy to a role
- Attach a policy to a user
- Attach an inline policy to a role
- Create a SAML provider
- Create a group
- Create a policy
- Create a policy version
- Create a role
- Create a service-linked role
- Create a user
- Create an access key
- Create an alias for an account
- Create an inline policy for a group
- Create an inline policy for a user
- Create an instance profile
- Delete SAML provider
- Delete a group
- Delete a group policy
- Delete a policy
- Delete a role
- Delete a role policy
- Delete a server certificate
- Delete a service-linked role
- Delete a user
- Delete an access key
- Delete an account alias
- Delete an inline policy from a user
- Delete an instance profile
- Detach a policy from a role
- Detach a policy from a user
- Generate a credential report
- Get a credential report
- Get a detailed authorization report for your account
- Get a policy
- Get a policy version
- Get a role
- Get a server certificate
- Get a service-linked role's deletion status
- Get a summary of account usage
- Get a user
- Get data about the last use of an access key
- Get the account password policy
- List SAML providers
- List a user's access keys
- List account aliases
- List groups
- List inline policies for a role
- List inline policies for a user
- List policies
- List policies attached to a role
- List roles
- List server certificates
- List users
- Remove a user from a group
- Update a server certificate
- Update a user
- Update an access key
- Upload a server certificate
- Scenarios
- Actions
- Amazon STS examples