Code examples for IAM using AWS SDKs
The following code examples show how to use IAM with an AWS software development kit (SDK).
For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.
Code examples
- IAM
- Basics
- Hello IAM
- Learn the basics
- Actions
- AddClientIdToOpenIdConnectProvider
- AddRoleToInstanceProfile
- AddUserToGroup
- AttachGroupPolicy
- AttachRolePolicy
- AttachUserPolicy
- ChangePassword
- CreateAccessKey
- CreateAccountAlias
- CreateGroup
- CreateInstanceProfile
- CreateLoginProfile
- CreateOpenIdConnectProvider
- CreatePolicy
- CreatePolicyVersion
- CreateRole
- CreateSAMLProvider
- CreateServiceLinkedRole
- CreateUser
- CreateVirtualMfaDevice
- DeactivateMfaDevice
- DeleteAccessKey
- DeleteAccountAlias
- DeleteAccountPasswordPolicy
- DeleteGroup
- DeleteGroupPolicy
- DeleteInstanceProfile
- DeleteLoginProfile
- DeleteOpenIdConnectProvider
- DeletePolicy
- DeletePolicyVersion
- DeleteRole
- DeleteRolePermissionsBoundary
- DeleteRolePolicy
- DeleteSAMLProvider
- DeleteServerCertificate
- DeleteServiceLinkedRole
- DeleteSigningCertificate
- DeleteUser
- DeleteUserPermissionsBoundary
- DeleteUserPolicy
- DeleteVirtualMfaDevice
- DetachGroupPolicy
- DetachRolePolicy
- DetachUserPolicy
- EnableMfaDevice
- GenerateCredentialReport
- GenerateServiceLastAccessedDetails
- GetAccessKeyLastUsed
- GetAccountAuthorizationDetails
- GetAccountPasswordPolicy
- GetAccountSummary
- GetContextKeysForCustomPolicy
- GetContextKeysForPrincipalPolicy
- GetCredentialReport
- GetGroup
- GetGroupPolicy
- GetInstanceProfile
- GetLoginProfile
- GetOpenIdConnectProvider
- GetPolicy
- GetPolicyVersion
- GetRole
- GetRolePolicy
- GetSamlProvider
- GetServerCertificate
- GetServiceLastAccessedDetails
- GetServiceLastAccessedDetailsWithEntities
- GetServiceLinkedRoleDeletionStatus
- GetUser
- GetUserPolicy
- ListAccessKeys
- ListAccountAliases
- ListAttachedGroupPolicies
- ListAttachedRolePolicies
- ListAttachedUserPolicies
- ListEntitiesForPolicy
- ListGroupPolicies
- ListGroups
- ListGroupsForUser
- ListInstanceProfiles
- ListInstanceProfilesForRole
- ListMfaDevices
- ListOpenIdConnectProviders
- ListPolicies
- ListPolicyVersions
- ListRolePolicies
- ListRoleTags
- ListRoles
- ListSAMLProviders
- ListServerCertificates
- ListSigningCertificates
- ListUserPolicies
- ListUserTags
- ListUsers
- ListVirtualMfaDevices
- PutGroupPolicy
- PutRolePermissionsBoundary
- PutRolePolicy
- PutUserPermissionsBoundary
- PutUserPolicy
- RemoveClientIdFromOpenIdConnectProvider
- RemoveRoleFromInstanceProfile
- RemoveUserFromGroup
- ResyncMfaDevice
- SetDefaultPolicyVersion
- TagRole
- TagUser
- UntagRole
- UntagUser
- UpdateAccessKey
- UpdateAccountPasswordPolicy
- UpdateAssumeRolePolicy
- UpdateGroup
- UpdateLoginProfile
- UpdateOpenIdConnectProviderThumbprint
- UpdateRole
- UpdateRoleDescription
- UpdateSamlProvider
- UpdateServerCertificate
- UpdateSigningCertificate
- UpdateUser
- UploadServerCertificate
- UploadSigningCertificate
- Scenarios
- Basics
- AWS STS