文件 AWS SDK AWS 範例 SDK 儲存庫中有更多可用的
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
Word usingIAM 的動作 AWS SDKs
下列程式碼範例示範如何使用 IAM 執行個別的 AWS SDKs 動作。每個範例都包含一個 GitHub 連結,您可以在其中找到設定和執行程式碼的指示。
這些摘錄會呼叫 IAM API,並且是必須在內容中執行之大型程式的程式碼摘錄。您可以在 的內容中查看動作IAM using AWS SDKs 的案例 。
下列範例僅包含最常使用的動作。如需完整清單,請參閱 AWS Identity and Access Management API 參考。
範例
- 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