Class: Aws::IAM::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::IAM::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-iam/client.rb
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#add_client_id_to_open_id_connect_provider(params = {}) ⇒ Struct
Adds a new client ID (also known as audience) to the list of client IDs already registered for the specified IAM OpenID Connect (OIDC) provider resource.
-
#add_role_to_instance_profile(params = {}) ⇒ Struct
Adds the specified IAM role to the specified instance profile.
-
#add_user_to_group(params = {}) ⇒ Struct
Adds the specified user to the specified group.
-
#attach_group_policy(params = {}) ⇒ Struct
Attaches the specified managed policy to the specified IAM group.
-
#attach_role_policy(params = {}) ⇒ Struct
Attaches the specified managed policy to the specified IAM role.
-
#attach_user_policy(params = {}) ⇒ Struct
Attaches the specified managed policy to the specified user.
-
#change_password(params = {}) ⇒ Struct
Changes the password of the IAM user who is calling this operation.
-
#create_access_key(params = {}) ⇒ Types::CreateAccessKeyResponse
Creates a new AWS secret access key and corresponding AWS access key ID for the specified user.
-
#create_account_alias(params = {}) ⇒ Struct
Creates an alias for your AWS account.
-
#create_group(params = {}) ⇒ Types::CreateGroupResponse
Creates a new group.
-
#create_instance_profile(params = {}) ⇒ Types::CreateInstanceProfileResponse
Creates a new instance profile.
-
#create_login_profile(params = {}) ⇒ Types::CreateLoginProfileResponse
Creates a password for the specified user, giving the user the ability to access AWS services through the AWS Management Console.
-
#create_open_id_connect_provider(params = {}) ⇒ Types::CreateOpenIDConnectProviderResponse
Creates an IAM entity to describe an identity provider (IdP) that supports [OpenID Connect (OIDC)].
-
#create_policy(params = {}) ⇒ Types::CreatePolicyResponse
Creates a new managed policy for your AWS account.
-
#create_policy_version(params = {}) ⇒ Types::CreatePolicyVersionResponse
Creates a new version of the specified managed policy.
-
#create_role(params = {}) ⇒ Types::CreateRoleResponse
Creates a new role for your AWS account.
-
#create_saml_provider(params = {}) ⇒ Types::CreateSAMLProviderResponse
Creates an IAM resource that describes an identity provider (IdP) that supports SAML 2.0.
-
#create_service_linked_role(params = {}) ⇒ Types::CreateServiceLinkedRoleResponse
Creates an IAM role that is linked to a specific AWS service.
-
#create_service_specific_credential(params = {}) ⇒ Types::CreateServiceSpecificCredentialResponse
Generates a set of credentials consisting of a user name and password that can be used to access the service specified in the request.
-
#create_user(params = {}) ⇒ Types::CreateUserResponse
Creates a new IAM user for your AWS account.
-
#create_virtual_mfa_device(params = {}) ⇒ Types::CreateVirtualMFADeviceResponse
Creates a new virtual MFA device for the AWS account.
-
#deactivate_mfa_device(params = {}) ⇒ Struct
Deactivates the specified MFA device and removes it from association with the user name for which it was originally enabled.
-
#delete_access_key(params = {}) ⇒ Struct
Deletes the access key pair associated with the specified IAM user.
-
#delete_account_alias(params = {}) ⇒ Struct
Deletes the specified AWS account alias.
-
#delete_account_password_policy(params = {}) ⇒ Struct
Deletes the password policy for the AWS account.
-
#delete_group(params = {}) ⇒ Struct
Deletes the specified IAM group.
-
#delete_group_policy(params = {}) ⇒ Struct
Deletes the specified inline policy that is embedded in the specified IAM group.
-
#delete_instance_profile(params = {}) ⇒ Struct
Deletes the specified instance profile.
-
#delete_login_profile(params = {}) ⇒ Struct
Deletes the password for the specified IAM user, which terminates the user’s ability to access AWS services through the AWS Management Console.
-
#delete_open_id_connect_provider(params = {}) ⇒ Struct
Deletes an OpenID Connect identity provider (IdP) resource object in IAM.
-
#delete_policy(params = {}) ⇒ Struct
Deletes the specified managed policy.
-
#delete_policy_version(params = {}) ⇒ Struct
Deletes the specified version from the specified managed policy.
-
#delete_role(params = {}) ⇒ Struct
Deletes the specified role.
-
#delete_role_permissions_boundary(params = {}) ⇒ Struct
Deletes the permissions boundary for the specified IAM role.
-
#delete_role_policy(params = {}) ⇒ Struct
Deletes the specified inline policy that is embedded in the specified IAM role.
-
#delete_saml_provider(params = {}) ⇒ Struct
Deletes a SAML provider resource in IAM.
-
#delete_server_certificate(params = {}) ⇒ Struct
Deletes the specified server certificate.
-
#delete_service_linked_role(params = {}) ⇒ Types::DeleteServiceLinkedRoleResponse
Submits a service-linked role deletion request and returns a ‘DeletionTaskId`, which you can use to check the status of the deletion.
-
#delete_service_specific_credential(params = {}) ⇒ Struct
Deletes the specified service-specific credential.
-
#delete_signing_certificate(params = {}) ⇒ Struct
Deletes a signing certificate associated with the specified IAM user.
-
#delete_ssh_public_key(params = {}) ⇒ Struct
Deletes the specified SSH public key.
-
#delete_user(params = {}) ⇒ Struct
Deletes the specified IAM user.
-
#delete_user_permissions_boundary(params = {}) ⇒ Struct
Deletes the permissions boundary for the specified IAM user.
-
#delete_user_policy(params = {}) ⇒ Struct
Deletes the specified inline policy that is embedded in the specified IAM user.
-
#delete_virtual_mfa_device(params = {}) ⇒ Struct
Deletes a virtual MFA device.
-
#detach_group_policy(params = {}) ⇒ Struct
Removes the specified managed policy from the specified IAM group.
-
#detach_role_policy(params = {}) ⇒ Struct
Removes the specified managed policy from the specified role.
-
#detach_user_policy(params = {}) ⇒ Struct
Removes the specified managed policy from the specified user.
-
#enable_mfa_device(params = {}) ⇒ Struct
Enables the specified MFA device and associates it with the specified IAM user.
-
#generate_credential_report(params = {}) ⇒ Types::GenerateCredentialReportResponse
Generates a credential report for the AWS account.
-
#get_access_key_last_used(params = {}) ⇒ Types::GetAccessKeyLastUsedResponse
Retrieves information about when the specified access key was last used.
-
#get_account_authorization_details(params = {}) ⇒ Types::GetAccountAuthorizationDetailsResponse
Retrieves information about all IAM users, groups, roles, and policies in your AWS account, including their relationships to one another.
-
#get_account_password_policy(params = {}) ⇒ Types::GetAccountPasswordPolicyResponse
Retrieves the password policy for the AWS account.
-
#get_account_summary(params = {}) ⇒ Types::GetAccountSummaryResponse
Retrieves information about IAM entity usage and IAM quotas in the AWS account.
-
#get_context_keys_for_custom_policy(params = {}) ⇒ Types::GetContextKeysForPolicyResponse
Gets a list of all of the context keys referenced in the input policies.
-
#get_context_keys_for_principal_policy(params = {}) ⇒ Types::GetContextKeysForPolicyResponse
Gets a list of all of the context keys referenced in all the IAM policies that are attached to the specified IAM entity.
-
#get_credential_report(params = {}) ⇒ Types::GetCredentialReportResponse
Retrieves a credential report for the AWS account.
-
#get_group(params = {}) ⇒ Types::GetGroupResponse
Returns a list of IAM users that are in the specified IAM group.
-
#get_group_policy(params = {}) ⇒ Types::GetGroupPolicyResponse
Retrieves the specified inline policy document that is embedded in the specified IAM group.
-
#get_instance_profile(params = {}) ⇒ Types::GetInstanceProfileResponse
Retrieves information about the specified instance profile, including the instance profile’s path, GUID, ARN, and role.
-
#get_login_profile(params = {}) ⇒ Types::GetLoginProfileResponse
Retrieves the user name and password-creation date for the specified IAM user.
-
#get_open_id_connect_provider(params = {}) ⇒ Types::GetOpenIDConnectProviderResponse
Returns information about the specified OpenID Connect (OIDC) provider resource object in IAM.
-
#get_policy(params = {}) ⇒ Types::GetPolicyResponse
Retrieves information about the specified managed policy, including the policy’s default version and the total number of IAM users, groups, and roles to which the policy is attached.
-
#get_policy_version(params = {}) ⇒ Types::GetPolicyVersionResponse
Retrieves information about the specified version of the specified managed policy, including the policy document.
-
#get_role(params = {}) ⇒ Types::GetRoleResponse
Retrieves information about the specified role, including the role’s path, GUID, ARN, and the role’s trust policy that grants permission to assume the role.
-
#get_role_policy(params = {}) ⇒ Types::GetRolePolicyResponse
Retrieves the specified inline policy document that is embedded with the specified IAM role.
-
#get_saml_provider(params = {}) ⇒ Types::GetSAMLProviderResponse
Returns the SAML provider metadocument that was uploaded when the IAM SAML provider resource object was created or updated.
-
#get_server_certificate(params = {}) ⇒ Types::GetServerCertificateResponse
Retrieves information about the specified server certificate stored in IAM.
-
#get_service_linked_role_deletion_status(params = {}) ⇒ Types::GetServiceLinkedRoleDeletionStatusResponse
Retrieves the status of your service-linked role deletion.
-
#get_ssh_public_key(params = {}) ⇒ Types::GetSSHPublicKeyResponse
Retrieves the specified SSH public key, including metadata about the key.
-
#get_user(params = {}) ⇒ Types::GetUserResponse
Retrieves information about the specified IAM user, including the user’s creation date, path, unique ID, and ARN.
-
#get_user_policy(params = {}) ⇒ Types::GetUserPolicyResponse
Retrieves the specified inline policy document that is embedded in the specified IAM user.
-
#list_access_keys(params = {}) ⇒ Types::ListAccessKeysResponse
Returns information about the access key IDs associated with the specified IAM user.
-
#list_account_aliases(params = {}) ⇒ Types::ListAccountAliasesResponse
Lists the account alias associated with the AWS account (Note: you can have only one).
-
#list_attached_group_policies(params = {}) ⇒ Types::ListAttachedGroupPoliciesResponse
Lists all managed policies that are attached to the specified IAM group.
-
#list_attached_role_policies(params = {}) ⇒ Types::ListAttachedRolePoliciesResponse
Lists all managed policies that are attached to the specified IAM role.
-
#list_attached_user_policies(params = {}) ⇒ Types::ListAttachedUserPoliciesResponse
Lists all managed policies that are attached to the specified IAM user.
-
#list_entities_for_policy(params = {}) ⇒ Types::ListEntitiesForPolicyResponse
Lists all IAM users, groups, and roles that the specified managed policy is attached to.
-
#list_group_policies(params = {}) ⇒ Types::ListGroupPoliciesResponse
Lists the names of the inline policies that are embedded in the specified IAM group.
-
#list_groups(params = {}) ⇒ Types::ListGroupsResponse
Lists the IAM groups that have the specified path prefix.
-
#list_groups_for_user(params = {}) ⇒ Types::ListGroupsForUserResponse
Lists the IAM groups that the specified IAM user belongs to.
-
#list_instance_profiles(params = {}) ⇒ Types::ListInstanceProfilesResponse
Lists the instance profiles that have the specified path prefix.
-
#list_instance_profiles_for_role(params = {}) ⇒ Types::ListInstanceProfilesForRoleResponse
Lists the instance profiles that have the specified associated IAM role.
-
#list_mfa_devices(params = {}) ⇒ Types::ListMFADevicesResponse
Lists the MFA devices for an IAM user.
-
#list_open_id_connect_providers(params = {}) ⇒ Types::ListOpenIDConnectProvidersResponse
Lists information about the IAM OpenID Connect (OIDC) provider resource objects defined in the AWS account.
-
#list_policies(params = {}) ⇒ Types::ListPoliciesResponse
Lists all the managed policies that are available in your AWS account, including your own customer-defined managed policies and all AWS managed policies.
-
#list_policy_versions(params = {}) ⇒ Types::ListPolicyVersionsResponse
Lists information about the versions of the specified managed policy, including the version that is currently set as the policy’s default version.
-
#list_role_policies(params = {}) ⇒ Types::ListRolePoliciesResponse
Lists the names of the inline policies that are embedded in the specified IAM role.
-
#list_roles(params = {}) ⇒ Types::ListRolesResponse
Lists the IAM roles that have the specified path prefix.
-
#list_saml_providers(params = {}) ⇒ Types::ListSAMLProvidersResponse
Lists the SAML provider resource objects defined in IAM in the account.
-
#list_server_certificates(params = {}) ⇒ Types::ListServerCertificatesResponse
Lists the server certificates stored in IAM that have the specified path prefix.
-
#list_service_specific_credentials(params = {}) ⇒ Types::ListServiceSpecificCredentialsResponse
Returns information about the service-specific credentials associated with the specified IAM user.
-
#list_signing_certificates(params = {}) ⇒ Types::ListSigningCertificatesResponse
Returns information about the signing certificates associated with the specified IAM user.
-
#list_ssh_public_keys(params = {}) ⇒ Types::ListSSHPublicKeysResponse
Returns information about the SSH public keys associated with the specified IAM user.
-
#list_user_policies(params = {}) ⇒ Types::ListUserPoliciesResponse
Lists the names of the inline policies embedded in the specified IAM user.
-
#list_users(params = {}) ⇒ Types::ListUsersResponse
Lists the IAM users that have the specified path prefix.
-
#list_virtual_mfa_devices(params = {}) ⇒ Types::ListVirtualMFADevicesResponse
Lists the virtual MFA devices defined in the AWS account by assignment status.
-
#put_group_policy(params = {}) ⇒ Struct
Adds or updates an inline policy document that is embedded in the specified IAM group.
-
#put_role_permissions_boundary(params = {}) ⇒ Struct
Adds or updates the policy that is specified as the IAM role’s permissions boundary.
-
#put_role_policy(params = {}) ⇒ Struct
Adds or updates an inline policy document that is embedded in the specified IAM role.
-
#put_user_permissions_boundary(params = {}) ⇒ Struct
Adds or updates the policy that is specified as the IAM user’s permissions boundary.
-
#put_user_policy(params = {}) ⇒ Struct
Adds or updates an inline policy document that is embedded in the specified IAM user.
-
#remove_client_id_from_open_id_connect_provider(params = {}) ⇒ Struct
Removes the specified client ID (also known as audience) from the list of client IDs registered for the specified IAM OpenID Connect (OIDC) provider resource object.
-
#remove_role_from_instance_profile(params = {}) ⇒ Struct
Removes the specified IAM role from the specified EC2 instance profile.
-
#remove_user_from_group(params = {}) ⇒ Struct
Removes the specified user from the specified group.
-
#reset_service_specific_credential(params = {}) ⇒ Types::ResetServiceSpecificCredentialResponse
Resets the password for a service-specific credential.
-
#resync_mfa_device(params = {}) ⇒ Struct
Synchronizes the specified MFA device with its IAM resource object on the AWS servers.
-
#set_default_policy_version(params = {}) ⇒ Struct
Sets the specified version of the specified policy as the policy’s default (operative) version.
-
#simulate_custom_policy(params = {}) ⇒ Types::SimulatePolicyResponse
Simulate how a set of IAM policies and optionally a resource-based policy works with a list of API operations and AWS resources to determine the policies’ effective permissions.
-
#simulate_principal_policy(params = {}) ⇒ Types::SimulatePolicyResponse
Simulate how a set of IAM policies attached to an IAM entity works with a list of API operations and AWS resources to determine the policies’ effective permissions.
-
#update_access_key(params = {}) ⇒ Struct
Changes the status of the specified access key from Active to Inactive, or vice versa.
-
#update_account_password_policy(params = {}) ⇒ Struct
Updates the password policy settings for the AWS account.
-
#update_assume_role_policy(params = {}) ⇒ Struct
Updates the policy that grants an IAM entity permission to assume a role.
-
#update_group(params = {}) ⇒ Struct
Updates the name and/or the path of the specified IAM group.
-
#update_login_profile(params = {}) ⇒ Struct
Changes the password for the specified IAM user.
-
#update_open_id_connect_provider_thumbprint(params = {}) ⇒ Struct
Replaces the existing list of server certificate thumbprints associated with an OpenID Connect (OIDC) provider resource object with a new list of thumbprints.
-
#update_role(params = {}) ⇒ Struct
Updates the description or maximum session duration setting of a role.
-
#update_role_description(params = {}) ⇒ Types::UpdateRoleDescriptionResponse
Use instead.
-
#update_saml_provider(params = {}) ⇒ Types::UpdateSAMLProviderResponse
Updates the metadata document for an existing SAML provider resource object.
-
#update_server_certificate(params = {}) ⇒ Struct
Updates the name and/or the path of the specified server certificate stored in IAM.
-
#update_service_specific_credential(params = {}) ⇒ Struct
Sets the status of a service-specific credential to ‘Active` or `Inactive`.
-
#update_signing_certificate(params = {}) ⇒ Struct
Changes the status of the specified user signing certificate from active to disabled, or vice versa.
-
#update_ssh_public_key(params = {}) ⇒ Struct
Sets the status of an IAM user’s SSH public key to active or inactive.
-
#update_user(params = {}) ⇒ Struct
Updates the name and/or the path of the specified IAM user.
-
#upload_server_certificate(params = {}) ⇒ Types::UploadServerCertificateResponse
Uploads a server certificate entity for the AWS account.
-
#upload_signing_certificate(params = {}) ⇒ Types::UploadSigningCertificateResponse
Uploads an X.509 signing certificate and associates it with the specified IAM user.
-
#upload_ssh_public_key(params = {}) ⇒ Types::UploadSSHPublicKeyResponse
Uploads an SSH public key and associates it with the specified IAM user.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(*args) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(*args) ⇒ Client
Returns a new instance of Client.
153 154 155 |
# File 'lib/aws-sdk-iam/client.rb', line 153 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9783 9784 9785 |
# File 'lib/aws-sdk-iam/client.rb', line 9783 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9786 9787 9788 |
# File 'lib/aws-sdk-iam/client.rb', line 9786 def errors_module Errors end |
Instance Method Details
#add_client_id_to_open_id_connect_provider(params = {}) ⇒ Struct
Adds a new client ID (also known as audience) to the list of client IDs already registered for the specified IAM OpenID Connect (OIDC) provider resource.
This operation is idempotent; it does not fail or return an error if you add an existing client ID to the provider.
199 200 201 202 |
# File 'lib/aws-sdk-iam/client.rb', line 199 def add_client_id_to_open_id_connect_provider(params = {}, = {}) req = build_request(:add_client_id_to_open_id_connect_provider, params) req.send_request() end |
#add_role_to_instance_profile(params = {}) ⇒ Struct
Adds the specified IAM role to the specified instance profile. An instance profile can contain only one role, and this limit cannot be increased. You can remove the existing role and then add a different role to an instance profile. You must then wait for the change to appear across all of AWS because of [eventual consistency]. To force the change, you must [disassociate the instance profile] and then [associate the instance profile], or you can stop your instance and then restart it.
<note markdown=“1”> The caller of this API must be granted the ‘PassRole` permission on the IAM role by a permission policy.
</note>
For more information about roles, go to [Working with Roles]. For more information about instance profiles, go to [About Instance Profiles].
[1]: en.wikipedia.org/wiki/Eventual_consistency [2]: docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateIamInstanceProfile.html [3]: docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateIamInstanceProfile.html [4]: docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html [5]: docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html
277 278 279 280 |
# File 'lib/aws-sdk-iam/client.rb', line 277 def add_role_to_instance_profile(params = {}, = {}) req = build_request(:add_role_to_instance_profile, params) req.send_request() end |
#add_user_to_group(params = {}) ⇒ Struct
Adds the specified user to the specified group.
331 332 333 334 |
# File 'lib/aws-sdk-iam/client.rb', line 331 def add_user_to_group(params = {}, = {}) req = build_request(:add_user_to_group, params) req.send_request() end |
#attach_group_policy(params = {}) ⇒ Struct
Attaches the specified managed policy to the specified IAM group.
You use this API to attach a managed policy to a group. To embed an inline policy in a group, use PutGroupPolicy.
For more information about policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
394 395 396 397 |
# File 'lib/aws-sdk-iam/client.rb', line 394 def attach_group_policy(params = {}, = {}) req = build_request(:attach_group_policy, params) req.send_request() end |
#attach_role_policy(params = {}) ⇒ Struct
Attaches the specified managed policy to the specified IAM role. When you attach a managed policy to a role, the managed policy becomes part of the role’s permission (access) policy.
<note markdown=“1”> You cannot use a managed policy as the role’s trust policy. The role’s trust policy is created at the same time as the role, using CreateRole. You can update a role’s trust policy using UpdateAssumeRolePolicy.
</note>
Use this API to attach a managed policy to a role. To embed an inline policy in a role, use PutRolePolicy. For more information about policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
464 465 466 467 |
# File 'lib/aws-sdk-iam/client.rb', line 464 def attach_role_policy(params = {}, = {}) req = build_request(:attach_role_policy, params) req.send_request() end |
#attach_user_policy(params = {}) ⇒ Struct
Attaches the specified managed policy to the specified user.
You use this API to attach a managed policy to a user. To embed an inline policy in a user, use PutUserPolicy.
For more information about policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
527 528 529 530 |
# File 'lib/aws-sdk-iam/client.rb', line 527 def attach_user_policy(params = {}, = {}) req = build_request(:attach_user_policy, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 |
# File 'lib/aws-sdk-iam/client.rb', line 9646 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-iam' context[:gem_version] = '1.6.0' Seahorse::Client::Request.new(handlers, context) end |
#change_password(params = {}) ⇒ Struct
Changes the password of the IAM user who is calling this operation. The AWS account root user password is not affected by this operation.
To change the password for a different user, see UpdateLoginProfile. For more information about modifying passwords, see [Managing Passwords] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html
586 587 588 589 |
# File 'lib/aws-sdk-iam/client.rb', line 586 def change_password(params = {}, = {}) req = build_request(:change_password, params) req.send_request() end |
#create_access_key(params = {}) ⇒ Types::CreateAccessKeyResponse
Creates a new AWS secret access key and corresponding AWS access key ID for the specified user. The default status for new keys is ‘Active`.
If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request. Because this operation works for access keys under the AWS account, you can use this operation to manage AWS account root user credentials. This is true even if the AWS account has no associated users.
For information about limits on the number of keys you can create, see
- Limitations on IAM Entities][1
-
in the *IAM User Guide*.
To ensure the security of your AWS account, the secret access key is accessible only during key and user creation. You must save the key (for example, in a text file) if you want to be able to access it again. If a secret key is lost, you can delete the access keys for the associated user and then create new keys.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html
668 669 670 671 |
# File 'lib/aws-sdk-iam/client.rb', line 668 def create_access_key(params = {}, = {}) req = build_request(:create_access_key, params) req.send_request() end |
#create_account_alias(params = {}) ⇒ Struct
Creates an alias for your AWS account. For information about using an AWS account alias, see [Using an Alias for Your AWS Account ID] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html
714 715 716 717 |
# File 'lib/aws-sdk-iam/client.rb', line 714 def create_account_alias(params = {}, = {}) req = build_request(:create_account_alias, params) req.send_request() end |
#create_group(params = {}) ⇒ Types::CreateGroupResponse
Creates a new group.
For information about the number of groups you can create, see
- Limitations on IAM Entities][1
-
in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html
805 806 807 808 |
# File 'lib/aws-sdk-iam/client.rb', line 805 def create_group(params = {}, = {}) req = build_request(:create_group, params) req.send_request() end |
#create_instance_profile(params = {}) ⇒ Types::CreateInstanceProfileResponse
Creates a new instance profile. For information about instance profiles, go to [About Instance Profiles].
For information about the number of instance profiles you can create, see [Limitations on IAM Entities] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html [2]: docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html
909 910 911 912 |
# File 'lib/aws-sdk-iam/client.rb', line 909 def create_instance_profile(params = {}, = {}) req = build_request(:create_instance_profile, params) req.send_request() end |
#create_login_profile(params = {}) ⇒ Types::CreateLoginProfileResponse
Creates a password for the specified user, giving the user the ability to access AWS services through the AWS Management Console. For more information about managing passwords, see [Managing Passwords] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html
999 1000 1001 1002 |
# File 'lib/aws-sdk-iam/client.rb', line 999 def create_login_profile(params = {}, = {}) req = build_request(:create_login_profile, params) req.send_request() end |
#create_open_id_connect_provider(params = {}) ⇒ Types::CreateOpenIDConnectProviderResponse
Creates an IAM entity to describe an identity provider (IdP) that supports [OpenID Connect (OIDC)].
The OIDC provider that you create with this operation can be used as a principal in a role’s trust policy. Such a policy establishes a trust relationship between AWS and the OIDC provider.
When you create the IAM OIDC provider, you specify the following:
-
The URL of the OIDC identity provider (IdP) to trust
-
A list of client IDs (also known as audiences) that identify the application or applications that are allowed to authenticate using the OIDC provider
-
A list of thumbprints of the server certificate(s) that the IdP uses.
You get all of this information from the OIDC IdP that you want to use to access AWS.
<note markdown=“1”> Because trust for the OIDC provider is derived from the IAM provider that this operation creates, it is best to limit access to the CreateOpenIDConnectProvider operation to highly privileged users.
</note>
[1]: openid.net/connect/
1128 1129 1130 1131 |
# File 'lib/aws-sdk-iam/client.rb', line 1128 def create_open_id_connect_provider(params = {}, = {}) req = build_request(:create_open_id_connect_provider, params) req.send_request() end |
#create_policy(params = {}) ⇒ Types::CreatePolicyResponse
Creates a new managed policy for your AWS account.
This operation creates a policy version with a version identifier of ‘v1` and sets v1 as the policy’s default version. For more information about policy versions, see [Versioning for Managed Policies] in the *IAM User Guide*.
For more information about managed policies in general, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html [2]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
1242 1243 1244 1245 |
# File 'lib/aws-sdk-iam/client.rb', line 1242 def create_policy(params = {}, = {}) req = build_request(:create_policy, params) req.send_request() end |
#create_policy_version(params = {}) ⇒ Types::CreatePolicyVersionResponse
Creates a new version of the specified managed policy. To update a managed policy, you create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must delete an existing version using DeletePolicyVersion before you create a new version.
Optionally, you can set the new version as the policy’s default version. The default version is the version that is in effect for the IAM users, groups, and roles to which the policy is attached.
For more information about managed policy versions, see [Versioning for Managed Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html
1333 1334 1335 1336 |
# File 'lib/aws-sdk-iam/client.rb', line 1333 def create_policy_version(params = {}, = {}) req = build_request(:create_policy_version, params) req.send_request() end |
#create_role(params = {}) ⇒ Types::CreateRoleResponse
Creates a new role for your AWS account. For more information about roles, go to [IAM Roles]. For information about limitations on role names and the number of roles you can create, go to [Limitations on IAM Entities] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html [2]: docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html
1486 1487 1488 1489 |
# File 'lib/aws-sdk-iam/client.rb', line 1486 def create_role(params = {}, = {}) req = build_request(:create_role, params) req.send_request() end |
#create_saml_provider(params = {}) ⇒ Types::CreateSAMLProviderResponse
Creates an IAM resource that describes an identity provider (IdP) that supports SAML 2.0.
The SAML provider resource that you create with this operation can be used as a principal in an IAM role’s trust policy. Such a policy can enable federated users who sign-in using the SAML IdP to assume the role. You can create an IAM role that supports Web-based single sign-on (SSO) to the AWS Management Console or one that supports API access to AWS.
When you create the SAML provider resource, you upload a SAML metadata document that you get from your IdP. That document includes the issuer’s name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that the IdP sends. You must generate the metadata document using the identity management software that is used as your organization’s IdP.
<note markdown=“1”> This operation requires [Signature Version 4].
</note>
For more information, see [Enabling SAML 2.0 Federated Users to Access the AWS Management Console] and [About SAML 2.0-based Federation] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/general/latest/gr/signature-version-4.html [2]: docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-saml.html [3]: docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html
1568 1569 1570 1571 |
# File 'lib/aws-sdk-iam/client.rb', line 1568 def create_saml_provider(params = {}, = {}) req = build_request(:create_saml_provider, params) req.send_request() end |
#create_service_linked_role(params = {}) ⇒ Types::CreateServiceLinkedRoleResponse
Creates an IAM role that is linked to a specific AWS service. The service controls the attached policies and when the role can be deleted. This helps ensure that the service is not broken by an unexpectedly changed or deleted role, which could put your AWS resources into an unknown state. Allowing the service to control the role helps improve service stability and proper cleanup when a service and its role are no longer needed.
The name of the role is generated by combining the string that you specify for the ‘AWSServiceName` parameter with the string that you specify for the `CustomSuffix` parameter. The resulting name must be unique in your account or the request fails.
To attach a policy to this service-linked role, you must make the request using the AWS service that depends on this role.
1633 1634 1635 1636 |
# File 'lib/aws-sdk-iam/client.rb', line 1633 def create_service_linked_role(params = {}, = {}) req = build_request(:create_service_linked_role, params) req.send_request() end |
#create_service_specific_credential(params = {}) ⇒ Types::CreateServiceSpecificCredentialResponse
Generates a set of credentials consisting of a user name and password that can be used to access the service specified in the request. These credentials are generated by IAM, and can be used only for the specified service.
You can have a maximum of two sets of service-specific credentials for each supported service per user.
The only supported service at this time is AWS CodeCommit.
You can reset the password to a new service-generated value by calling ResetServiceSpecificCredential.
For more information about service-specific credentials, see [Using IAM with AWS CodeCommit: Git Credentials, SSH Keys, and AWS Access Keys] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html
1704 1705 1706 1707 |
# File 'lib/aws-sdk-iam/client.rb', line 1704 def create_service_specific_credential(params = {}, = {}) req = build_request(:create_service_specific_credential, params) req.send_request() end |
#create_user(params = {}) ⇒ Types::CreateUserResponse
Creates a new IAM user for your AWS account.
For information about limitations on the number of IAM users you can create, see [Limitations on IAM Entities] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html
1801 1802 1803 1804 |
# File 'lib/aws-sdk-iam/client.rb', line 1801 def create_user(params = {}, = {}) req = build_request(:create_user, params) req.send_request() end |
#create_virtual_mfa_device(params = {}) ⇒ Types::CreateVirtualMFADeviceResponse
Creates a new virtual MFA device for the AWS account. After creating the virtual MFA, use EnableMFADevice to attach the MFA device to an IAM user. For more information about creating and working with virtual MFA devices, go to [Using a Virtual MFA Device] in the *IAM User Guide*.
For information about limits on the number of MFA devices you can create, see [Limitations on Entities] in the *IAM User Guide*.
The seed information contained in the QR code and the Base32 string should be treated like any other secret access information, such as your AWS access keys or your passwords. After you provision your virtual device, you should ensure that the information is destroyed following secure procedures.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html [2]: docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html
1888 1889 1890 1891 |
# File 'lib/aws-sdk-iam/client.rb', line 1888 def create_virtual_mfa_device(params = {}, = {}) req = build_request(:create_virtual_mfa_device, params) req.send_request() end |
#deactivate_mfa_device(params = {}) ⇒ Struct
Deactivates the specified MFA device and removes it from association with the user name for which it was originally enabled.
For more information about creating and working with virtual MFA devices, go to [Using a Virtual MFA Device] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html
1942 1943 1944 1945 |
# File 'lib/aws-sdk-iam/client.rb', line 1942 def deactivate_mfa_device(params = {}, = {}) req = build_request(:deactivate_mfa_device, params) req.send_request() end |
#delete_access_key(params = {}) ⇒ Struct
Deletes the access key pair associated with the specified IAM user.
If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request. Because this operation works for access keys under the AWS account, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated users.
2002 2003 2004 2005 |
# File 'lib/aws-sdk-iam/client.rb', line 2002 def delete_access_key(params = {}, = {}) req = build_request(:delete_access_key, params) req.send_request() end |
#delete_account_alias(params = {}) ⇒ Struct
Deletes the specified AWS account alias. For information about using an AWS account alias, see [Using an Alias for Your AWS Account ID] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html
2048 2049 2050 2051 |
# File 'lib/aws-sdk-iam/client.rb', line 2048 def delete_account_alias(params = {}, = {}) req = build_request(:delete_account_alias, params) req.send_request() end |
#delete_account_password_policy(params = {}) ⇒ Struct
Deletes the password policy for the AWS account. There are no parameters.
2070 2071 2072 2073 |
# File 'lib/aws-sdk-iam/client.rb', line 2070 def delete_account_password_policy(params = {}, = {}) req = build_request(:delete_account_password_policy, params) req.send_request() end |
#delete_group(params = {}) ⇒ Struct
Deletes the specified IAM group. The group must not contain any users or have any attached policies.
2102 2103 2104 2105 |
# File 'lib/aws-sdk-iam/client.rb', line 2102 def delete_group(params = {}, = {}) req = build_request(:delete_group, params) req.send_request() end |
#delete_group_policy(params = {}) ⇒ Struct
Deletes the specified inline policy that is embedded in the specified IAM group.
A group can also have managed policies attached to it. To detach a managed policy from a group, use DetachGroupPolicy. For more information about policies, refer to [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
2167 2168 2169 2170 |
# File 'lib/aws-sdk-iam/client.rb', line 2167 def delete_group_policy(params = {}, = {}) req = build_request(:delete_group_policy, params) req.send_request() end |
#delete_instance_profile(params = {}) ⇒ Struct
Deletes the specified instance profile. The instance profile must not have an associated role.
Make sure that you do not have any Amazon EC2 instances running with the instance profile you are about to delete. Deleting a role or instance profile that is associated with a running instance will break any applications running on the instance.
For more information about instance profiles, go to [About Instance Profiles].
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html
2220 2221 2222 2223 |
# File 'lib/aws-sdk-iam/client.rb', line 2220 def delete_instance_profile(params = {}, = {}) req = build_request(:delete_instance_profile, params) req.send_request() end |
#delete_login_profile(params = {}) ⇒ Struct
Deletes the password for the specified IAM user, which terminates the user’s ability to access AWS services through the AWS Management Console.
Deleting a user’s password does not prevent a user from accessing AWS through the command line interface or the API. To prevent all user access you must also either make any access keys inactive or delete them. For more information about making keys inactive or deleting them, see UpdateAccessKey and DeleteAccessKey.
2268 2269 2270 2271 |
# File 'lib/aws-sdk-iam/client.rb', line 2268 def delete_login_profile(params = {}, = {}) req = build_request(:delete_login_profile, params) req.send_request() end |
#delete_open_id_connect_provider(params = {}) ⇒ Struct
Deletes an OpenID Connect identity provider (IdP) resource object in IAM.
Deleting an IAM OIDC provider resource does not update any roles that reference the provider as a principal in their trust policies. Any attempt to assume a role that references a deleted provider fails.
This operation is idempotent; it does not fail or return an error if you call the operation for a provider that does not exist.
2301 2302 2303 2304 |
# File 'lib/aws-sdk-iam/client.rb', line 2301 def delete_open_id_connect_provider(params = {}, = {}) req = build_request(:delete_open_id_connect_provider, params) req.send_request() end |
#delete_policy(params = {}) ⇒ Struct
Deletes the specified managed policy.
Before you can delete a managed policy, you must first detach the policy from all users, groups, and roles that it is attached to. In addition you must delete all the policy’s versions. The following steps describe the process for deleting a managed policy:
-
Detach the policy from all users, groups, and roles that the policy is attached to, using the DetachUserPolicy, DetachGroupPolicy, or DetachRolePolicy API operations. To list all the users, groups, and roles that a policy is attached to, use ListEntitiesForPolicy.
-
Delete all versions of the policy using DeletePolicyVersion. To list the policy’s versions, use ListPolicyVersions. You cannot use DeletePolicyVersion to delete the version that is marked as the default version. You delete the policy’s default version in the next step of the process.
-
Delete the policy (this automatically deletes the policy’s default version) using this API.
For information about managed policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
2356 2357 2358 2359 |
# File 'lib/aws-sdk-iam/client.rb', line 2356 def delete_policy(params = {}, = {}) req = build_request(:delete_policy, params) req.send_request() end |
#delete_policy_version(params = {}) ⇒ Struct
Deletes the specified version from the specified managed policy.
You cannot delete the default version from a policy using this API. To delete the default version from a policy, use DeletePolicy. To find out which version of a policy is marked as the default version, use ListPolicyVersions.
For information about versions for managed policies, see [Versioning for Managed Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html
2415 2416 2417 2418 |
# File 'lib/aws-sdk-iam/client.rb', line 2415 def delete_policy_version(params = {}, = {}) req = build_request(:delete_policy_version, params) req.send_request() end |
#delete_role(params = {}) ⇒ Struct
Deletes the specified role. The role must not have any policies attached. For more information about roles, go to [Working with Roles].
Make sure that you do not have any Amazon EC2 instances running with the role you are about to delete. Deleting a role or instance profile that is associated with a running instance will break any applications running on the instance.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html
2466 2467 2468 2469 |
# File 'lib/aws-sdk-iam/client.rb', line 2466 def delete_role(params = {}, = {}) req = build_request(:delete_role, params) req.send_request() end |
#delete_role_permissions_boundary(params = {}) ⇒ Struct
Deletes the permissions boundary for the specified IAM role.
Deleting the permissions boundary for a role might increase its permissions by allowing anyone who assumes the role to perform all the actions granted in its permissions policies.
2493 2494 2495 2496 |
# File 'lib/aws-sdk-iam/client.rb', line 2493 def (params = {}, = {}) req = build_request(:delete_role_permissions_boundary, params) req.send_request() end |
#delete_role_policy(params = {}) ⇒ Struct
Deletes the specified inline policy that is embedded in the specified IAM role.
A role can also have managed policies attached to it. To detach a managed policy from a role, use DetachRolePolicy. For more information about policies, refer to [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
2558 2559 2560 2561 |
# File 'lib/aws-sdk-iam/client.rb', line 2558 def delete_role_policy(params = {}, = {}) req = build_request(:delete_role_policy, params) req.send_request() end |
#delete_saml_provider(params = {}) ⇒ Struct
Deletes a SAML provider resource in IAM.
Deleting the provider resource from IAM does not update any roles that reference the SAML provider resource’s ARN as a principal in their trust policies. Any attempt to assume a role that references a non-existent provider resource ARN fails.
<note markdown=“1”> This operation requires [Signature Version 4].
</note>
[1]: docs.aws.amazon.com/general/latest/gr/signature-version-4.html
2593 2594 2595 2596 |
# File 'lib/aws-sdk-iam/client.rb', line 2593 def delete_saml_provider(params = {}, = {}) req = build_request(:delete_saml_provider, params) req.send_request() end |
#delete_server_certificate(params = {}) ⇒ Struct
Deletes the specified server certificate.
For more information about working with server certificates, see
- Working with Server Certificates][1
-
in the *IAM User Guide*. This
topic also includes a list of AWS services that can use the server certificates that you manage with IAM.
If you are using a server certificate with Elastic Load Balancing, deleting the certificate could have implications for your application. If Elastic Load Balancing doesn’t detect the deletion of bound certificates, it may continue to use the certificates. This could cause Elastic Load Balancing to stop accepting traffic. We recommend that you remove the reference to the certificate from Elastic Load Balancing before using this command to delete the certificate. For more information, go to [DeleteLoadBalancerListeners] in the *Elastic Load Balancing API Reference*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html [2]: docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_DeleteLoadBalancerListeners.html
2697 2698 2699 2700 |
# File 'lib/aws-sdk-iam/client.rb', line 2697 def delete_server_certificate(params = {}, = {}) req = build_request(:delete_server_certificate, params) req.send_request() end |
#delete_service_linked_role(params = {}) ⇒ Types::DeleteServiceLinkedRoleResponse
Submits a service-linked role deletion request and returns a ‘DeletionTaskId`, which you can use to check the status of the deletion. Before you call this operation, confirm that the role has no active sessions and that any resources used by the role in the linked service are deleted. If you call this operation more than once for the same service-linked role and an earlier deletion task is not complete, then the `DeletionTaskId` of the earlier request is returned.
If you submit a deletion request for a service-linked role whose linked service is still accessing a resource, then the deletion task fails. If it fails, the GetServiceLinkedRoleDeletionStatus API operation returns the reason for the failure, usually including the resources that must be deleted. To delete the service-linked role, you must first remove those resources from the linked service and then submit the deletion request again. Resources are specific to the service that is linked to the role. For more information about removing resources from a service, see the [AWS documentation] for your service.
For more information about service-linked roles, see [Roles Terms and Concepts: AWS Service-Linked Role] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/ [2]: docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role
2750 2751 2752 2753 |
# File 'lib/aws-sdk-iam/client.rb', line 2750 def delete_service_linked_role(params = {}, = {}) req = build_request(:delete_service_linked_role, params) req.send_request() end |
#delete_service_specific_credential(params = {}) ⇒ Struct
Deletes the specified service-specific credential.
2796 2797 2798 2799 |
# File 'lib/aws-sdk-iam/client.rb', line 2796 def delete_service_specific_credential(params = {}, = {}) req = build_request(:delete_service_specific_credential, params) req.send_request() end |
#delete_signing_certificate(params = {}) ⇒ Struct
Deletes a signing certificate associated with the specified IAM user.
If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request. Because this operation works for access keys under the AWS account, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated IAM users.
2855 2856 2857 2858 |
# File 'lib/aws-sdk-iam/client.rb', line 2855 def delete_signing_certificate(params = {}, = {}) req = build_request(:delete_signing_certificate, params) req.send_request() end |
#delete_ssh_public_key(params = {}) ⇒ Struct
Deletes the specified SSH public key.
The SSH public key deleted by this operation is used only for authenticating the associated IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see [Set up AWS CodeCommit for SSH Connections] in the *AWS CodeCommit User Guide*.
[1]: docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html
2646 2647 2648 2649 |
# File 'lib/aws-sdk-iam/client.rb', line 2646 def delete_ssh_public_key(params = {}, = {}) req = build_request(:delete_ssh_public_key, params) req.send_request() end |
#delete_user(params = {}) ⇒ Struct
Deletes the specified IAM user. The user must not belong to any groups or have any access keys, signing certificates, or attached policies.
2896 2897 2898 2899 |
# File 'lib/aws-sdk-iam/client.rb', line 2896 def delete_user(params = {}, = {}) req = build_request(:delete_user, params) req.send_request() end |
#delete_user_permissions_boundary(params = {}) ⇒ Struct
Deletes the permissions boundary for the specified IAM user.
Deleting the permissions boundary for a user might increase its permissions by allowing the user to perform all the actions granted in its permissions policies.
2923 2924 2925 2926 |
# File 'lib/aws-sdk-iam/client.rb', line 2923 def (params = {}, = {}) req = build_request(:delete_user_permissions_boundary, params) req.send_request() end |
#delete_user_policy(params = {}) ⇒ Struct
Deletes the specified inline policy that is embedded in the specified IAM user.
A user can also have managed policies attached to it. To detach a managed policy from a user, use DetachUserPolicy. For more information about policies, refer to [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
2988 2989 2990 2991 |
# File 'lib/aws-sdk-iam/client.rb', line 2988 def delete_user_policy(params = {}, = {}) req = build_request(:delete_user_policy, params) req.send_request() end |
#delete_virtual_mfa_device(params = {}) ⇒ Struct
Deletes a virtual MFA device.
<note markdown=“1”> You must deactivate a user’s virtual MFA device before you can delete it. For information about deactivating MFA devices, see DeactivateMFADevice.
</note>
3035 3036 3037 3038 |
# File 'lib/aws-sdk-iam/client.rb', line 3035 def delete_virtual_mfa_device(params = {}, = {}) req = build_request(:delete_virtual_mfa_device, params) req.send_request() end |
#detach_group_policy(params = {}) ⇒ Struct
Removes the specified managed policy from the specified IAM group.
A group can also have inline policies embedded with it. To delete an inline policy, use the DeleteGroupPolicy API. For information about policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
3087 3088 3089 3090 |
# File 'lib/aws-sdk-iam/client.rb', line 3087 def detach_group_policy(params = {}, = {}) req = build_request(:detach_group_policy, params) req.send_request() end |
#detach_role_policy(params = {}) ⇒ Struct
Removes the specified managed policy from the specified role.
A role can also have inline policies embedded with it. To delete an inline policy, use the DeleteRolePolicy API. For information about policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
3139 3140 3141 3142 |
# File 'lib/aws-sdk-iam/client.rb', line 3139 def detach_role_policy(params = {}, = {}) req = build_request(:detach_role_policy, params) req.send_request() end |
#detach_user_policy(params = {}) ⇒ Struct
Removes the specified managed policy from the specified user.
A user can also have inline policies embedded with it. To delete an inline policy, use the DeleteUserPolicy API. For information about policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
3191 3192 3193 3194 |
# File 'lib/aws-sdk-iam/client.rb', line 3191 def detach_user_policy(params = {}, = {}) req = build_request(:detach_user_policy, params) req.send_request() end |
#enable_mfa_device(params = {}) ⇒ Struct
Enables the specified MFA device and associates it with the specified IAM user. When enabled, the MFA device is required for every subsequent login by the IAM user associated with the device.
3272 3273 3274 3275 |
# File 'lib/aws-sdk-iam/client.rb', line 3272 def enable_mfa_device(params = {}, = {}) req = build_request(:enable_mfa_device, params) req.send_request() end |
#generate_credential_report(params = {}) ⇒ Types::GenerateCredentialReportResponse
Generates a credential report for the AWS account. For more information about the credential report, see [Getting Credential Reports] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html
3299 3300 3301 3302 |
# File 'lib/aws-sdk-iam/client.rb', line 3299 def generate_credential_report(params = {}, = {}) req = build_request(:generate_credential_report, params) req.send_request() end |
#get_access_key_last_used(params = {}) ⇒ Types::GetAccessKeyLastUsedResponse
Retrieves information about when the specified access key was last used. The information includes the date and time of last use, along with the AWS service and region that were specified in the last request made with that key.
3342 3343 3344 3345 |
# File 'lib/aws-sdk-iam/client.rb', line 3342 def get_access_key_last_used(params = {}, = {}) req = build_request(:get_access_key_last_used, params) req.send_request() end |
#get_account_authorization_details(params = {}) ⇒ Types::GetAccountAuthorizationDetailsResponse
Retrieves information about all IAM users, groups, roles, and policies in your AWS account, including their relationships to one another. Use this API to obtain a snapshot of the configuration of IAM permissions (users, groups, roles, and policies) in your account.
<note markdown=“1”> Policies returned by this API are URL-encoded compliant with [RFC 3986]. You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ‘decode` method of the `java.net.URLDecoder` utility class in the Java SDK. Other languages and SDKs provide similar functionality.
</note>
You can optionally filter the results using the ‘Filter` parameter. You can paginate the results using the `MaxItems` and `Marker` parameters.
3498 3499 3500 3501 |
# File 'lib/aws-sdk-iam/client.rb', line 3498 def (params = {}, = {}) req = build_request(:get_account_authorization_details, params) req.send_request() end |
#get_account_password_policy(params = {}) ⇒ Types::GetAccountPasswordPolicyResponse
Retrieves the password policy for the AWS account. For more information about using a password policy, go to [Managing an IAM Password Policy].
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html
3556 3557 3558 3559 |
# File 'lib/aws-sdk-iam/client.rb', line 3556 def get_account_password_policy(params = {}, = {}) req = build_request(:get_account_password_policy, params) req.send_request() end |
#get_account_summary(params = {}) ⇒ Types::GetAccountSummaryResponse
Retrieves information about IAM entity usage and IAM quotas in the AWS account.
For information about limitations on IAM entities, see [Limitations on IAM Entities] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html
3623 3624 3625 3626 |
# File 'lib/aws-sdk-iam/client.rb', line 3623 def get_account_summary(params = {}, = {}) req = build_request(:get_account_summary, params) req.send_request() end |
#get_context_keys_for_custom_policy(params = {}) ⇒ Types::GetContextKeysForPolicyResponse
Gets a list of all of the context keys referenced in the input policies. The policies are supplied as a list of one or more strings. To get the context keys from policies associated with an IAM user, group, or role, use GetContextKeysForPrincipalPolicy.
Context keys are variables maintained by AWS and its services that provide details about the context of an API query request. Context keys can be evaluated by testing against a value specified in an IAM policy. Use ‘GetContextKeysForCustomPolicy` to understand what key names and values you must supply when you call SimulateCustomPolicy. Note that all parameters are shown in unencoded form here for clarity but must be URL encoded to be included as a part of a real HTML request.
3682 3683 3684 3685 |
# File 'lib/aws-sdk-iam/client.rb', line 3682 def get_context_keys_for_custom_policy(params = {}, = {}) req = build_request(:get_context_keys_for_custom_policy, params) req.send_request() end |
#get_context_keys_for_principal_policy(params = {}) ⇒ Types::GetContextKeysForPolicyResponse
Gets a list of all of the context keys referenced in all the IAM policies that are attached to the specified IAM entity. The entity can be an IAM user, group, or role. If you specify a user, then the request also includes all of the policies attached to groups that the user is a member of.
You can optionally include a list of one or more additional policies, specified as strings. If you want to include only a list of policies by string, use GetContextKeysForCustomPolicy instead.
Note: This API discloses information about the permissions granted to other users. If you do not want users to see other user’s permissions, then consider allowing them to use GetContextKeysForCustomPolicy instead.
Context keys are variables maintained by AWS and its services that provide details about the context of an API query request. Context keys can be evaluated by testing against a value in an IAM policy. Use GetContextKeysForPrincipalPolicy to understand what key names and values you must supply when you call SimulatePrincipalPolicy.
3765 3766 3767 3768 |
# File 'lib/aws-sdk-iam/client.rb', line 3765 def get_context_keys_for_principal_policy(params = {}, = {}) req = build_request(:get_context_keys_for_principal_policy, params) req.send_request() end |
#get_credential_report(params = {}) ⇒ Types::GetCredentialReportResponse
Retrieves a credential report for the AWS account. For more information about the credential report, see [Getting Credential Reports] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html
3794 3795 3796 3797 |
# File 'lib/aws-sdk-iam/client.rb', line 3794 def get_credential_report(params = {}, = {}) req = build_request(:get_credential_report, params) req.send_request() end |
#get_group(params = {}) ⇒ Types::GetGroupResponse
Returns a list of IAM users that are in the specified IAM group. You can paginate the results using the ‘MaxItems` and `Marker` parameters.
3870 3871 3872 3873 |
# File 'lib/aws-sdk-iam/client.rb', line 3870 def get_group(params = {}, = {}) req = build_request(:get_group, params) req.send_request() end |
#get_group_policy(params = {}) ⇒ Types::GetGroupPolicyResponse
Retrieves the specified inline policy document that is embedded in the specified IAM group.
<note markdown=“1”> Policies returned by this API are URL-encoded compliant with [RFC 3986]. You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ‘decode` method of the `java.net.URLDecoder` utility class in the Java SDK. Other languages and SDKs provide similar functionality.
</note>
An IAM group can also have managed policies attached to it. To retrieve a managed policy document that is attached to a group, use GetPolicy to determine the policy’s default version, then use GetPolicyVersion to retrieve the policy document.
For more information about policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: tools.ietf.org/html/rfc3986 [2]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
3946 3947 3948 3949 |
# File 'lib/aws-sdk-iam/client.rb', line 3946 def get_group_policy(params = {}, = {}) req = build_request(:get_group_policy, params) req.send_request() end |
#get_instance_profile(params = {}) ⇒ Types::GetInstanceProfileResponse
Retrieves information about the specified instance profile, including the instance profile’s path, GUID, ARN, and role. For more information about instance profiles, see [About Instance Profiles] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html
4035 4036 4037 4038 |
# File 'lib/aws-sdk-iam/client.rb', line 4035 def get_instance_profile(params = {}, = {}) req = build_request(:get_instance_profile, params) req.send_request() end |
#get_login_profile(params = {}) ⇒ Types::GetLoginProfileResponse
Retrieves the user name and password-creation date for the specified IAM user. If the user has not been assigned a password, the operation returns a 404 (‘NoSuchEntity`) error.
4093 4094 4095 4096 |
# File 'lib/aws-sdk-iam/client.rb', line 4093 def get_login_profile(params = {}, = {}) req = build_request(:get_login_profile, params) req.send_request() end |
#get_open_id_connect_provider(params = {}) ⇒ Types::GetOpenIDConnectProviderResponse
Returns information about the specified OpenID Connect (OIDC) provider resource object in IAM.
4139 4140 4141 4142 |
# File 'lib/aws-sdk-iam/client.rb', line 4139 def get_open_id_connect_provider(params = {}, = {}) req = build_request(:get_open_id_connect_provider, params) req.send_request() end |
#get_policy(params = {}) ⇒ Types::GetPolicyResponse
Retrieves information about the specified managed policy, including the policy’s default version and the total number of IAM users, groups, and roles to which the policy is attached. To retrieve the list of the specific users, groups, and roles that the policy is attached to, use the ListEntitiesForPolicy API. This API returns metadata about the policy. To retrieve the actual policy document for a specific version of the policy, use GetPolicyVersion.
This API retrieves information about managed policies. To retrieve information about an inline policy that is embedded with an IAM user, group, or role, use the GetUserPolicy, GetGroupPolicy, or GetRolePolicy API.
For more information about policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
4203 4204 4205 4206 |
# File 'lib/aws-sdk-iam/client.rb', line 4203 def get_policy(params = {}, = {}) req = build_request(:get_policy, params) req.send_request() end |
#get_policy_version(params = {}) ⇒ Types::GetPolicyVersionResponse
Retrieves information about the specified version of the specified managed policy, including the policy document.
<note markdown=“1”> Policies returned by this API are URL-encoded compliant with [RFC 3986]. You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ‘decode` method of the `java.net.URLDecoder` utility class in the Java SDK. Other languages and SDKs provide similar functionality.
</note>
To list the available versions for a policy, use ListPolicyVersions.
This API retrieves information about managed policies. To retrieve information about an inline policy that is embedded in a user, group, or role, use the GetUserPolicy, GetGroupPolicy, or GetRolePolicy API.
For more information about the types of policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
For more information about managed policy versions, see [Versioning for Managed Policies] in the *IAM User Guide*.
[1]: tools.ietf.org/html/rfc3986 [2]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html [3]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html
4282 4283 4284 4285 |
# File 'lib/aws-sdk-iam/client.rb', line 4282 def get_policy_version(params = {}, = {}) req = build_request(:get_policy_version, params) req.send_request() end |
#get_role(params = {}) ⇒ Types::GetRoleResponse
Retrieves information about the specified role, including the role’s path, GUID, ARN, and the role’s trust policy that grants permission to assume the role. For more information about roles, see [Working with Roles].
<note markdown=“1”> Policies returned by this API are URL-encoded compliant with [RFC 3986]. You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ‘decode` method of the `java.net.URLDecoder` utility class in the Java SDK. Other languages and SDKs provide similar functionality.
</note>
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html [2]: tools.ietf.org/html/rfc3986
4365 4366 4367 4368 |
# File 'lib/aws-sdk-iam/client.rb', line 4365 def get_role(params = {}, = {}) req = build_request(:get_role, params) req.send_request() end |
#get_role_policy(params = {}) ⇒ Types::GetRolePolicyResponse
Retrieves the specified inline policy document that is embedded with the specified IAM role.
<note markdown=“1”> Policies returned by this API are URL-encoded compliant with [RFC 3986]. You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ‘decode` method of the `java.net.URLDecoder` utility class in the Java SDK. Other languages and SDKs provide similar functionality.
</note>
An IAM role can also have managed policies attached to it. To retrieve a managed policy document that is attached to a role, use GetPolicy to determine the policy’s default version, then use GetPolicyVersion to retrieve the policy document.
For more information about policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
For more information about roles, see [Using Roles to Delegate Permissions and Federate Identities].
[1]: tools.ietf.org/html/rfc3986 [2]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html [3]: docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html
4445 4446 4447 4448 |
# File 'lib/aws-sdk-iam/client.rb', line 4445 def get_role_policy(params = {}, = {}) req = build_request(:get_role_policy, params) req.send_request() end |
#get_saml_provider(params = {}) ⇒ Types::GetSAMLProviderResponse
Returns the SAML provider metadocument that was uploaded when the IAM SAML provider resource object was created or updated.
<note markdown=“1”> This operation requires [Signature Version 4].
</note>
[1]: docs.aws.amazon.com/general/latest/gr/signature-version-4.html
4494 4495 4496 4497 |
# File 'lib/aws-sdk-iam/client.rb', line 4494 def get_saml_provider(params = {}, = {}) req = build_request(:get_saml_provider, params) req.send_request() end |
#get_server_certificate(params = {}) ⇒ Types::GetServerCertificateResponse
Retrieves information about the specified server certificate stored in IAM.
For more information about working with server certificates, see
- Working with Server Certificates][1
-
in the *IAM User Guide*. This
topic includes a list of AWS services that can use the server certificates that you manage with IAM.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html
4620 4621 4622 4623 |
# File 'lib/aws-sdk-iam/client.rb', line 4620 def get_server_certificate(params = {}, = {}) req = build_request(:get_server_certificate, params) req.send_request() end |
#get_service_linked_role_deletion_status(params = {}) ⇒ Types::GetServiceLinkedRoleDeletionStatusResponse
Retrieves the status of your service-linked role deletion. After you use the DeleteServiceLinkedRole API operation to submit a service-linked role for deletion, you can use the ‘DeletionTaskId` parameter in `GetServiceLinkedRoleDeletionStatus` to check the status of the deletion. If the deletion fails, this operation returns the reason that it failed, if that information is returned by the service.
4661 4662 4663 4664 |
# File 'lib/aws-sdk-iam/client.rb', line 4661 def get_service_linked_role_deletion_status(params = {}, = {}) req = build_request(:get_service_linked_role_deletion_status, params) req.send_request() end |
#get_ssh_public_key(params = {}) ⇒ Types::GetSSHPublicKeyResponse
Retrieves the specified SSH public key, including metadata about the key.
The SSH public key retrieved by this operation is used only for authenticating the associated IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see [Set up AWS CodeCommit for SSH Connections] in the *AWS CodeCommit User Guide*.
[1]: docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html
4565 4566 4567 4568 |
# File 'lib/aws-sdk-iam/client.rb', line 4565 def get_ssh_public_key(params = {}, = {}) req = build_request(:get_ssh_public_key, params) req.send_request() end |
#get_user(params = {}) ⇒ Types::GetUserResponse
Retrieves information about the specified IAM user, including the user’s creation date, path, unique ID, and ARN.
If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID used to sign the request to this API.
4731 4732 4733 4734 |
# File 'lib/aws-sdk-iam/client.rb', line 4731 def get_user(params = {}, = {}) req = build_request(:get_user, params) req.send_request() end |
#get_user_policy(params = {}) ⇒ Types::GetUserPolicyResponse
Retrieves the specified inline policy document that is embedded in the specified IAM user.
<note markdown=“1”> Policies returned by this API are URL-encoded compliant with [RFC 3986]. You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the ‘decode` method of the `java.net.URLDecoder` utility class in the Java SDK. Other languages and SDKs provide similar functionality.
</note>
An IAM user can also have managed policies attached to it. To retrieve a managed policy document that is attached to a user, use GetPolicy to determine the policy’s default version, then use GetPolicyVersion to retrieve the policy document.
For more information about policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: tools.ietf.org/html/rfc3986 [2]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
4807 4808 4809 4810 |
# File 'lib/aws-sdk-iam/client.rb', line 4807 def get_user_policy(params = {}, = {}) req = build_request(:get_user_policy, params) req.send_request() end |
#list_access_keys(params = {}) ⇒ Types::ListAccessKeysResponse
Returns information about the access key IDs associated with the specified IAM user. If there are none, the operation returns an empty list.
Although each user is limited to a small number of keys, you can still paginate the results using the ‘MaxItems` and `Marker` parameters.
If the ‘UserName` field is not specified, the user name is determined implicitly based on the AWS access key ID used to sign the request. Because this operation works for access keys under the AWS account, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated users.
<note markdown=“1”> To ensure the security of your AWS account, the secret access key is accessible only during key and user creation.
</note>
4915 4916 4917 4918 |
# File 'lib/aws-sdk-iam/client.rb', line 4915 def list_access_keys(params = {}, = {}) req = build_request(:list_access_keys, params) req.send_request() end |
#list_account_aliases(params = {}) ⇒ Types::ListAccountAliasesResponse
Lists the account alias associated with the AWS account (Note: you can have only one). For information about using an AWS account alias, see
- Using an Alias for Your AWS Account ID][1
-
in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html
4985 4986 4987 4988 |
# File 'lib/aws-sdk-iam/client.rb', line 4985 def list_account_aliases(params = {}, = {}) req = build_request(:list_account_aliases, params) req.send_request() end |
#list_attached_group_policies(params = {}) ⇒ Types::ListAttachedGroupPoliciesResponse
Lists all managed policies that are attached to the specified IAM group.
An IAM group can also have inline policies embedded with it. To list the inline policies for a group, use the ListGroupPolicies API. For information about policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
You can paginate the results using the ‘MaxItems` and `Marker` parameters. You can use the `PathPrefix` parameter to limit the list of policies to only those matching the specified path prefix. If there are no policies attached to the specified group (or none that match the specified path prefix), the operation returns an empty list.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
5082 5083 5084 5085 |
# File 'lib/aws-sdk-iam/client.rb', line 5082 def list_attached_group_policies(params = {}, = {}) req = build_request(:list_attached_group_policies, params) req.send_request() end |
#list_attached_role_policies(params = {}) ⇒ Types::ListAttachedRolePoliciesResponse
Lists all managed policies that are attached to the specified IAM role.
An IAM role can also have inline policies embedded with it. To list the inline policies for a role, use the ListRolePolicies API. For information about policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
You can paginate the results using the ‘MaxItems` and `Marker` parameters. You can use the `PathPrefix` parameter to limit the list of policies to only those matching the specified path prefix. If there are no policies attached to the specified role (or none that match the specified path prefix), the operation returns an empty list.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
5179 5180 5181 5182 |
# File 'lib/aws-sdk-iam/client.rb', line 5179 def list_attached_role_policies(params = {}, = {}) req = build_request(:list_attached_role_policies, params) req.send_request() end |
#list_attached_user_policies(params = {}) ⇒ Types::ListAttachedUserPoliciesResponse
Lists all managed policies that are attached to the specified IAM user.
An IAM user can also have inline policies embedded with it. To list the inline policies for a user, use the ListUserPolicies API. For information about policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
You can paginate the results using the ‘MaxItems` and `Marker` parameters. You can use the `PathPrefix` parameter to limit the list of policies to only those matching the specified path prefix. If there are no policies attached to the specified group (or none that match the specified path prefix), the operation returns an empty list.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
5276 5277 5278 5279 |
# File 'lib/aws-sdk-iam/client.rb', line 5276 def list_attached_user_policies(params = {}, = {}) req = build_request(:list_attached_user_policies, params) req.send_request() end |
#list_entities_for_policy(params = {}) ⇒ Types::ListEntitiesForPolicyResponse
Lists all IAM users, groups, and roles that the specified managed policy is attached to.
You can use the optional ‘EntityFilter` parameter to limit the results to a particular type of entity (users, groups, or roles). For example, to list only the roles that are attached to the specified policy, set `EntityFilter` to `Role`.
You can paginate the results using the ‘MaxItems` and `Marker` parameters.
5394 5395 5396 5397 |
# File 'lib/aws-sdk-iam/client.rb', line 5394 def list_entities_for_policy(params = {}, = {}) req = build_request(:list_entities_for_policy, params) req.send_request() end |
#list_group_policies(params = {}) ⇒ Types::ListGroupPoliciesResponse
Lists the names of the inline policies that are embedded in the specified IAM group.
An IAM group can also have managed policies attached to it. To list the managed policies that are attached to a group, use ListAttachedGroupPolicies. For more information about policies, see
- Managed Policies and Inline Policies][1
-
in the *IAM User Guide*.
You can paginate the results using the ‘MaxItems` and `Marker` parameters. If there are no inline policies embedded with the specified group, the operation returns an empty list.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
5487 5488 5489 5490 |
# File 'lib/aws-sdk-iam/client.rb', line 5487 def list_group_policies(params = {}, = {}) req = build_request(:list_group_policies, params) req.send_request() end |
#list_groups(params = {}) ⇒ Types::ListGroupsResponse
Lists the IAM groups that have the specified path prefix.
You can paginate the results using the ‘MaxItems` and `Marker` parameters.
5596 5597 5598 5599 |
# File 'lib/aws-sdk-iam/client.rb', line 5596 def list_groups(params = {}, = {}) req = build_request(:list_groups, params) req.send_request() end |
#list_groups_for_user(params = {}) ⇒ Types::ListGroupsForUserResponse
Lists the IAM groups that the specified IAM user belongs to.
You can paginate the results using the ‘MaxItems` and `Marker` parameters.
5694 5695 5696 5697 |
# File 'lib/aws-sdk-iam/client.rb', line 5694 def list_groups_for_user(params = {}, = {}) req = build_request(:list_groups_for_user, params) req.send_request() end |
#list_instance_profiles(params = {}) ⇒ Types::ListInstanceProfilesResponse
Lists the instance profiles that have the specified path prefix. If there are none, the operation returns an empty list. For more information about instance profiles, go to [About Instance Profiles].
You can paginate the results using the ‘MaxItems` and `Marker` parameters.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html
5786 5787 5788 5789 |
# File 'lib/aws-sdk-iam/client.rb', line 5786 def list_instance_profiles(params = {}, = {}) req = build_request(:list_instance_profiles, params) req.send_request() end |
#list_instance_profiles_for_role(params = {}) ⇒ Types::ListInstanceProfilesForRoleResponse
Lists the instance profiles that have the specified associated IAM role. If there are none, the operation returns an empty list. For more information about instance profiles, go to [About Instance Profiles].
You can paginate the results using the ‘MaxItems` and `Marker` parameters.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html
5873 5874 5875 5876 |
# File 'lib/aws-sdk-iam/client.rb', line 5873 def list_instance_profiles_for_role(params = {}, = {}) req = build_request(:list_instance_profiles_for_role, params) req.send_request() end |
#list_mfa_devices(params = {}) ⇒ Types::ListMFADevicesResponse
Lists the MFA devices for an IAM user. If the request includes a IAM user name, then this operation lists all the MFA devices associated with the specified user. If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request for this API.
You can paginate the results using the ‘MaxItems` and `Marker` parameters.
5944 5945 5946 5947 |
# File 'lib/aws-sdk-iam/client.rb', line 5944 def list_mfa_devices(params = {}, = {}) req = build_request(:list_mfa_devices, params) req.send_request() end |
#list_open_id_connect_providers(params = {}) ⇒ Types::ListOpenIDConnectProvidersResponse
Lists information about the IAM OpenID Connect (OIDC) provider resource objects defined in the AWS account.
5965 5966 5967 5968 |
# File 'lib/aws-sdk-iam/client.rb', line 5965 def list_open_id_connect_providers(params = {}, = {}) req = build_request(:list_open_id_connect_providers, params) req.send_request() end |
#list_policies(params = {}) ⇒ Types::ListPoliciesResponse
Lists all the managed policies that are available in your AWS account, including your own customer-defined managed policies and all AWS managed policies.
You can filter the list of policies that is returned using the optional ‘OnlyAttached`, `Scope`, and `PathPrefix` parameters. For example, to list only the customer managed policies in your AWS account, set `Scope` to `Local`. To list only AWS managed policies, set `Scope` to `AWS`.
You can paginate the results using the ‘MaxItems` and `Marker` parameters.
For more information about managed policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
6089 6090 6091 6092 |
# File 'lib/aws-sdk-iam/client.rb', line 6089 def list_policies(params = {}, = {}) req = build_request(:list_policies, params) req.send_request() end |
#list_policy_versions(params = {}) ⇒ Types::ListPolicyVersionsResponse
Lists information about the versions of the specified managed policy, including the version that is currently set as the policy’s default version.
For more information about managed policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
6162 6163 6164 6165 |
# File 'lib/aws-sdk-iam/client.rb', line 6162 def list_policy_versions(params = {}, = {}) req = build_request(:list_policy_versions, params) req.send_request() end |
#list_role_policies(params = {}) ⇒ Types::ListRolePoliciesResponse
Lists the names of the inline policies that are embedded in the specified IAM role.
An IAM role can also have managed policies attached to it. To list the managed policies that are attached to a role, use ListAttachedRolePolicies. For more information about policies, see
- Managed Policies and Inline Policies][1
-
in the *IAM User Guide*.
You can paginate the results using the ‘MaxItems` and `Marker` parameters. If there are no inline policies embedded with the specified role, the operation returns an empty list.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
6238 6239 6240 6241 |
# File 'lib/aws-sdk-iam/client.rb', line 6238 def list_role_policies(params = {}, = {}) req = build_request(:list_role_policies, params) req.send_request() end |
#list_roles(params = {}) ⇒ Types::ListRolesResponse
Lists the IAM roles that have the specified path prefix. If there are none, the operation returns an empty list. For more information about roles, go to [Working with Roles].
You can paginate the results using the ‘MaxItems` and `Marker` parameters.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html
6323 6324 6325 6326 |
# File 'lib/aws-sdk-iam/client.rb', line 6323 def list_roles(params = {}, = {}) req = build_request(:list_roles, params) req.send_request() end |
#list_saml_providers(params = {}) ⇒ Types::ListSAMLProvidersResponse
Lists the SAML provider resource objects defined in IAM in the account.
<note markdown=“1”> This operation requires [Signature Version 4].
</note>
[1]: docs.aws.amazon.com/general/latest/gr/signature-version-4.html
6354 6355 6356 6357 |
# File 'lib/aws-sdk-iam/client.rb', line 6354 def list_saml_providers(params = {}, = {}) req = build_request(:list_saml_providers, params) req.send_request() end |
#list_server_certificates(params = {}) ⇒ Types::ListServerCertificatesResponse
Lists the server certificates stored in IAM that have the specified path prefix. If none exist, the operation returns an empty list.
You can paginate the results using the ‘MaxItems` and `Marker` parameters.
For more information about working with server certificates, see
- Working with Server Certificates][1
-
in the *IAM User Guide*. This
topic also includes a list of AWS services that can use the server certificates that you manage with IAM.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html
6521 6522 6523 6524 |
# File 'lib/aws-sdk-iam/client.rb', line 6521 def list_server_certificates(params = {}, = {}) req = build_request(:list_server_certificates, params) req.send_request() end |
#list_service_specific_credentials(params = {}) ⇒ Types::ListServiceSpecificCredentialsResponse
Returns information about the service-specific credentials associated with the specified IAM user. If there are none, the operation returns an empty list. The service-specific credentials returned by this operation are used only for authenticating the IAM user to a specific service. For more information about using service-specific credentials to authenticate to an AWS service, see [Set Up service-specific credentials] in the AWS CodeCommit User Guide.
[1]: docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html
6582 6583 6584 6585 |
# File 'lib/aws-sdk-iam/client.rb', line 6582 def list_service_specific_credentials(params = {}, = {}) req = build_request(:list_service_specific_credentials, params) req.send_request() end |
#list_signing_certificates(params = {}) ⇒ Types::ListSigningCertificatesResponse
Returns information about the signing certificates associated with the specified IAM user. If there are none, the operation returns an empty list.
Although each user is limited to a small number of signing certificates, you can still paginate the results using the ‘MaxItems` and `Marker` parameters.
If the ‘UserName` field is not specified, the user name is determined implicitly based on the AWS access key ID used to sign the request for this API. Because this operation works for access keys under the AWS account, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated users.
6683 6684 6685 6686 |
# File 'lib/aws-sdk-iam/client.rb', line 6683 def list_signing_certificates(params = {}, = {}) req = build_request(:list_signing_certificates, params) req.send_request() end |
#list_ssh_public_keys(params = {}) ⇒ Types::ListSSHPublicKeysResponse
Returns information about the SSH public keys associated with the specified IAM user. If there are none, the operation returns an empty list.
The SSH public keys returned by this operation are used only for authenticating the IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see [Set up AWS CodeCommit for SSH Connections] in the *AWS CodeCommit User Guide*.
Although each user is limited to a small number of keys, you can still paginate the results using the ‘MaxItems` and `Marker` parameters.
[1]: docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html
6436 6437 6438 6439 |
# File 'lib/aws-sdk-iam/client.rb', line 6436 def list_ssh_public_keys(params = {}, = {}) req = build_request(:list_ssh_public_keys, params) req.send_request() end |
#list_user_policies(params = {}) ⇒ Types::ListUserPoliciesResponse
Lists the names of the inline policies embedded in the specified IAM user.
An IAM user can also have managed policies attached to it. To list the managed policies that are attached to a user, use ListAttachedUserPolicies. For more information about policies, see
- Managed Policies and Inline Policies][1
-
in the *IAM User Guide*.
You can paginate the results using the ‘MaxItems` and `Marker` parameters. If there are no inline policies embedded with the specified user, the operation returns an empty list.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
6759 6760 6761 6762 |
# File 'lib/aws-sdk-iam/client.rb', line 6759 def list_user_policies(params = {}, = {}) req = build_request(:list_user_policies, params) req.send_request() end |
#list_users(params = {}) ⇒ Types::ListUsersResponse
Lists the IAM users that have the specified path prefix. If no path prefix is specified, the operation returns all users in the AWS account. If there are none, the operation returns an empty list.
You can paginate the results using the ‘MaxItems` and `Marker` parameters.
6868 6869 6870 6871 |
# File 'lib/aws-sdk-iam/client.rb', line 6868 def list_users(params = {}, = {}) req = build_request(:list_users, params) req.send_request() end |
#list_virtual_mfa_devices(params = {}) ⇒ Types::ListVirtualMFADevicesResponse
Lists the virtual MFA devices defined in the AWS account by assignment status. If you do not specify an assignment status, the operation returns a list of all virtual MFA devices. Assignment status can be ‘Assigned`, `Unassigned`, or `Any`.
You can paginate the results using the ‘MaxItems` and `Marker` parameters.
6960 6961 6962 6963 |
# File 'lib/aws-sdk-iam/client.rb', line 6960 def list_virtual_mfa_devices(params = {}, = {}) req = build_request(:list_virtual_mfa_devices, params) req.send_request() end |
#put_group_policy(params = {}) ⇒ Struct
Adds or updates an inline policy document that is embedded in the specified IAM group.
A user can also have managed policies attached to it. To attach a managed policy to a group, use AttachGroupPolicy. To create a new managed policy, use CreatePolicy. For information about policies, see
- Managed Policies and Inline Policies][1
-
in the *IAM User Guide*.
For information about limits on the number of inline policies that you can embed in a group, see [Limitations on IAM Entities] in the *IAM User Guide*.
<note markdown=“1”> Because policy documents can be large, you should use POST rather than GET when calling ‘PutGroupPolicy`. For general information about using the Query API with IAM, go to [Making Query Requests] in the *IAM User Guide*.
</note>
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html [2]: docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html [3]: docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html
7058 7059 7060 7061 |
# File 'lib/aws-sdk-iam/client.rb', line 7058 def put_group_policy(params = {}, = {}) req = build_request(:put_group_policy, params) req.send_request() end |
#put_role_permissions_boundary(params = {}) ⇒ Struct
Adds or updates the policy that is specified as the IAM role’s permissions boundary. You can use an AWS managed policy or a customer managed policy to set the boundary for a role. Use the boundary to control the maximum permissions that the role can have. Setting a permissions boundary is an advanced feature that can affect the permissions for the role.
You cannot set the boundary for a service-linked role.
Policies used as permissions boundaries do not provide permissions. You must also attach a permissions policy to the role. To learn how the effective permissions for a role are evaluated, see [IAM JSON Policy Evaluation Logic] in the IAM User Guide.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html
7102 7103 7104 7105 |
# File 'lib/aws-sdk-iam/client.rb', line 7102 def (params = {}, = {}) req = build_request(:put_role_permissions_boundary, params) req.send_request() end |
#put_role_policy(params = {}) ⇒ Struct
Adds or updates an inline policy document that is embedded in the specified IAM role.
When you embed an inline policy in a role, the inline policy is used as part of the role’s access (permissions) policy. The role’s trust policy is created at the same time as the role, using CreateRole. You can update a role’s trust policy using UpdateAssumeRolePolicy. For more information about IAM roles, go to [Using Roles to Delegate Permissions and Federate Identities].
A role can also have a managed policy attached to it. To attach a managed policy to a role, use AttachRolePolicy. To create a new managed policy, use CreatePolicy. For information about policies, see
- Managed Policies and Inline Policies][2
-
in the *IAM User Guide*.
For information about limits on the number of inline policies that you can embed with a role, see [Limitations on IAM Entities] in the *IAM User Guide*.
<note markdown=“1”> Because policy documents can be large, you should use POST rather than GET when calling ‘PutRolePolicy`. For general information about using the Query API with IAM, go to [Making Query Requests] in the *IAM User Guide*.
</note>
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html [2]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html [3]: docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html [4]: docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html
7208 7209 7210 7211 |
# File 'lib/aws-sdk-iam/client.rb', line 7208 def put_role_policy(params = {}, = {}) req = build_request(:put_role_policy, params) req.send_request() end |
#put_user_permissions_boundary(params = {}) ⇒ Struct
Adds or updates the policy that is specified as the IAM user’s permissions boundary. You can use an AWS managed policy or a customer managed policy to set the boundary for a user. Use the boundary to control the maximum permissions that the user can have. Setting a permissions boundary is an advanced feature that can affect the permissions for the user.
Policies that are used as permissions boundaries do not provide permissions. You must also attach a permissions policy to the user. To learn how the effective permissions for a user are evaluated, see [IAM JSON Policy Evaluation Logic] in the IAM User Guide.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html
7250 7251 7252 7253 |
# File 'lib/aws-sdk-iam/client.rb', line 7250 def (params = {}, = {}) req = build_request(:put_user_permissions_boundary, params) req.send_request() end |
#put_user_policy(params = {}) ⇒ Struct
Adds or updates an inline policy document that is embedded in the specified IAM user.
An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use AttachUserPolicy. To create a new managed policy, use CreatePolicy. For information about policies, see
- Managed Policies and Inline Policies][1
-
in the *IAM User Guide*.
For information about limits on the number of inline policies that you can embed in a user, see [Limitations on IAM Entities] in the *IAM User Guide*.
<note markdown=“1”> Because policy documents can be large, you should use POST rather than GET when calling ‘PutUserPolicy`. For general information about using the Query API with IAM, go to [Making Query Requests] in the *IAM User Guide*.
</note>
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html [2]: docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html [3]: docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html
7348 7349 7350 7351 |
# File 'lib/aws-sdk-iam/client.rb', line 7348 def put_user_policy(params = {}, = {}) req = build_request(:put_user_policy, params) req.send_request() end |
#remove_client_id_from_open_id_connect_provider(params = {}) ⇒ Struct
Removes the specified client ID (also known as audience) from the list of client IDs registered for the specified IAM OpenID Connect (OIDC) provider resource object.
This operation is idempotent; it does not fail or return an error if you try to remove a client ID that does not exist.
7390 7391 7392 7393 |
# File 'lib/aws-sdk-iam/client.rb', line 7390 def remove_client_id_from_open_id_connect_provider(params = {}, = {}) req = build_request(:remove_client_id_from_open_id_connect_provider, params) req.send_request() end |
#remove_role_from_instance_profile(params = {}) ⇒ Struct
Removes the specified IAM role from the specified EC2 instance profile.
Make sure that you do not have any Amazon EC2 instances running with the role you are about to remove from the instance profile. Removing a role from an instance profile that is associated with a running instance might break any applications running on the instance.
For more information about IAM roles, go to [Working with Roles]. For more information about instance profiles, go to [About Instance Profiles].
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html [2]: docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html
7459 7460 7461 7462 |
# File 'lib/aws-sdk-iam/client.rb', line 7459 def remove_role_from_instance_profile(params = {}, = {}) req = build_request(:remove_role_from_instance_profile, params) req.send_request() end |
#remove_user_from_group(params = {}) ⇒ Struct
Removes the specified user from the specified group.
7513 7514 7515 7516 |
# File 'lib/aws-sdk-iam/client.rb', line 7513 def remove_user_from_group(params = {}, = {}) req = build_request(:remove_user_from_group, params) req.send_request() end |
#reset_service_specific_credential(params = {}) ⇒ Types::ResetServiceSpecificCredentialResponse
Resets the password for a service-specific credential. The new password is AWS generated and cryptographically strong. It cannot be configured by the user. Resetting the password immediately invalidates the previous password associated with this user.
7573 7574 7575 7576 |
# File 'lib/aws-sdk-iam/client.rb', line 7573 def reset_service_specific_credential(params = {}, = {}) req = build_request(:reset_service_specific_credential, params) req.send_request() end |
#resync_mfa_device(params = {}) ⇒ Struct
Synchronizes the specified MFA device with its IAM resource object on the AWS servers.
For more information about creating and working with virtual MFA devices, go to [Using a Virtual MFA Device] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html
7638 7639 7640 7641 |
# File 'lib/aws-sdk-iam/client.rb', line 7638 def resync_mfa_device(params = {}, = {}) req = build_request(:resync_mfa_device, params) req.send_request() end |
#set_default_policy_version(params = {}) ⇒ Struct
Sets the specified version of the specified policy as the policy’s default (operative) version.
This operation affects all users, groups, and roles that the policy is attached to. To list the users, groups, and roles that the policy is attached to, use the ListEntitiesForPolicy API.
For information about managed policies, see [Managed Policies and Inline Policies] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html
7691 7692 7693 7694 |
# File 'lib/aws-sdk-iam/client.rb', line 7691 def set_default_policy_version(params = {}, = {}) req = build_request(:set_default_policy_version, params) req.send_request() end |
#simulate_custom_policy(params = {}) ⇒ Types::SimulatePolicyResponse
Simulate how a set of IAM policies and optionally a resource-based policy works with a list of API operations and AWS resources to determine the policies’ effective permissions. The policies are provided as strings.
The simulation does not perform the API operations; it only checks the authorization to determine if the simulated policies allow or deny the operations.
If you want to simulate existing policies attached to an IAM user, group, or role, use SimulatePrincipalPolicy instead.
Context keys are variables maintained by AWS and its services that provide details about the context of an API query request. You can use the ‘Condition` element of an IAM policy to evaluate context keys. To get the list of context keys that the policies require for correct simulation, use GetContextKeysForCustomPolicy.
If the output is long, you can use ‘MaxItems` and `Marker` parameters to paginate the results.
7958 7959 7960 7961 |
# File 'lib/aws-sdk-iam/client.rb', line 7958 def simulate_custom_policy(params = {}, = {}) req = build_request(:simulate_custom_policy, params) req.send_request() end |
#simulate_principal_policy(params = {}) ⇒ Types::SimulatePolicyResponse
Simulate how a set of IAM policies attached to an IAM entity works with a list of API operations and AWS resources to determine the policies’ effective permissions. The entity can be an IAM user, group, or role. If you specify a user, then the simulation also includes all of the policies that are attached to groups that the user belongs to.
You can optionally include a list of one or more additional policies specified as strings to include in the simulation. If you want to simulate only policies specified as strings, use SimulateCustomPolicy instead.
You can also optionally include one resource-based policy to be evaluated with each of the resources included in the simulation.
The simulation does not perform the API operations, it only checks the authorization to determine if the simulated policies allow or deny the operations.
Note: This API discloses information about the permissions granted to other users. If you do not want users to see other user’s permissions, then consider allowing them to use SimulateCustomPolicy instead.
Context keys are variables maintained by AWS and its services that provide details about the context of an API query request. You can use the ‘Condition` element of an IAM policy to evaluate context keys. To get the list of context keys that the policies require for correct simulation, use GetContextKeysForPrincipalPolicy.
If the output is long, you can use the ‘MaxItems` and `Marker` parameters to paginate the results.
8252 8253 8254 8255 |
# File 'lib/aws-sdk-iam/client.rb', line 8252 def simulate_principal_policy(params = {}, = {}) req = build_request(:simulate_principal_policy, params) req.send_request() end |
#update_access_key(params = {}) ⇒ Struct
Changes the status of the specified access key from Active to Inactive, or vice versa. This operation can be used to disable a user’s key as part of a key rotation workflow.
If the ‘UserName` field is not specified, the user name is determined implicitly based on the AWS access key ID used to sign the request. Because this operation works for access keys under the AWS account, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated users.
For information about rotating keys, see [Managing Keys and Certificates] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html
8328 8329 8330 8331 |
# File 'lib/aws-sdk-iam/client.rb', line 8328 def update_access_key(params = {}, = {}) req = build_request(:update_access_key, params) req.send_request() end |
#update_account_password_policy(params = {}) ⇒ Struct
Updates the password policy settings for the AWS account.
<note markdown=“1”> * This operation does not support partial updates. No parameters are
required, but if you do not specify a parameter, that parameter's
value reverts to its default value. See the **Request Parameters**
section for each parameter's default value. Also note that some
parameters do not allow the default parameter to be explicitly set.
Instead, to invoke the default value, do not include that parameter
when you invoke the operation.
^
</note>
For more information about using a password policy, see [Managing an IAM Password Policy] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html
8464 8465 8466 8467 |
# File 'lib/aws-sdk-iam/client.rb', line 8464 def update_account_password_policy(params = {}, = {}) req = build_request(:update_account_password_policy, params) req.send_request() end |
#update_assume_role_policy(params = {}) ⇒ Struct
Updates the policy that grants an IAM entity permission to assume a role. This is typically referred to as the “role trust policy”. For more information about roles, go to [Using Roles to Delegate Permissions and Federate Identities].
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html
8532 8533 8534 8535 |
# File 'lib/aws-sdk-iam/client.rb', line 8532 def update_assume_role_policy(params = {}, = {}) req = build_request(:update_assume_role_policy, params) req.send_request() end |
#update_group(params = {}) ⇒ Struct
Updates the name and/or the path of the specified IAM group.
You should understand the implications of changing a group’s path or name. For more information, see [Renaming Users and Groups] in the *IAM User Guide*.
<note markdown=“1”> The person making the request (the principal), must have permission to change the role group with the old name and the new name. For example, to change the group named ‘Managers` to `MGRs`, the principal must have a policy that allows them to update both groups. If the principal has permission to update the `Managers` group, but not the `MGRs` group, then the update fails. For more information about permissions, see [Access Management].
</note>
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/Using_WorkingWithGroupsAndUsers.html [2]: docs.aws.amazon.com/IAM/latest/UserGuide/access.html
8623 8624 8625 8626 |
# File 'lib/aws-sdk-iam/client.rb', line 8623 def update_group(params = {}, = {}) req = build_request(:update_group, params) req.send_request() end |
#update_login_profile(params = {}) ⇒ Struct
Changes the password for the specified IAM user.
IAM users can change their own passwords by calling ChangePassword. For more information about modifying passwords, see [Managing Passwords] in the *IAM User Guide*.
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html
8701 8702 8703 8704 |
# File 'lib/aws-sdk-iam/client.rb', line 8701 def update_login_profile(params = {}, = {}) req = build_request(:update_login_profile, params) req.send_request() end |
#update_open_id_connect_provider_thumbprint(params = {}) ⇒ Struct
Replaces the existing list of server certificate thumbprints associated with an OpenID Connect (OIDC) provider resource object with a new list of thumbprints.
The list that you pass with this operation completely replaces the existing list of thumbprints. (The lists are not merged.)
Typically, you need to update a thumbprint only when the identity provider’s certificate changes, which occurs rarely. However, if the provider’s certificate does change, any attempt to assume an IAM role that specifies the OIDC provider as a principal fails until the certificate thumbprint is updated.
<note markdown=“1”> Because trust for the OIDC provider is derived from the provider’s certificate and is validated by the thumbprint, it is best to limit access to the ‘UpdateOpenIDConnectProviderThumbprint` operation to highly privileged users.
</note>
8757 8758 8759 8760 |
# File 'lib/aws-sdk-iam/client.rb', line 8757 def update_open_id_connect_provider_thumbprint(params = {}, = {}) req = build_request(:update_open_id_connect_provider_thumbprint, params) req.send_request() end |
#update_role(params = {}) ⇒ Struct
Updates the description or maximum session duration setting of a role.
8805 8806 8807 8808 |
# File 'lib/aws-sdk-iam/client.rb', line 8805 def update_role(params = {}, = {}) req = build_request(:update_role, params) req.send_request() end |
#update_role_description(params = {}) ⇒ Types::UpdateRoleDescriptionResponse
Use instead.
Modifies only the description of a role. This operation performs the same function as the ‘Description` parameter in the `UpdateRole` operation.
8850 8851 8852 8853 |
# File 'lib/aws-sdk-iam/client.rb', line 8850 def update_role_description(params = {}, = {}) req = build_request(:update_role_description, params) req.send_request() end |
#update_saml_provider(params = {}) ⇒ Types::UpdateSAMLProviderResponse
Updates the metadata document for an existing SAML provider resource object.
<note markdown=“1”> This operation requires [Signature Version 4].
</note>
[1]: docs.aws.amazon.com/general/latest/gr/signature-version-4.html
8903 8904 8905 8906 |
# File 'lib/aws-sdk-iam/client.rb', line 8903 def update_saml_provider(params = {}, = {}) req = build_request(:update_saml_provider, params) req.send_request() end |
#update_server_certificate(params = {}) ⇒ Struct
Updates the name and/or the path of the specified server certificate stored in IAM.
For more information about working with server certificates, see
- Working with Server Certificates][1
-
in the *IAM User Guide*. This
topic also includes a list of AWS services that can use the server certificates that you manage with IAM.
You should understand the implications of changing a server certificate’s path or name. For more information, see [Renaming a Server Certificate] in the *IAM User Guide*.
<note markdown=“1”> The person making the request (the principal), must have permission to change the server certificate with the old name and the new name. For example, to change the certificate named ‘ProductionCert` to `ProdCert`, the principal must have a policy that allows them to update both certificates. If the principal has permission to update the `ProductionCert` group, but not the `ProdCert` certificate, then the update fails. For more information about permissions, see [Access Management] in the *IAM User Guide*.
</note>
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html [2]: docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs_manage.html#RenamingServerCerts [3]: docs.aws.amazon.com/IAM/latest/UserGuide/access.html
9054 9055 9056 9057 |
# File 'lib/aws-sdk-iam/client.rb', line 9054 def update_server_certificate(params = {}, = {}) req = build_request(:update_server_certificate, params) req.send_request() end |
#update_service_specific_credential(params = {}) ⇒ Struct
Sets the status of a service-specific credential to ‘Active` or `Inactive`. Service-specific credentials that are inactive cannot be used for authentication to the service. This operation can be used to disable a user’s service-specific credential as part of a credential rotation work flow.
9107 9108 9109 9110 |
# File 'lib/aws-sdk-iam/client.rb', line 9107 def update_service_specific_credential(params = {}, = {}) req = build_request(:update_service_specific_credential, params) req.send_request() end |
#update_signing_certificate(params = {}) ⇒ Struct
Changes the status of the specified user signing certificate from active to disabled, or vice versa. This operation can be used to disable an IAM user’s signing certificate as part of a certificate rotation work flow.
If the ‘UserName` field is not specified, the user name is determined implicitly based on the AWS access key ID used to sign the request. Because this operation works for access keys under the AWS account, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated users.
9176 9177 9178 9179 |
# File 'lib/aws-sdk-iam/client.rb', line 9176 def update_signing_certificate(params = {}, = {}) req = build_request(:update_signing_certificate, params) req.send_request() end |
#update_ssh_public_key(params = {}) ⇒ Struct
Sets the status of an IAM user’s SSH public key to active or inactive. SSH public keys that are inactive cannot be used for authentication. This operation can be used to disable a user’s SSH public key as part of a key rotation work flow.
The SSH public key affected by this operation is used only for authenticating the associated IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see [Set up AWS CodeCommit for SSH Connections] in the *AWS CodeCommit User Guide*.
[1]: docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html
8965 8966 8967 8968 |
# File 'lib/aws-sdk-iam/client.rb', line 8965 def update_ssh_public_key(params = {}, = {}) req = build_request(:update_ssh_public_key, params) req.send_request() end |
#update_user(params = {}) ⇒ Struct
Updates the name and/or the path of the specified IAM user.
You should understand the implications of changing an IAM user’s path or name. For more information, see [Renaming an IAM User] and
- Renaming an IAM Group][2
-
in the *IAM User Guide*.
<note markdown=“1”> To change a user name, the requester must have appropriate permissions on both the source object and the target object. For example, to change Bob to Robert, the entity making the request must have permission on Bob and Robert, or must have permission on all (*). For more information about permissions, see [Permissions and Policies].
</note>
[1]: docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_renaming [2]: docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_rename.html [3]: docs.aws.amazon.com/IAM/latest/UserGuide/PermissionsAndPolicies.html
9266 9267 9268 9269 |
# File 'lib/aws-sdk-iam/client.rb', line 9266 def update_user(params = {}, = {}) req = build_request(:update_user, params) req.send_request() end |
#upload_server_certificate(params = {}) ⇒ Types::UploadServerCertificateResponse
Uploads a server certificate entity for the AWS account. The server certificate entity includes a public key certificate, a private key, and an optional certificate chain, which should all be PEM-encoded.
We recommend that you use [AWS Certificate Manager] to provision, manage, and deploy your server certificates. With ACM you can request a certificate, deploy it to AWS resources, and let ACM handle certificate renewals for you. Certificates provided by ACM are free. For more information about using ACM, see the [AWS Certificate Manager User Guide].
For more information about working with server certificates, see
- Working with Server Certificates][3
-
in the *IAM User Guide*. This
topic includes a list of AWS services that can use the server certificates that you manage with IAM.
For information about the number of server certificates you can upload, see [Limitations on IAM Entities and Objects] in the *IAM User Guide*.
<note markdown=“1”> Because the body of the public key certificate, private key, and the certificate chain can be large, you should use POST rather than GET when calling ‘UploadServerCertificate`. For information about setting up signatures and authorization through the API, go to [Signing AWS API Requests] in the *AWS General Reference*. For general information about using the Query API with IAM, go to [Calling the API by Making HTTP Query Requests] in the *IAM User Guide*.
</note>
[1]: aws.amazon.com/certificate-manager/ [2]: docs.aws.amazon.com/acm/latest/userguide/ [3]: docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html [4]: docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html [5]: docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html [6]: docs.aws.amazon.com/IAM/latest/UserGuide/programming.html
9532 9533 9534 9535 |
# File 'lib/aws-sdk-iam/client.rb', line 9532 def upload_server_certificate(params = {}, = {}) req = build_request(:upload_server_certificate, params) req.send_request() end |
#upload_signing_certificate(params = {}) ⇒ Types::UploadSigningCertificateResponse
Uploads an X.509 signing certificate and associates it with the specified IAM user. Some AWS services use X.509 signing certificates to validate requests that are signed with a corresponding private key. When you upload the certificate, its default status is ‘Active`.
If the ‘UserName` field is not specified, the IAM user name is determined implicitly based on the AWS access key ID used to sign the request. Because this operation works for access keys under the AWS account, you can use this operation to manage AWS account root user credentials even if the AWS account has no associated users.
<note markdown=“1”> Because the body of an X.509 certificate can be large, you should use POST rather than GET when calling ‘UploadSigningCertificate`. For information about setting up signatures and authorization through the API, go to [Signing AWS API Requests] in the *AWS General Reference*. For general information about using the Query API with IAM, go to [Making Query Requests] in the *IAM User Guide*.
</note>
[1]: docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html [2]: docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html
9637 9638 9639 9640 |
# File 'lib/aws-sdk-iam/client.rb', line 9637 def upload_signing_certificate(params = {}, = {}) req = build_request(:upload_signing_certificate, params) req.send_request() end |
#upload_ssh_public_key(params = {}) ⇒ Types::UploadSSHPublicKeyResponse
Uploads an SSH public key and associates it with the specified IAM user.
The SSH public key uploaded by this operation can be used only for authenticating the associated IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see [Set up AWS CodeCommit for SSH Connections] in the *AWS CodeCommit User Guide*.
[1]: docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html
9342 9343 9344 9345 |
# File 'lib/aws-sdk-iam/client.rb', line 9342 def upload_ssh_public_key(params = {}, = {}) req = build_request(:upload_ssh_public_key, params) req.send_request() end |
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
## Basic Usage
A waiter will call an API operation until:
-
It is successful
-
It enters a terminal state
-
It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.waiter_until(waiter_name, params)
## Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
## Callbacks
You can be notified before each polling attempt and before each delay. If you throw ‘:success` or `:failure` from these callbacks, it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
## Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
## Valid Waiters
The following table lists the valid waiter names, the operations they call, and the default ‘:delay` and `:max_attempts` values.
| waiter_name | params | :delay | :max_attempts | | ———————– | ———————– | ——– | ————- | | instance_profile_exists | #get_instance_profile | 1 | 40 | | user_exists | #get_user | 1 | 20 |
9748 9749 9750 9751 9752 |
# File 'lib/aws-sdk-iam/client.rb', line 9748 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9756 9757 9758 |
# File 'lib/aws-sdk-iam/client.rb', line 9756 def waiter_names waiters.keys end |