2015/05/07 - AWS Identity and Access Management - 104 new api methods
Adds the specified role to the specified instance profile. For more information about roles, go to Working with Roles. For more information about instance profiles, go to About Instance Profiles.
Request Syntax
client.add_role_to_instance_profile( InstanceProfileName='string', RoleName='string' )
string
[REQUIRED]
The name of the instance profile to update.
string
[REQUIRED]
The name of the role to add.
None
Deletes an IAM OpenID Connect identity provider.
Deleting an OIDC provider 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 provider that has been deleted will fail.
This action is idempotent; it does not fail or return an error if you call the action for a provider that was already deleted.
Request Syntax
client.delete_open_id_connect_provider( OpenIDConnectProviderArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the IAM OpenID Connect provider to delete. You can get a list of OpenID Connect provider ARNs by using the ListOpenIDConnectProviders action.
None
Lists the names of the inline policies that are embedded in the specified role.
A 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, refer to Managed Policies and Inline Policies in the Using IAM guide.
You can paginate the results using the MaxItems and Marker parameters. If there are no inline policies embedded with the specified role, the action returns an empty list.
Request Syntax
client.list_role_policies( RoleName='string', Marker='string', MaxItems=123 )
string
[REQUIRED]
The name of the role to list policies for.
string
Use this parameter only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this parameter only when paginating results to indicate the maximum number of role policies you want in the response. If there are additional role policies beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'PolicyNames': [ 'string', ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListRolePolicies request.
PolicyNames (list) --
A list of policy names.
(string) --
IsTruncated (boolean) --
A flag that indicates whether there are more policy names to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more policy names in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Lists the virtual MFA devices under the AWS account by assignment status. If you do not specify an assignment status, the action 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.
Request Syntax
client.list_virtual_mfa_devices( AssignmentStatus='Assigned'|'Unassigned'|'Any', Marker='string', MaxItems=123 )
string
The status (unassigned or assigned) of the devices to list. If you do not specify an AssignmentStatus, the action defaults to Any which lists both assigned and unassigned virtual MFA devices.
string
Use this parameter only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this parameter only when paginating results to indicate the maximum number of MFA devices you want in the response. If there are additional MFA devices beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'VirtualMFADevices': [ { 'SerialNumber': 'string', 'Base32StringSeed': b'bytes', 'QRCodePNG': b'bytes', 'User': { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordLastUsed': datetime(2015, 1, 1) }, 'EnableDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListVirtualMFADevices request.
VirtualMFADevices (list) --
The list of virtual MFA devices in the current account that match the AssignmentStatus value that was passed in the request.
(dict) --
Contains information about a virtual MFA device.
SerialNumber (string) --
The serial number associated with VirtualMFADevice.
Base32StringSeed (bytes) --
The Base32 seed defined as specified in RFC3548. The Base32StringSeed is Base64-encoded.
QRCodePNG (bytes) --
A QR code PNG image that encodes otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String where $virtualMFADeviceName is one of the create call arguments, AccountName is the user name if set (otherwise, the account ID otherwise), and Base32String is the seed in Base32 format. The Base32String value is Base64-encoded.
User (dict) --
Contains information about an IAM user entity.
This data type is used as a response element in the following actions:
CreateUser
GetUser
ListUsers
Path (string) --
The path to the user. For more information about paths, see IAM Identifiers in the Using IAM guide.
UserName (string) --
The friendly name identifying the user.
UserId (string) --
The stable and unique string identifying the user. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the user was created.
PasswordLastUsed (datetime) --
The date and time, in ISO 8601 date-time format, when the user's password was last used to sign in to an AWS website. For a list of AWS websites that capture a user's last sign-in time, see the Credential Reports topic in the Using IAM guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. When the user does not have a password, this field is null (not present). When a user's password exists but has never been used, or when there is no sign-in data associated with the user, this field is null (not present).
This value is returned only in the GetUser and ListUsers actions.
EnableDate (datetime) --
The date and time on which the virtual MFA device was enabled.
IsTruncated (boolean) --
A flag that indicates whether there are more items to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Lists the IAM users that have the specified path prefix. If no path prefix is specified, the action returns all users in the AWS account. If there are none, the action returns an empty list.
You can paginate the results using the MaxItems and Marker parameters.
Request Syntax
client.list_users( PathPrefix='string', Marker='string', MaxItems=123 )
string
The path prefix for filtering the results. For example: /division_abc/subdivision_xyz/, which would get all user names whose path starts with /division_abc/subdivision_xyz/.
This parameter is optional. If it is not included, it defaults to a slash (/), listing all user names.
string
Use this parameter only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this parameter only when paginating results to indicate the maximum number of user names you want in the response. If there are additional user names beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'Users': [ { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordLastUsed': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListUsers request.
Users (list) --
A list of users.
(dict) --
Contains information about an IAM user entity.
This data type is used as a response element in the following actions:
CreateUser
GetUser
ListUsers
Path (string) --
The path to the user. For more information about paths, see IAM Identifiers in the Using IAM guide.
UserName (string) --
The friendly name identifying the user.
UserId (string) --
The stable and unique string identifying the user. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the user was created.
PasswordLastUsed (datetime) --
The date and time, in ISO 8601 date-time format, when the user's password was last used to sign in to an AWS website. For a list of AWS websites that capture a user's last sign-in time, see the Credential Reports topic in the Using IAM guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. When the user does not have a password, this field is null (not present). When a user's password exists but has never been used, or when there is no sign-in data associated with the user, this field is null (not present).
This value is returned only in the GetUser and ListUsers actions.
IsTruncated (boolean) --
A flag that indicates whether there are more user names to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more users in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
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 operative version; that is, the version that is in effect for the IAM users, groups, and roles that the policy is attached to.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
Request Syntax
client.create_policy_version( PolicyArn='string', PolicyDocument='string', SetAsDefault=True|False )
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
string
[REQUIRED]
The policy document.
boolean
Specifies whether to set this version as the policy's default version.
When this parameter is true, the new policy version becomes the operative version; that is, the version that is in effect for the IAM users, groups, and roles that the policy is attached to.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
dict
Response Syntax
{ 'PolicyVersion': { 'Document': 'string', 'VersionId': 'string', 'IsDefaultVersion': True|False, 'CreateDate': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Contains the response to a successful CreatePolicyVersion request.
PolicyVersion (dict) --
Information about the policy version.
Document (string) --
The policy document.
The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations.
VersionId (string) --
The identifier for the policy version.
Policy version identifiers always begin with v (always lowercase). When a policy is created, the first policy version is v1.
IsDefaultVersion (boolean) --
Specifies whether the policy version is set as the policy's default version.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the policy version was created.
Sets the specified version of the specified policy as the policy's default (operative) version.
This action 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, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.set_default_policy_version( PolicyArn='string', VersionId='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
string
[REQUIRED]
The version of the policy to set as the default (operative) version.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
None
Retrieves information about the specified managed policy, including the policy's default version and the total number of users, groups, and roles that the policy is attached to. For a 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 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 a user, group, or role, use the GetUserPolicy, GetGroupPolicy, or GetRolePolicy API.
For more information about policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.get_policy( PolicyArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
dict
Response Syntax
{ 'Policy': { 'PolicyName': 'string', 'PolicyId': 'string', 'Arn': 'string', 'Path': 'string', 'DefaultVersionId': 'string', 'AttachmentCount': 123, 'IsAttachable': True|False, 'Description': 'string', 'CreateDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Contains the response to a successful GetPolicy request.
Policy (dict) --
Information about the policy.
PolicyName (string) --
The friendly name (not ARN) identifying the policy.
PolicyId (string) --
The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
Path (string) --
The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
DefaultVersionId (string) --
The identifier for the version of the policy that is set as the default version.
AttachmentCount (integer) --
The number of entities (users, groups, and roles) that the policy is attached to.
IsAttachable (boolean) --
Specifies whether the policy can be attached to an IAM user, group, or role.
Description (string) --
A friendly description of the policy.
This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the policy was created.
UpdateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the policy was last updated.
When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
Deletes the specified inline policy that is embedded in the specified 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 Using IAM guide.
Request Syntax
client.delete_group_policy( GroupName='string', PolicyName='string' )
string
[REQUIRED]
The name (friendly name, not ARN) identifying the group that the policy is embedded in.
string
[REQUIRED]
The name identifying the policy document to delete.
None
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 to establish a trust relationship between AWS and the OIDC provider.
When you create the IAM OIDC provider, you specify 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, and 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 for access to AWS.
Request Syntax
client.create_open_id_connect_provider( Url='string', ClientIDList=[ 'string', ], ThumbprintList=[ 'string', ] )
string
[REQUIRED]
The URL of the identity provider. The URL must begin with "https://" and should correspond to the iss claim in the provider's OpenID Connect ID tokens. Per the OIDC standard, path components are allowed but query parameters are not. Typically the URL consists of only a host name, like "https://server.example.org" or "https://example.com".
You cannot register the same provider multiple times in a single AWS account. If you try to submit a URL that has already been used for an OpenID Connect provider in the AWS account, you will get an error.
list
A list of client IDs (also known as audiences). When a mobile or web app registers with an OpenID Connect provider, they establish a value that identifies the application. (This is the value that's sent as the client_id parameter on OAuth requests.)
You can register multiple client IDs with the same provider. For example, you might have multiple applications that use the same OIDC provider. You cannot register more than 100 client IDs with a single IAM OIDC provider.
There is no defined format for a client ID. The CreateOpenIDConnectProviderRequest action accepts client IDs up to 255 characters long.
(string) --
list
[REQUIRED]
A list of server certificate thumbprints for the OpenID Connect (OIDC) identity provider's server certificate(s). Typically this list includes only one entry. However, IAM lets you have up to five thumbprints for an OIDC provider. This lets you maintain multiple thumbprints if the identity provider is rotating certificates.
The server certificate thumbprint is the hex-encoded SHA-1 hash value of the X.509 certificate used by the domain where the OpenID Connect provider makes its keys available. It is always a 40-character string.
You must provide at least one thumbprint when creating an IAM OIDC provider. For example, if the OIDC provider is server.example.com and the provider stores its keys at "https://keys.server.example.com/openid-connect", the thumbprint string would be the hex-encoded SHA-1 hash value of the certificate used by https://keys.server.example.com.
For more information about obtaining the OIDC provider's thumbprint, see Obtaining the Thumbprint for an OpenID Connect Provider in the Using IAM guide.
(string) --
Contains a thumbprint for an identity provider's server certificate.
The identity provider's server certificate thumbprint is the hex-encoded SHA-1 hash value of the self-signed X.509 certificate used by the domain where the OpenID Connect provider makes its keys available. It is always a 40-character string.
dict
Response Syntax
{ 'OpenIDConnectProviderArn': 'string' }
Response Structure
(dict) --
Contains the response to a successful CreateOpenIDConnectProvider request.
OpenIDConnectProviderArn (string) --
The Amazon Resource Name (ARN) of the IAM OpenID Connect provider that was created. For more information, see OpenIDConnectProviderListEntry.
Returns the SAML provider metadocument that was uploaded when the provider was created or updated.
Request Syntax
client.get_saml_provider( SAMLProviderArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the SAML provider to get information about.
dict
Response Syntax
{ 'SAMLMetadataDocument': 'string', 'CreateDate': datetime(2015, 1, 1), 'ValidUntil': datetime(2015, 1, 1) }
Response Structure
(dict) --
Contains the response to a successful GetSAMLProvider request.
SAMLMetadataDocument (string) --
The XML metadata document that includes information about an identity provider.
CreateDate (datetime) --
The date and time when the SAML provider was created.
ValidUntil (datetime) --
The expiration date and time for the SAML provider.
Adds a new client ID (also known as audience) to the list of client IDs already registered for the specified IAM OpenID Connect provider.
This action is idempotent; it does not fail or return an error if you add an existing client ID to the provider.
Request Syntax
client.add_client_id_to_open_id_connect_provider( OpenIDConnectProviderArn='string', ClientID='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the IAM OpenID Connect (OIDC) provider to add the client ID to. You can get a list of OIDC provider ARNs by using the ListOpenIDConnectProviders action.
string
[REQUIRED]
The client ID (also known as audience) to add to the IAM OpenID Connect provider.
None
Deletes a virtual MFA device.
Request Syntax
client.delete_virtual_mfa_device( SerialNumber='string' )
string
[REQUIRED]
The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the same as the ARN.
None
Deletes the specified user. The user must not belong to any groups, have any keys or signing certificates, or have any attached policies.
Request Syntax
client.delete_user( UserName='string' )
string
[REQUIRED]
The name of the user to delete.
None
Lists information about the versions of the specified managed policy, including the version that is set as the policy's default version.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.list_policy_versions( PolicyArn='string', Marker='string', MaxItems=123 )
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
string
Use this parameter only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this parameter only when paginating results to indicate the maximum number of policy versions you want in the response. If there are additional policy versions beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'Versions': [ { 'Document': 'string', 'VersionId': 'string', 'IsDefaultVersion': True|False, 'CreateDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListPolicyVersions request.
Versions (list) --
A list of policy versions.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
(dict) --
Contains information about a version of a managed policy.
This data type is used as a response element in the CreatePolicyVersion, GetPolicyVersion, ListPolicyVersions, and GetAccountAuthorizationDetails actions.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
Document (string) --
The policy document.
The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations.
VersionId (string) --
The identifier for the policy version.
Policy version identifiers always begin with v (always lowercase). When a policy is created, the first policy version is v1.
IsDefaultVersion (boolean) --
Specifies whether the policy version is set as the policy's default version.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the policy version was created.
IsTruncated (boolean) --
A flag that indicates whether there are more policy versions to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more policy versions in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Lists all managed policies that are attached to the specified group.
A 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, refer to Managed Policies and Inline Policies in the Using IAM 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 action returns an empty list.
Request Syntax
client.list_attached_group_policies( GroupName='string', PathPrefix='string', Marker='string', MaxItems=123 )
string
[REQUIRED]
The name (friendly name, not ARN) of the group to list attached policies for.
string
The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all policies.
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of policies you want in the response. If there are additional policies beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'AttachedPolicies': [ { 'PolicyName': 'string', 'PolicyArn': 'string' }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListAttachedGroupPolicies request.
AttachedPolicies (list) --
A list of the attached policies.
(dict) --
Contains information about an attached policy.
An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies, ListAttachedRolePolicies, ListAttachedUserPolicies, and GetAccountAuthorizationDetails actions.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
PolicyName (string) --
The friendly name of the attached policy.
PolicyArn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
IsTruncated (boolean) --
A flag that indicates whether there are more policies to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more policies in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Lists the instance profiles that have the specified associated role. If there are none, the action 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.
Request Syntax
client.list_instance_profiles_for_role( RoleName='string', Marker='string', MaxItems=123 )
string
[REQUIRED]
The name of the role to list instance profiles for.
string
Use this parameter only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this parameter only when paginating results to indicate the maximum number of instance profiles you want in the response. If there are additional instance profiles beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'InstanceProfiles': [ { 'Path': 'string', 'InstanceProfileName': 'string', 'InstanceProfileId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'Roles': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string' }, ] }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListInstanceProfilesForRole request.
InstanceProfiles (list) --
A list of instance profiles.
(dict) --
Contains information about an instance profile.
This data type is used as a response element in the following actions:
CreateInstanceProfile
GetInstanceProfile
ListInstanceProfiles
ListInstanceProfilesForRole
Path (string) --
The path to the instance profile. For more information about paths, see IAM Identifiers in the Using IAM guide.
InstanceProfileName (string) --
The name identifying the instance profile.
InstanceProfileId (string) --
The stable and unique string identifying the instance profile. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the instance profile. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date when the instance profile was created.
Roles (list) --
The role associated with the instance profile.
(dict) --
Contains information about an IAM role.
This data type is used as a response element in the following actions:
CreateRole
GetRole
ListRoles
Path (string) --
The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.
RoleName (string) --
The friendly name that identifies the role.
RoleId (string) --
The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the role was created.
AssumeRolePolicyDocument (string) --
The policy that grants an entity permission to assume the role.
IsTruncated (boolean) --
A flag that indicates whether there are more instance profiles to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more instance profiles in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Deletes the specified managed policy.
Before you can delete a managed policy, you must detach the policy from all users, groups, and roles that it is attached to, and you must delete all of 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 APIs. 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, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.delete_policy( PolicyArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
None
Deletes the password for the specified user, which terminates the user's ability to access AWS services through the AWS Management Console.
Request Syntax
client.delete_login_profile( UserName='string' )
string
[REQUIRED]
The name of the user whose password you want to delete.
None
Deletes the access key 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. Because this action works for access keys under the AWS account, you can use this action to manage root credentials even if the AWS account has no associated users.
Request Syntax
client.delete_access_key( UserName='string', AccessKeyId='string' )
string
The name of the user whose key you want to delete.
string
[REQUIRED]
The access key ID for the access key ID and secret access key you want to delete.
None
Lists information about the OpenID Connect providers in the AWS account.
Request Syntax
client.list_open_id_connect_providers()
dict
Response Syntax
{ 'OpenIDConnectProviderList': [ { 'Arn': 'string' }, ] }
Response Structure
(dict) --
Contains the response to a successful ListOpenIDConnectProviders request.
OpenIDConnectProviderList (list) --
The list of IAM OpenID Connect providers in the AWS account.
(dict) --
Contains the Amazon Resource Name (ARN) for an IAM OpenID Connect provider.
Arn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
Updates the name and/or the path of the specified user.
Request Syntax
client.update_user( UserName='string', NewPath='string', NewUserName='string' )
string
[REQUIRED]
Name of the user to update. If you're changing the name of the user, this is the original user name.
string
New path for the user. Include this parameter only if you're changing the user's path.
string
New name for the user. Include this parameter only if you're changing the user's name.
None
Adds (or updates) an inline policy document that is embedded in the specified user.
A 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, refer to Managed Policies and Inline Policies in the Using IAM 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 Using IAM guide.
Request Syntax
client.put_user_policy( UserName='string', PolicyName='string', PolicyDocument='string' )
string
[REQUIRED]
The name of the user to associate the policy with.
string
[REQUIRED]
The name of the policy document.
string
[REQUIRED]
The policy document.
None
Retrieves information about the specified version of the specified managed policy, including the policy document.
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, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.get_policy_version( PolicyArn='string', VersionId='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
string
[REQUIRED]
Identifies the policy version to retrieve.
dict
Response Syntax
{ 'PolicyVersion': { 'Document': 'string', 'VersionId': 'string', 'IsDefaultVersion': True|False, 'CreateDate': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Contains the response to a successful GetPolicyVersion request.
PolicyVersion (dict) --
Information about the policy version.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
Document (string) --
The policy document.
The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations.
VersionId (string) --
The identifier for the policy version.
Policy version identifiers always begin with v (always lowercase). When a policy is created, the first policy version is v1.
IsDefaultVersion (boolean) --
Specifies whether the policy version is set as the policy's default version.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the policy version was created.
Changes the password of the IAM user who is calling this action. The root account password is not affected by this action.
To change the password for a different user, see UpdateLoginProfile. For more information about modifying passwords, see Managing Passwords in the Using IAM guide.
Request Syntax
client.change_password( OldPassword='string', NewPassword='string' )
string
[REQUIRED]
The IAM user's current password.
string
[REQUIRED]
The new password. The new password must conform to the AWS account's password policy, if one exists.
None
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 Using IAM guide.
For more information about managed policies in general, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.create_policy( PolicyName='string', Path='string', PolicyDocument='string', Description='string' )
string
[REQUIRED]
The name of the policy document.
string
The path for the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
This parameter is optional. If it is not included, it defaults to a slash (/).
string
[REQUIRED]
The policy document.
string
A friendly description of the policy.
Typically used to store information about the permissions defined in the policy. For example, "Grants access to production DynamoDB tables."
The policy description is immutable. After a value is assigned, it cannot be changed.
dict
Response Syntax
{ 'Policy': { 'PolicyName': 'string', 'PolicyId': 'string', 'Arn': 'string', 'Path': 'string', 'DefaultVersionId': 'string', 'AttachmentCount': 123, 'IsAttachable': True|False, 'Description': 'string', 'CreateDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Contains the response to a successful CreatePolicy request.
Policy (dict) --
Information about the policy.
PolicyName (string) --
The friendly name (not ARN) identifying the policy.
PolicyId (string) --
The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
Path (string) --
The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
DefaultVersionId (string) --
The identifier for the version of the policy that is set as the default version.
AttachmentCount (integer) --
The number of entities (users, groups, and roles) that the policy is attached to.
IsAttachable (boolean) --
Specifies whether the policy can be attached to an IAM user, group, or role.
Description (string) --
A friendly description of the policy.
This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the policy was created.
UpdateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the policy was last updated.
When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
Lists the instance profiles that have the specified path prefix. If there are none, the action 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.
Request Syntax
client.list_instance_profiles( PathPrefix='string', Marker='string', MaxItems=123 )
string
The path prefix for filtering the results. For example, the prefix /application_abc/component_xyz/ gets all instance profiles whose path starts with /application_abc/component_xyz/.
This parameter is optional. If it is not included, it defaults to a slash (/), listing all instance profiles.
string
Use this parameter only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this parameter only when paginating results to indicate the maximum number of instance profiles you want in the response. If there are additional instance profiles beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'InstanceProfiles': [ { 'Path': 'string', 'InstanceProfileName': 'string', 'InstanceProfileId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'Roles': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string' }, ] }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListInstanceProfiles request.
InstanceProfiles (list) --
A list of instance profiles.
(dict) --
Contains information about an instance profile.
This data type is used as a response element in the following actions:
CreateInstanceProfile
GetInstanceProfile
ListInstanceProfiles
ListInstanceProfilesForRole
Path (string) --
The path to the instance profile. For more information about paths, see IAM Identifiers in the Using IAM guide.
InstanceProfileName (string) --
The name identifying the instance profile.
InstanceProfileId (string) --
The stable and unique string identifying the instance profile. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the instance profile. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date when the instance profile was created.
Roles (list) --
The role associated with the instance profile.
(dict) --
Contains information about an IAM role.
This data type is used as a response element in the following actions:
CreateRole
GetRole
ListRoles
Path (string) --
The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.
RoleName (string) --
The friendly name that identifies the role.
RoleId (string) --
The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the role was created.
AssumeRolePolicyDocument (string) --
The policy that grants an entity permission to assume the role.
IsTruncated (boolean) --
A flag that indicates whether there are more instance profiles to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more instance profiles in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Retrieves the specified inline policy document that is embedded in the specified group.
A 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, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.get_group_policy( GroupName='string', PolicyName='string' )
string
[REQUIRED]
The name of the group the policy is associated with.
string
[REQUIRED]
The name of the policy document to get.
dict
Response Syntax
{ 'GroupName': 'string', 'PolicyName': 'string', 'PolicyDocument': 'string' }
Response Structure
(dict) --
Contains the response to a successful GetGroupPolicy request.
GroupName (string) --
The group the policy is associated with.
PolicyName (string) --
The name of the policy.
PolicyDocument (string) --
The policy document.
Synchronizes the specified MFA device with AWS servers.
For more information about creating and working with virtual MFA devices, go to Using a Virtual MFA Device in the Using IAM guide.
Request Syntax
client.resync_mfa_device( UserName='string', SerialNumber='string', AuthenticationCode1='string', AuthenticationCode2='string' )
string
[REQUIRED]
The name of the user whose MFA device you want to resynchronize.
string
[REQUIRED]
Serial number that uniquely identifies the MFA device.
string
[REQUIRED]
An authentication code emitted by the device.
string
[REQUIRED]
A subsequent authentication code emitted by the device.
None
Returns a list of users that are in the specified group. You can paginate the results using the MaxItems and Marker parameters.
Request Syntax
client.get_group( GroupName='string', Marker='string', MaxItems=123 )
string
[REQUIRED]
The name of the group.
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of groups you want in the response. If there are additional groups beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'Group': { 'Path': 'string', 'GroupName': 'string', 'GroupId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1) }, 'Users': [ { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordLastUsed': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful GetGroup request.
Group (dict) --
Information about the group.
Path (string) --
The path to the group. For more information about paths, see IAM Identifiers in the Using IAM guide.
GroupName (string) --
The friendly name that identifies the group.
GroupId (string) --
The stable and unique string identifying the group. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the group. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the group was created.
Users (list) --
A list of users in the group.
(dict) --
Contains information about an IAM user entity.
This data type is used as a response element in the following actions:
CreateUser
GetUser
ListUsers
Path (string) --
The path to the user. For more information about paths, see IAM Identifiers in the Using IAM guide.
UserName (string) --
The friendly name identifying the user.
UserId (string) --
The stable and unique string identifying the user. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the user was created.
PasswordLastUsed (datetime) --
The date and time, in ISO 8601 date-time format, when the user's password was last used to sign in to an AWS website. For a list of AWS websites that capture a user's last sign-in time, see the Credential Reports topic in the Using IAM guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. When the user does not have a password, this field is null (not present). When a user's password exists but has never been used, or when there is no sign-in data associated with the user, this field is null (not present).
This value is returned only in the GetUser and ListUsers actions.
IsTruncated (boolean) --
A flag that indicates whether there are more user names to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more user names in the list.
Marker (string) --
If IsTruncated is true, then this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Updates the policy that grants an entity permission to assume a role. For more information about roles, go to Using Roles to Delegate Permissions and Federate Identities.
Request Syntax
client.update_assume_role_policy( RoleName='string', PolicyDocument='string' )
string
[REQUIRED]
The name of the role to update.
string
[REQUIRED]
The policy that grants an entity permission to assume the role.
None
Updates the metadata document for an existing SAML provider.
Request Syntax
client.update_saml_provider( SAMLMetadataDocument='string', SAMLProviderArn='string' )
string
[REQUIRED]
An XML document generated by an identity provider (IdP) that supports SAML 2.0. The document includes the issuer's name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. You must generate the metadata document using the identity management software that is used as your organization's IdP.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the SAML provider to update.
dict
Response Syntax
{ 'SAMLProviderArn': 'string' }
Response Structure
(dict) --
Contains the response to a successful UpdateSAMLProvider request.
SAMLProviderArn (string) --
The Amazon Resource Name (ARN) of the SAML provider that was updated.
Removes the specified user from the specified group.
Request Syntax
client.remove_user_from_group( GroupName='string', UserName='string' )
string
[REQUIRED]
The name of the group to update.
string
[REQUIRED]
The name of the user to remove.
None
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 Using IAM guide.
For information about limits on the number of MFA devices you can create, see Limitations on Entities in the Using IAM guide.
Request Syntax
client.create_virtual_mfa_device( Path='string', VirtualMFADeviceName='string' )
string
The path for the virtual MFA device. For more information about paths, see IAM Identifiers in the Using IAM guide.
This parameter is optional. If it is not included, it defaults to a slash (/).
string
[REQUIRED]
The name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device.
dict
Response Syntax
{ 'VirtualMFADevice': { 'SerialNumber': 'string', 'Base32StringSeed': b'bytes', 'QRCodePNG': b'bytes', 'User': { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordLastUsed': datetime(2015, 1, 1) }, 'EnableDate': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Contains the response to a successful CreateVirtualMFADevice request.
VirtualMFADevice (dict) --
A newly created virtual MFA device.
SerialNumber (string) --
The serial number associated with VirtualMFADevice.
Base32StringSeed (bytes) --
The Base32 seed defined as specified in RFC3548. The Base32StringSeed is Base64-encoded.
QRCodePNG (bytes) --
A QR code PNG image that encodes otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String where $virtualMFADeviceName is one of the create call arguments, AccountName is the user name if set (otherwise, the account ID otherwise), and Base32String is the seed in Base32 format. The Base32String value is Base64-encoded.
User (dict) --
Contains information about an IAM user entity.
This data type is used as a response element in the following actions:
CreateUser
GetUser
ListUsers
Path (string) --
The path to the user. For more information about paths, see IAM Identifiers in the Using IAM guide.
UserName (string) --
The friendly name identifying the user.
UserId (string) --
The stable and unique string identifying the user. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the user was created.
PasswordLastUsed (datetime) --
The date and time, in ISO 8601 date-time format, when the user's password was last used to sign in to an AWS website. For a list of AWS websites that capture a user's last sign-in time, see the Credential Reports topic in the Using IAM guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. When the user does not have a password, this field is null (not present). When a user's password exists but has never been used, or when there is no sign-in data associated with the user, this field is null (not present).
This value is returned only in the GetUser and ListUsers actions.
EnableDate (datetime) --
The date and time on which the virtual MFA device was enabled.
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 Using IAM guide.
Request Syntax
client.delete_account_alias( AccountAlias='string' )
string
[REQUIRED]
The name of the account alias to delete.
None
Generates a credential report for the AWS account. For more information about the credential report, see Getting Credential Reports in the Using IAM guide.
Request Syntax
client.generate_credential_report()
dict
Response Syntax
{ 'State': 'STARTED'|'INPROGRESS'|'COMPLETE', 'Description': 'string' }
Response Structure
(dict) --
Contains the response to a successful GenerateCredentialReport request.
State (string) --
Information about the state of the credential report.
Description (string) --
Information about the credential report.
Retrieves the specified inline policy document that is embedded in the specified user.
A 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, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.get_user_policy( UserName='string', PolicyName='string' )
string
[REQUIRED]
The name of the user who the policy is associated with.
string
[REQUIRED]
The name of the policy document to get.
dict
Response Syntax
{ 'UserName': 'string', 'PolicyName': 'string', 'PolicyDocument': 'string' }
Response Structure
(dict) --
Contains the response to a successful GetUserPolicy request.
UserName (string) --
The user the policy is associated with.
PolicyName (string) --
The name of the policy.
PolicyDocument (string) --
The policy document.
Removes the specified managed policy from the specified group.
A group can also have inline policies embedded with it. To delete an inline policy, use the DeleteGroupPolicy API. For information about policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.detach_group_policy( GroupName='string', PolicyArn='string' )
string
[REQUIRED]
The name (friendly name, not ARN) of the group to detach the policy from.
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
None
Returns information about the signing certificates associated with the specified user. If there are none, the action 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. Because this action works for access keys under the AWS account, you can use this action to manage root credentials even if the AWS account has no associated users.
Request Syntax
client.list_signing_certificates( UserName='string', Marker='string', MaxItems=123 )
string
The name of the user.
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of certificate IDs you want in the response. If there are additional certificate IDs beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'Certificates': [ { 'UserName': 'string', 'CertificateId': 'string', 'CertificateBody': 'string', 'Status': 'Active'|'Inactive', 'UploadDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListSigningCertificates request.
Certificates (list) --
A list of the user's signing certificate information.
(dict) --
Contains information about an X.509 signing certificate.
This data type is used as a response element in the UploadSigningCertificate and ListSigningCertificates actions.
UserName (string) --
The name of the user the signing certificate is associated with.
CertificateId (string) --
The ID for the signing certificate.
CertificateBody (string) --
The contents of the signing certificate.
Status (string) --
The status of the signing certificate. Active means the key is valid for API calls, while Inactive means it is not.
UploadDate (datetime) --
The date when the signing certificate was uploaded.
IsTruncated (boolean) --
A flag that indicates whether there are more certificate IDs to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more certificates in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Deletes a SAML provider.
Deleting the provider does not update any roles that reference the SAML provider as a principal in their trust policies. Any attempt to assume a role that references a SAML provider that has been deleted will fail.
Request Syntax
client.delete_saml_provider( SAMLProviderArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the SAML provider to delete.
None
Lists the server certificates that have the specified path prefix. If none exist, the action returns an empty list.
You can paginate the results using the MaxItems and Marker parameters.
Request Syntax
client.list_server_certificates( PathPrefix='string', Marker='string', MaxItems=123 )
string
The path prefix for filtering the results. For example: /company/servercerts would get all server certificates for which the path starts with /company/servercerts.
This parameter is optional. If it is not included, it defaults to a slash (/), listing all server certificates.
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of server certificates you want in the response. If there are additional server certificates beyond the maximum you specify, the IsTruncated response element will be set to true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'ServerCertificateMetadataList': [ { 'Path': 'string', 'ServerCertificateName': 'string', 'ServerCertificateId': 'string', 'Arn': 'string', 'UploadDate': datetime(2015, 1, 1), 'Expiration': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListServerCertificates request.
ServerCertificateMetadataList (list) --
A list of server certificates.
(dict) --
Contains information about a server certificate without its certificate body, certificate chain, and private key.
This data type is used as a response element in the UploadServerCertificate and ListServerCertificates actions.
Path (string) --
The path to the server certificate. For more information about paths, see IAM Identifiers in the Using IAM guide.
ServerCertificateName (string) --
The name that identifies the server certificate.
ServerCertificateId (string) --
The stable and unique string identifying the server certificate. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the server certificate. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
UploadDate (datetime) --
The date when the server certificate was uploaded.
Expiration (datetime) --
The date on which the certificate is set to expire.
IsTruncated (boolean) --
A flag that indicates whether there are more server certificates to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more server certificates in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Retrieves information about all IAM users, groups, roles, and policies in your 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.
You can optionally filter the results using the Filter parameter. You can paginate the results using the MaxItems and Marker parameters.
Request Syntax
client.get_account_authorization_details( Filter=[ 'User'|'Role'|'Group'|'LocalManagedPolicy'|'AWSManagedPolicy', ], MaxItems=123, Marker='string' )
list
A list of entity types (user, group, role, local managed policy, or AWS managed policy) for filtering the results.
(string) --
integer
Use this only when paginating results to indicate the maximum number of items you want in the response. If there are additional items beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
dict
Response Syntax
{ 'UserDetailList': [ { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'UserPolicyList': [ { 'PolicyName': 'string', 'PolicyDocument': 'string' }, ], 'GroupList': [ 'string', ], 'AttachedManagedPolicies': [ { 'PolicyName': 'string', 'PolicyArn': 'string' }, ] }, ], 'GroupDetailList': [ { 'Path': 'string', 'GroupName': 'string', 'GroupId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'GroupPolicyList': [ { 'PolicyName': 'string', 'PolicyDocument': 'string' }, ], 'AttachedManagedPolicies': [ { 'PolicyName': 'string', 'PolicyArn': 'string' }, ] }, ], 'RoleDetailList': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string', 'InstanceProfileList': [ { 'Path': 'string', 'InstanceProfileName': 'string', 'InstanceProfileId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'Roles': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string' }, ] }, ], 'RolePolicyList': [ { 'PolicyName': 'string', 'PolicyDocument': 'string' }, ], 'AttachedManagedPolicies': [ { 'PolicyName': 'string', 'PolicyArn': 'string' }, ] }, ], 'Policies': [ { 'PolicyName': 'string', 'PolicyId': 'string', 'Arn': 'string', 'Path': 'string', 'DefaultVersionId': 'string', 'AttachmentCount': 123, 'IsAttachable': True|False, 'Description': 'string', 'CreateDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'PolicyVersionList': [ { 'Document': 'string', 'VersionId': 'string', 'IsDefaultVersion': True|False, 'CreateDate': datetime(2015, 1, 1) }, ] }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful GetAccountAuthorizationDetails request.
UserDetailList (list) --
A list containing information about IAM users.
(dict) --
Contains information about an IAM user, including all the user's policies and all the IAM groups the user is in.
This data type is used as a response element in the GetAccountAuthorizationDetails action.
Path (string) --
The path to the user. For more information about paths, see IAM Identifiers in the Using IAM guide.
UserName (string) --
The friendly name identifying the user.
UserId (string) --
The stable and unique string identifying the user. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the user was created.
UserPolicyList (list) --
A list of the inline policies embedded in the user.
(dict) --
Contains information about an IAM policy, including the policy document.
This data type is used as a response element in the GetAccountAuthorizationDetails action.
PolicyName (string) --
The name of the policy.
PolicyDocument (string) --
The policy document.
GroupList (list) --
A list of IAM groups that the user is in.
(string) --
AttachedManagedPolicies (list) --
A list of the managed policies attached to the user.
(dict) --
Contains information about an attached policy.
An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies, ListAttachedRolePolicies, ListAttachedUserPolicies, and GetAccountAuthorizationDetails actions.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
PolicyName (string) --
The friendly name of the attached policy.
PolicyArn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
GroupDetailList (list) --
A list containing information about IAM groups.
(dict) --
Contains information about an IAM group, including all of the group's policies.
This data type is used as a response element in the GetAccountAuthorizationDetails action.
Path (string) --
The path to the group. For more information about paths, see IAM Identifiers in the Using IAM guide.
GroupName (string) --
The friendly name that identifies the group.
GroupId (string) --
The stable and unique string identifying the group. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the group was created.
GroupPolicyList (list) --
A list of the inline policies embedded in the group.
(dict) --
Contains information about an IAM policy, including the policy document.
This data type is used as a response element in the GetAccountAuthorizationDetails action.
PolicyName (string) --
The name of the policy.
PolicyDocument (string) --
The policy document.
AttachedManagedPolicies (list) --
A list of the managed policies attached to the group.
(dict) --
Contains information about an attached policy.
An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies, ListAttachedRolePolicies, ListAttachedUserPolicies, and GetAccountAuthorizationDetails actions.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
PolicyName (string) --
The friendly name of the attached policy.
PolicyArn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
RoleDetailList (list) --
A list containing information about IAM roles.
(dict) --
Contains information about an IAM role, including all of the role's policies.
This data type is used as a response element in the GetAccountAuthorizationDetails action.
Path (string) --
The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.
RoleName (string) --
The friendly name that identifies the role.
RoleId (string) --
The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the role was created.
AssumeRolePolicyDocument (string) --
The trust policy that grants permission to assume the role.
InstanceProfileList (list) --
Contains a list of instance profiles.
(dict) --
Contains information about an instance profile.
This data type is used as a response element in the following actions:
CreateInstanceProfile
GetInstanceProfile
ListInstanceProfiles
ListInstanceProfilesForRole
Path (string) --
The path to the instance profile. For more information about paths, see IAM Identifiers in the Using IAM guide.
InstanceProfileName (string) --
The name identifying the instance profile.
InstanceProfileId (string) --
The stable and unique string identifying the instance profile. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the instance profile. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date when the instance profile was created.
Roles (list) --
The role associated with the instance profile.
(dict) --
Contains information about an IAM role.
This data type is used as a response element in the following actions:
CreateRole
GetRole
ListRoles
Path (string) --
The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.
RoleName (string) --
The friendly name that identifies the role.
RoleId (string) --
The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the role was created.
AssumeRolePolicyDocument (string) --
The policy that grants an entity permission to assume the role.
RolePolicyList (list) --
A list of inline policies embedded in the role. These policies are the role's access (permissions) policies.
(dict) --
Contains information about an IAM policy, including the policy document.
This data type is used as a response element in the GetAccountAuthorizationDetails action.
PolicyName (string) --
The name of the policy.
PolicyDocument (string) --
The policy document.
AttachedManagedPolicies (list) --
A list of managed policies attached to the role. These policies are the role's access (permissions) policies.
(dict) --
Contains information about an attached policy.
An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies, ListAttachedRolePolicies, ListAttachedUserPolicies, and GetAccountAuthorizationDetails actions.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
PolicyName (string) --
The friendly name of the attached policy.
PolicyArn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
Policies (list) --
A list containing information about managed policies.
(dict) --
Contains information about a managed policy, including the policy's ARN, versions, and the number of principal entities (users, groups, and roles) that the policy is attached to.
This data type is used as a response element in the GetAccountAuthorizationDetails action.
For more information about managed policies, see Managed Policies and Inline Policies in the Using IAM guide.
PolicyName (string) --
The friendly name (not ARN) identifying the policy.
PolicyId (string) --
The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
Path (string) --
The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
DefaultVersionId (string) --
The identifier for the version of the policy that is set as the default (operative) version.
For more information about policy versions, see Versioning for Managed Policies in the Using IAM guide.
AttachmentCount (integer) --
The number of principal entities (users, groups, and roles) that the policy is attached to.
IsAttachable (boolean) --
Specifies whether the policy can be attached to an IAM user, group, or role.
Description (string) --
A friendly description of the policy.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the policy was created.
UpdateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the policy was last updated.
When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
PolicyVersionList (list) --
A list containing information about the versions of the policy.
(dict) --
Contains information about a version of a managed policy.
This data type is used as a response element in the CreatePolicyVersion, GetPolicyVersion, ListPolicyVersions, and GetAccountAuthorizationDetails actions.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
Document (string) --
The policy document.
The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations.
VersionId (string) --
The identifier for the policy version.
Policy version identifiers always begin with v (always lowercase). When a policy is created, the first policy version is v1.
IsDefaultVersion (boolean) --
Specifies whether the policy version is set as the policy's default version.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the policy version was created.
IsTruncated (boolean) --
A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Attaches the specified managed policy to the specified 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, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.attach_group_policy( GroupName='string', PolicyArn='string' )
string
[REQUIRED]
The name (friendly name, not ARN) of the group to attach the policy to.
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
None
Deletes the specified instance profile. The instance profile must not have an associated role.
For more information about instance profiles, go to About Instance Profiles.
Request Syntax
client.delete_instance_profile( InstanceProfileName='string' )
string
[REQUIRED]
The name of the instance profile to delete.
None
Deletes the specified inline policy that is embedded in the specified 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 Using IAM guide.
Request Syntax
client.delete_role_policy( RoleName='string', PolicyName='string' )
string
[REQUIRED]
The name (friendly name, not ARN) identifying the role that the policy is embedded in.
string
[REQUIRED]
The name identifying the policy document to delete.
None
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.
For information about the number of server certificates you can upload, see Limitations on IAM Entities in the Using IAM guide.
Request Syntax
client.upload_server_certificate( Path='string', ServerCertificateName='string', CertificateBody='string', PrivateKey='string', CertificateChain='string' )
string
The path for the server certificate. For more information about paths, see IAM Identifiers in the Using IAM guide.
This parameter is optional. If it is not included, it defaults to a slash (/).
string
[REQUIRED]
The name for the server certificate. Do not include the path in this value.
string
[REQUIRED]
The contents of the public key certificate in PEM-encoded format.
string
[REQUIRED]
The contents of the private key in PEM-encoded format.
string
The contents of the certificate chain. This is typically a concatenation of the PEM-encoded public key certificates of the chain.
dict
Response Syntax
{ 'ServerCertificateMetadata': { 'Path': 'string', 'ServerCertificateName': 'string', 'ServerCertificateId': 'string', 'Arn': 'string', 'UploadDate': datetime(2015, 1, 1), 'Expiration': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Contains the response to a successful UploadServerCertificate request.
ServerCertificateMetadata (dict) --
The meta information of the uploaded server certificate without its certificate body, certificate chain, and private key.
Path (string) --
The path to the server certificate. For more information about paths, see IAM Identifiers in the Using IAM guide.
ServerCertificateName (string) --
The name that identifies the server certificate.
ServerCertificateId (string) --
The stable and unique string identifying the server certificate. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the server certificate. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
UploadDate (datetime) --
The date when the server certificate was uploaded.
Expiration (datetime) --
The date on which the certificate is set to expire.
Lists the names of the inline policies embedded in the specified user.
A 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, refer to Managed Policies and Inline Policies in the Using IAM guide.
You can paginate the results using the MaxItems and Marker parameters. If there are no inline policies embedded with the specified user, the action returns an empty list.
Request Syntax
client.list_user_policies( UserName='string', Marker='string', MaxItems=123 )
string
[REQUIRED]
The name of the user to list policies for.
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of policy names you want in the response. If there are additional policy names beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'PolicyNames': [ 'string', ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListUserPolicies request.
PolicyNames (list) --
A list of policy names.
(string) --
IsTruncated (boolean) --
A flag that indicates whether there are more policy names to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more policy names in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Retrieves information about the specified instance profile, including the instance profile's path, GUID, ARN, and role. For more information about instance profiles, go to About Instance Profiles. For more information about ARNs, go to ARNs.
Request Syntax
client.get_instance_profile( InstanceProfileName='string' )
string
[REQUIRED]
The name of the instance profile to get information about.
dict
Response Syntax
{ 'InstanceProfile': { 'Path': 'string', 'InstanceProfileName': 'string', 'InstanceProfileId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'Roles': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string' }, ] } }
Response Structure
(dict) --
Contains the response to a successful GetInstanceProfile request.
InstanceProfile (dict) --
Information about the instance profile.
Path (string) --
The path to the instance profile. For more information about paths, see IAM Identifiers in the Using IAM guide.
InstanceProfileName (string) --
The name identifying the instance profile.
InstanceProfileId (string) --
The stable and unique string identifying the instance profile. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the instance profile. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date when the instance profile was created.
Roles (list) --
The role associated with the instance profile.
(dict) --
Contains information about an IAM role.
This data type is used as a response element in the following actions:
CreateRole
GetRole
ListRoles
Path (string) --
The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.
RoleName (string) --
The friendly name that identifies the role.
RoleId (string) --
The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the role was created.
AssumeRolePolicyDocument (string) --
The policy that grants an entity permission to assume the role.
Lists the names of the inline policies that are embedded in the specified group.
A 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, refer to Managed Policies and Inline Policies in the Using IAM guide.
You can paginate the results using the MaxItems and Marker parameters. If there are no inline policies embedded with the specified group, the action returns an empty list.
Request Syntax
client.list_group_policies( GroupName='string', Marker='string', MaxItems=123 )
string
[REQUIRED]
The name of the group to list policies for.
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of policy names you want in the response. If there are additional policy names beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'PolicyNames': [ 'string', ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListGroupPolicies request.
PolicyNames (list) --
A list of policy names.
(string) --
IsTruncated (boolean) --
A flag that indicates whether there are more policy names to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more policy names in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
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 Using IAM guide.
Request Syntax
client.deactivate_mfa_device( UserName='string', SerialNumber='string' )
string
[REQUIRED]
The name of the user whose MFA device you want to deactivate.
string
[REQUIRED]
The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the device ARN.
None
Lists the groups that have the specified path prefix.
You can paginate the results using the MaxItems and Marker parameters.
Request Syntax
client.list_groups( PathPrefix='string', Marker='string', MaxItems=123 )
string
The path prefix for filtering the results. For example, the prefix /division_abc/subdivision_xyz/ gets all groups whose path starts with /division_abc/subdivision_xyz/.
This parameter is optional. If it is not included, it defaults to a slash (/), listing all groups.
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of groups you want in the response. If there are additional groups beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'Groups': [ { 'Path': 'string', 'GroupName': 'string', 'GroupId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListGroups request.
Groups (list) --
A list of groups.
(dict) --
Contains information about an IAM group entity.
This data type is used as a response element in the following actions:
CreateGroup
GetGroup
ListGroups
Path (string) --
The path to the group. For more information about paths, see IAM Identifiers in the Using IAM guide.
GroupName (string) --
The friendly name that identifies the group.
GroupId (string) --
The stable and unique string identifying the group. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the group. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the group was created.
IsTruncated (boolean) --
A flag that indicates whether there are more groups to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more groups in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Deletes the specified group. The group must not contain any users or have any attached policies.
Request Syntax
client.delete_group( GroupName='string' )
string
[REQUIRED]
The name of the group to delete.
None
Deletes the specified server certificate.
Request Syntax
client.delete_server_certificate( ServerCertificateName='string' )
string
[REQUIRED]
The name of the server certificate you want to delete.
None
Lists the account aliases associated with the account. For information about using an AWS account alias, see Using an Alias for Your AWS Account ID in the Using IAM guide.
You can paginate the results using the MaxItems and Marker parameters.
Request Syntax
client.list_account_aliases( Marker='string', MaxItems=123 )
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of account aliases you want in the response. If there are additional account aliases beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'AccountAliases': [ 'string', ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListAccountAliases request.
AccountAliases (list) --
A list of aliases associated with the account.
(string) --
IsTruncated (boolean) --
A flag that indicates whether there are more account aliases to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more account aliases in the list.
Marker (string) --
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
Retrieves the password policy for the AWS account. For more information about using a password policy, go to Managing an IAM Password Policy.
Request Syntax
client.get_account_password_policy()
dict
Response Syntax
{ 'PasswordPolicy': { 'MinimumPasswordLength': 123, 'RequireSymbols': True|False, 'RequireNumbers': True|False, 'RequireUppercaseCharacters': True|False, 'RequireLowercaseCharacters': True|False, 'AllowUsersToChangePassword': True|False, 'ExpirePasswords': True|False, 'MaxPasswordAge': 123, 'PasswordReusePrevention': 123, 'HardExpiry': True|False } }
Response Structure
(dict) --
Contains the response to a successful GetAccountPasswordPolicy request.
PasswordPolicy (dict) --
Contains information about the account password policy.
This data type is used as a response element in the GetAccountPasswordPolicy action.
MinimumPasswordLength (integer) --
Minimum length to require for IAM user passwords.
RequireSymbols (boolean) --
Specifies whether to require symbols for IAM user passwords.
RequireNumbers (boolean) --
Specifies whether to require numbers for IAM user passwords.
RequireUppercaseCharacters (boolean) --
Specifies whether to require uppercase characters for IAM user passwords.
RequireLowercaseCharacters (boolean) --
Specifies whether to require lowercase characters for IAM user passwords.
AllowUsersToChangePassword (boolean) --
Specifies whether IAM users are allowed to change their own password.
ExpirePasswords (boolean) --
Specifies whether IAM users are required to change their password after a specified number of days.
MaxPasswordAge (integer) --
The number of days that an IAM user password is valid.
PasswordReusePrevention (integer) --
Specifies the number of previous passwords that IAM users are prevented from reusing.
HardExpiry (boolean) --
Specifies whether IAM users are prevented from setting a new password after their password has expired.
Replaces the existing list of server certificate thumbprints with a new list.
The list that you pass with this action 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 will fail until the certificate thumbprint is updated.
Request Syntax
client.update_open_id_connect_provider_thumbprint( OpenIDConnectProviderArn='string', ThumbprintList=[ 'string', ] )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the IAM OpenID Connect (OIDC) provider to update the thumbprint for. You can get a list of OIDC provider ARNs by using the ListOpenIDConnectProviders action.
list
[REQUIRED]
A list of certificate thumbprints that are associated with the specified IAM OpenID Connect provider. For more information, see CreateOpenIDConnectProvider.
(string) --
Contains a thumbprint for an identity provider's server certificate.
The identity provider's server certificate thumbprint is the hex-encoded SHA-1 hash value of the self-signed X.509 certificate used by the domain where the OpenID Connect provider makes its keys available. It is always a 40-character string.
None
Retrieves information about the specified 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.
Request Syntax
client.get_user( UserName='string' )
string
The name of the user to get information about.
This parameter is optional. If it is not included, it defaults to the user making the request.
dict
Response Syntax
{ 'User': { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordLastUsed': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Contains the response to a successful GetUser request.
User (dict) --
Information about the user.
Path (string) --
The path to the user. For more information about paths, see IAM Identifiers in the Using IAM guide.
UserName (string) --
The friendly name identifying the user.
UserId (string) --
The stable and unique string identifying the user. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the user was created.
PasswordLastUsed (datetime) --
The date and time, in ISO 8601 date-time format, when the user's password was last used to sign in to an AWS website. For a list of AWS websites that capture a user's last sign-in time, see the Credential Reports topic in the Using IAM guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. When the user does not have a password, this field is null (not present). When a user's password exists but has never been used, or when there is no sign-in data associated with the user, this field is null (not present).
This value is returned only in the GetUser and ListUsers actions.
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, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.attach_user_policy( UserName='string', PolicyArn='string' )
string
[REQUIRED]
The name (friendly name, not ARN) of the user to attach the policy to.
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
None
Updates the password policy settings for the AWS account.
For more information about using a password policy, see Managing an IAM Password Policy in the Using IAM guide.
Request Syntax
client.update_account_password_policy( MinimumPasswordLength=123, RequireSymbols=True|False, RequireNumbers=True|False, RequireUppercaseCharacters=True|False, RequireLowercaseCharacters=True|False, AllowUsersToChangePassword=True|False, MaxPasswordAge=123, PasswordReusePrevention=123, HardExpiry=True|False )
integer
The minimum number of characters allowed in an IAM user password.
Default value: 6
boolean
Specifies whether IAM user passwords must contain at least one of the following non-alphanumeric characters:
! @ # $ % ^ & * ( ) _ + - = [ ] { } | '
Default value: false
boolean
Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).
Default value: false
boolean
Specifies whether IAM user passwords must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z).
Default value: false
boolean
Specifies whether IAM user passwords must contain at least one lowercase character from the ISO basic Latin alphabet (a to z).
Default value: false
boolean
Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see Letting IAM Users Change Their Own Passwords in the Using IAM guide.
Default value: false
integer
The number of days that an IAM user password is valid. The default value of 0 means IAM user passwords never expire.
Default value: 0
integer
Specifies the number of previous passwords that IAM users are prevented from reusing. The default value of 0 means IAM users are not prevented from reusing previous passwords.
Default value: 0
boolean
Prevents IAM users from setting a new password after their password has expired.
Default value: false
None
Adds (or updates) an inline policy document that is embedded in the specified 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, refer to Managed Policies and Inline Policies in the Using IAM 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 Using IAM guide.
Request Syntax
client.put_group_policy( GroupName='string', PolicyName='string', PolicyDocument='string' )
string
[REQUIRED]
The name of the group to associate the policy with.
string
[REQUIRED]
The name of the policy document.
string
[REQUIRED]
The policy document.
None
Adds (or updates) an inline policy document that is embedded in the specified role.
When you embed an inline policy in a role, the inline policy is used as 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 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, refer to Managed Policies and Inline Policies in the Using IAM 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 Using IAM guide.
Request Syntax
client.put_role_policy( RoleName='string', PolicyName='string', PolicyDocument='string' )
string
[REQUIRED]
The name of the role to associate the policy with.
string
[REQUIRED]
The name of the policy document.
string
[REQUIRED]
The policy document.
None
Deletes the specified inline policy that is embedded in the specified 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 Using IAM guide.
Request Syntax
client.delete_user_policy( UserName='string', PolicyName='string' )
string
[REQUIRED]
The name (friendly name, not ARN) identifying the user that the policy is embedded in.
string
[REQUIRED]
The name identifying the policy document to delete.
None
Enables the specified MFA device and associates it with the specified user name. When enabled, the MFA device is required for every subsequent login by the user name associated with the device.
Request Syntax
client.enable_mfa_device( UserName='string', SerialNumber='string', AuthenticationCode1='string', AuthenticationCode2='string' )
string
[REQUIRED]
The name of the user for whom you want to enable the MFA device.
string
[REQUIRED]
The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the device ARN.
string
[REQUIRED]
An authentication code emitted by the device.
string
[REQUIRED]
A subsequent authentication code emitted by the device.
None
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 Using IAM guide.
Request Syntax
client.get_account_summary()
dict
Response Syntax
{ 'SummaryMap': { 'string': 123 } }
Response Structure
(dict) --
Contains the response to a successful GetAccountSummary request.
SummaryMap (dict) --
A set of key value pairs containing information about IAM entity usage and IAM quotas.
SummaryMap contains the following keys:
AccessKeysPerUserQuota The maximum number of active access keys allowed for each IAM user.
AccountAccessKeysPresent This value is 1 if the AWS account (root) has an access key, otherwise it is 0.
AccountMFAEnabled This value is 1 if the AWS account (root) has an MFA device assigned, otherwise it is 0.
AccountSigningCertificatesPresent This value is 1 if the AWS account (root) has a signing certificate, otherwise it is 0.
AssumeRolePolicySizeQuota The maximum allowed size for assume role policy documents (trust policies), in non-whitespace characters.
AttachedPoliciesPerGroupQuota The maximum number of managed policies that can be attached to an IAM group.
AttachedPoliciesPerRoleQuota The maximum number of managed policies that can be attached to an IAM role.
AttachedPoliciesPerUserQuota The maximum number of managed policies that can be attached to an IAM user.
GroupPolicySizeQuota The maximum allowed size for the aggregate of all inline policies embedded in an IAM group, in non-whitespace characters.
Groups The number of IAM groups in the AWS account.
GroupsPerUserQuota The maximum number of IAM groups each IAM user can belong to.
GroupsQuota The maximum number of IAM groups allowed in the AWS account.
InstanceProfiles The number of instance profiles in the AWS account.
InstanceProfilesQuota The maximum number of instance profiles allowed in the AWS account.
MFADevices The number of MFA devices in the AWS account, including those assigned and unassigned.
MFADevicesInUse The number of MFA devices that have been assigned to an IAM user or to the AWS account (root).
Policies The number of customer managed policies in the AWS account.
PoliciesQuota The maximum number of customer managed policies allowed in the AWS account.
PolicySizeQuota The maximum allowed size of a customer managed policy, in non-whitespace characters.
PolicyVersionsInUse The number of managed policies that are attached to IAM users, groups, or roles in the AWS account.
PolicyVersionsInUseQuota The maximum number of managed policies that can be attached to IAM users, groups, or roles in the AWS account.
Providers The number of identity providers in the AWS account.
RolePolicySizeQuota The maximum allowed size for the aggregate of all inline policies (access policies, not the trust policy) embedded in an IAM role, in non-whitespace characters.
Roles The number of IAM roles in the AWS account.
RolesQuota The maximum number of IAM roles allowed in the AWS account.
ServerCertificates The number of server certificates in the AWS account.
ServerCertificatesQuota The maximum number of server certificates allowed in the AWS account.
SigningCertificatesPerUserQuota The maximum number of X.509 signing certificates allowed for each IAM user.
UserPolicySizeQuota The maximum allowed size for the aggregate of all inline policies embedded in an IAM user, in non-whitespace characters.
Users The number of IAM users in the AWS account.
UsersQuota The maximum number of IAM users allowed in the AWS account.
VersionsPerPolicyQuota The maximum number of policy versions allowed for each managed policy.
(string) --
(integer) --
Creates a new group.
For information about the number of groups you can create, see Limitations on IAM Entities in the Using IAM guide.
Request Syntax
client.create_group( Path='string', GroupName='string' )
string
The path to the group. For more information about paths, see IAM Identifiers in the Using IAM guide.
This parameter is optional. If it is not included, it defaults to a slash (/).
string
[REQUIRED]
The name of the group to create. Do not include the path in this value.
dict
Response Syntax
{ 'Group': { 'Path': 'string', 'GroupName': 'string', 'GroupId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Contains the response to a successful CreateGroup request.
Group (dict) --
Information about the group.
Path (string) --
The path to the group. For more information about paths, see IAM Identifiers in the Using IAM guide.
GroupName (string) --
The friendly name that identifies the group.
GroupId (string) --
The stable and unique string identifying the group. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the group. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the group was created.
Lists all the managed policies that are available to your account, including your own customer 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, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.list_policies( Scope='All'|'AWS'|'Local', OnlyAttached=True|False, PathPrefix='string', Marker='string', MaxItems=123 )
string
The scope to use for filtering the results.
To list only AWS managed policies, set Scope to AWS. To list only the customer managed policies in your AWS account, set Scope to Local.
This parameter is optional. If it is not included, or if it is set to All, all policies are returned.
boolean
A flag to filter the results to only the attached policies.
When OnlyAttached is true, the returned list contains only the policies that are attached to a user, group, or role. When OnlyAttached is false, or when the parameter is not included, all policies are returned.
string
The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all policies.
string
Use this parameter only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this parameter only when paginating results to indicate the maximum number of policies you want in the response. If there are additional policies beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'Policies': [ { 'PolicyName': 'string', 'PolicyId': 'string', 'Arn': 'string', 'Path': 'string', 'DefaultVersionId': 'string', 'AttachmentCount': 123, 'IsAttachable': True|False, 'Description': 'string', 'CreateDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListPolicies request.
Policies (list) --
A list of policies.
(dict) --
Contains information about a managed policy.
This data type is used as a response element in the CreatePolicy, GetPolicy, and ListPolicies actions.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
PolicyName (string) --
The friendly name (not ARN) identifying the policy.
PolicyId (string) --
The stable and unique string identifying the policy.
For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
Path (string) --
The path to the policy.
For more information about paths, see IAM Identifiers in the Using IAM guide.
DefaultVersionId (string) --
The identifier for the version of the policy that is set as the default version.
AttachmentCount (integer) --
The number of entities (users, groups, and roles) that the policy is attached to.
IsAttachable (boolean) --
Specifies whether the policy can be attached to an IAM user, group, or role.
Description (string) --
A friendly description of the policy.
This element is included in the response to the GetPolicy operation. It is not included in the response to the ListPolicies operation.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the policy was created.
UpdateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the policy was last updated.
When a policy has only one version, this field contains the date and time when the policy was created. When a policy has more than one version, this field contains the date and time when the most recent policy version was created.
IsTruncated (boolean) --
A flag that indicates whether there are more policies to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more policies in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
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 Using IAM guide.
Request Syntax
client.create_account_alias( AccountAlias='string' )
string
[REQUIRED]
The account alias to create.
None
Deletes the specified role. The role must not have any policies attached. For more information about roles, go to Working with Roles.
Request Syntax
client.delete_role( RoleName='string' )
string
[REQUIRED]
The name of the role to delete.
None
Adds the specified user to the specified group.
Request Syntax
client.add_user_to_group( GroupName='string', UserName='string' )
string
[REQUIRED]
The name of the group to update.
string
[REQUIRED]
The name of the user to add.
None
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 Using IAM guide.
Request Syntax
client.create_instance_profile( InstanceProfileName='string', Path='string' )
string
[REQUIRED]
The name of the instance profile to create.
string
The path to the instance profile. For more information about paths, see IAM Identifiers in the Using IAM guide.
This parameter is optional. If it is not included, it defaults to a slash (/).
dict
Response Syntax
{ 'InstanceProfile': { 'Path': 'string', 'InstanceProfileName': 'string', 'InstanceProfileId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'Roles': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string' }, ] } }
Response Structure
(dict) --
Contains the response to a successful CreateInstanceProfile request.
InstanceProfile (dict) --
Information about the instance profile.
Path (string) --
The path to the instance profile. For more information about paths, see IAM Identifiers in the Using IAM guide.
InstanceProfileName (string) --
The name identifying the instance profile.
InstanceProfileId (string) --
The stable and unique string identifying the instance profile. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the instance profile. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date when the instance profile was created.
Roles (list) --
The role associated with the instance profile.
(dict) --
Contains information about an IAM role.
This data type is used as a response element in the following actions:
CreateRole
GetRole
ListRoles
Path (string) --
The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.
RoleName (string) --
The friendly name that identifies the role.
RoleId (string) --
The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the role was created.
AssumeRolePolicyDocument (string) --
The policy that grants an entity permission to assume the role.
Lists the roles that have the specified path prefix. If there are none, the action 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.
Request Syntax
client.list_roles( PathPrefix='string', Marker='string', MaxItems=123 )
string
The path prefix for filtering the results. For example, the prefix /application_abc/component_xyz/ gets all roles whose path starts with /application_abc/component_xyz/.
This parameter is optional. If it is not included, it defaults to a slash (/), listing all roles.
string
Use this parameter only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this parameter only when paginating results to indicate the maximum number of roles you want in the response. If there are additional roles beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'Roles': [ { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string' }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListRoles request.
Roles (list) --
A list of roles.
(dict) --
Contains information about an IAM role.
This data type is used as a response element in the following actions:
CreateRole
GetRole
ListRoles
Path (string) --
The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.
RoleName (string) --
The friendly name that identifies the role.
RoleId (string) --
The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the role was created.
AssumeRolePolicyDocument (string) --
The policy that grants an entity permission to assume the role.
IsTruncated (boolean) --
A flag that indicates whether there are more roles to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more roles in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Lists all 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.
Request Syntax
client.list_entities_for_policy( PolicyArn='string', EntityFilter='User'|'Role'|'Group'|'LocalManagedPolicy'|'AWSManagedPolicy', PathPrefix='string', Marker='string', MaxItems=123 )
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
string
The entity type to use for filtering the results.
For example, when EntityFilter is Role, only the roles that are attached to the specified policy are returned. This parameter is optional. If it is not included, all attached entities (users, groups, and roles) are returned.
string
The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all entities.
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of entities you want in the response. If there are additional entities beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'PolicyGroups': [ { 'GroupName': 'string' }, ], 'PolicyUsers': [ { 'UserName': 'string' }, ], 'PolicyRoles': [ { 'RoleName': 'string' }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListEntitiesForPolicy request.
PolicyGroups (list) --
A list of groups that the policy is attached to.
(dict) --
Contains information about a group that a managed policy is attached to.
This data type is used as a response element in the ListEntitiesForPolicy action.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
GroupName (string) --
The name (friendly name, not ARN) identifying the group.
PolicyUsers (list) --
A list of users that the policy is attached to.
(dict) --
Contains information about a user that a managed policy is attached to.
This data type is used as a response element in the ListEntitiesForPolicy action.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
UserName (string) --
The name (friendly name, not ARN) identifying the user.
PolicyRoles (list) --
A list of roles that the policy is attached to.
(dict) --
Contains information about a role that a managed policy is attached to.
This data type is used as a response element in the ListEntitiesForPolicy action.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
RoleName (string) --
The name (friendly name, not ARN) identifying the role.
IsTruncated (boolean) --
A flag that indicates whether there are more entities to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more entities in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Retrieves information about the specified role, including the role's path, GUID, ARN, and the policy granting permission to assume the role. For more information about ARNs, go to ARNs. For more information about roles, go to Working with Roles.
Request Syntax
client.get_role( RoleName='string' )
string
[REQUIRED]
The name of the role to get information about.
dict
Response Syntax
{ 'Role': { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string' } }
Response Structure
(dict) --
Contains the response to a successful GetRole request.
Role (dict) --
Information about the role.
Path (string) --
The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.
RoleName (string) --
The friendly name that identifies the role.
RoleId (string) --
The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the role was created.
AssumeRolePolicyDocument (string) --
The policy that grants an entity permission to assume the role.
Returns information about the access key IDs associated with the specified user. If there are none, the action 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 UserName is determined implicitly based on the AWS access key ID used to sign the request. Because this action works for access keys under the AWS account, you can use this action to manage root credentials even if the AWS account has no associated users.
Request Syntax
client.list_access_keys( UserName='string', Marker='string', MaxItems=123 )
string
The name of the user.
string
Use this parameter only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this parameter only when paginating results to indicate the maximum number of keys you want in the response. If there are additional keys beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'AccessKeyMetadata': [ { 'UserName': 'string', 'AccessKeyId': 'string', 'Status': 'Active'|'Inactive', 'CreateDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListAccessKeys request.
AccessKeyMetadata (list) --
A list of access key metadata.
(dict) --
Contains information about an AWS access key, without its secret key.
This data type is used as a response element in the ListAccessKeys action.
UserName (string) --
The name of the IAM user that the key is associated with.
AccessKeyId (string) --
The ID for this access key.
Status (string) --
The status of the access key. Active means the key is valid for API calls; Inactive means it is not.
CreateDate (datetime) --
The date when the access key was created.
IsTruncated (boolean) --
A flag that indicates whether there are more keys to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more keys in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Lists all managed policies that are attached to the specified user.
A 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, refer to Managed Policies and Inline Policies in the Using IAM 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 action returns an empty list.
Request Syntax
client.list_attached_user_policies( UserName='string', PathPrefix='string', Marker='string', MaxItems=123 )
string
[REQUIRED]
The name (friendly name, not ARN) of the user to list attached policies for.
string
The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all policies.
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of policies you want in the response. If there are additional policies beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'AttachedPolicies': [ { 'PolicyName': 'string', 'PolicyArn': 'string' }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListAttachedUserPolicies request.
AttachedPolicies (list) --
A list of the attached policies.
(dict) --
Contains information about an attached policy.
An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies, ListAttachedRolePolicies, ListAttachedUserPolicies, and GetAccountAuthorizationDetails actions.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
PolicyName (string) --
The friendly name of the attached policy.
PolicyArn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
IsTruncated (boolean) --
A flag that indicates whether there are more policies to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more policies in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
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 Using IAM guide.
Request Syntax
client.create_login_profile( UserName='string', Password='string', PasswordResetRequired=True|False )
string
[REQUIRED]
The name of the user to create a password for.
string
[REQUIRED]
The new password for the user.
boolean
Specifies whether the user is required to set a new password on next sign-in.
dict
Response Syntax
{ 'LoginProfile': { 'UserName': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordResetRequired': True|False } }
Response Structure
(dict) --
Contains the response to a successful CreateLoginProfile request.
LoginProfile (dict) --
The user name and password create date.
UserName (string) --
The name of the user, which can be used for signing in to the AWS Management Console.
CreateDate (datetime) --
The date when the password for the user was created.
PasswordResetRequired (boolean) --
Specifies whether the user is required to set a new password on next sign-in.
Retrieves the specified inline policy document that is embedded with the specified role.
A 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, refer to Managed Policies and Inline Policies in the Using IAM guide.
For more information about roles, go to Using Roles to Delegate Permissions and Federate Identities.
Request Syntax
client.get_role_policy( RoleName='string', PolicyName='string' )
string
[REQUIRED]
The name of the role associated with the policy.
string
[REQUIRED]
The name of the policy document to get.
dict
Response Syntax
{ 'RoleName': 'string', 'PolicyName': 'string', 'PolicyDocument': 'string' }
Response Structure
(dict) --
Contains the response to a successful GetRolePolicy request.
RoleName (string) --
The role the policy is associated with.
PolicyName (string) --
The name of the policy.
PolicyDocument (string) --
The policy document.
Removes the specified client ID (also known as audience) from the list of client IDs registered for the specified IAM OpenID Connect provider.
This action is idempotent; it does not fail or return an error if you try to remove a client ID that was removed previously.
Request Syntax
client.remove_client_id_from_open_id_connect_provider( OpenIDConnectProviderArn='string', ClientID='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the IAM OpenID Connect (OIDC) provider to remove the client ID from. You can get a list of OIDC provider ARNs by using the ListOpenIDConnectProviders action.
string
[REQUIRED]
The client ID (also known as audience) to remove from the IAM OpenID Connect provider. For more information about client IDs, see CreateOpenIDConnectProvider.
None
Creates a new user for your AWS account.
For information about limitations on the number of users you can create, see Limitations on IAM Entities in the Using IAM guide.
Request Syntax
client.create_user( Path='string', UserName='string' )
string
The path for the user name. For more information about paths, see IAM Identifiers in the Using IAM guide.
This parameter is optional. If it is not included, it defaults to a slash (/).
string
[REQUIRED]
The name of the user to create.
dict
Response Syntax
{ 'User': { 'Path': 'string', 'UserName': 'string', 'UserId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordLastUsed': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Contains the response to a successful CreateUser request.
User (dict) --
Information about the user.
Path (string) --
The path to the user. For more information about paths, see IAM Identifiers in the Using IAM guide.
UserName (string) --
The friendly name identifying the user.
UserId (string) --
The stable and unique string identifying the user. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use ARNs in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the user was created.
PasswordLastUsed (datetime) --
The date and time, in ISO 8601 date-time format, when the user's password was last used to sign in to an AWS website. For a list of AWS websites that capture a user's last sign-in time, see the Credential Reports topic in the Using IAM guide. If a password is used more than once in a five-minute span, only the first use is returned in this field. When the user does not have a password, this field is null (not present). When a user's password exists but has never been used, or when there is no sign-in data associated with the user, this field is null (not present).
This value is returned only in the GetUser and ListUsers actions.
Lists the SAML providers in the account.
Request Syntax
client.list_saml_providers()
dict
Response Syntax
{ 'SAMLProviderList': [ { 'Arn': 'string', 'ValidUntil': datetime(2015, 1, 1), 'CreateDate': datetime(2015, 1, 1) }, ] }
Response Structure
(dict) --
Contains the response to a successful ListSAMLProviders request.
SAMLProviderList (list) --
The list of SAML providers for this account.
(dict) --
Contains the list of SAML providers for this account.
Arn (string) --
The Amazon Resource Name (ARN) of the SAML provider.
ValidUntil (datetime) --
The expiration date and time for the SAML provider.
CreateDate (datetime) --
The date and time when the SAML provider was created.
Creates a new role for your AWS account. For more information about roles, go to Working with Roles. For information about limitations on role names and the number of roles you can create, go to Limitations on IAM Entities in the Using IAM guide.
The policy in the following example grants permission to an EC2 instance to assume the role.
Request Syntax
client.create_role( Path='string', RoleName='string', AssumeRolePolicyDocument='string' )
string
The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.
This parameter is optional. If it is not included, it defaults to a slash (/).
string
[REQUIRED]
The name of the role to create.
string
[REQUIRED]
The policy that grants an entity permission to assume the role.
dict
Response Syntax
{ 'Role': { 'Path': 'string', 'RoleName': 'string', 'RoleId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1), 'AssumeRolePolicyDocument': 'string' } }
Response Structure
(dict) --
Contains the response to a successful CreateRole request.
Role (dict) --
Information about the role.
Path (string) --
The path to the role. For more information about paths, see IAM Identifiers in the Using IAM guide.
RoleName (string) --
The friendly name that identifies the role.
RoleId (string) --
The stable and unique string identifying the role. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the role. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the role was created.
AssumeRolePolicyDocument (string) --
The policy that grants an entity permission to assume the role.
Lists the MFA devices. If the request includes the user name, then this action lists all the MFA devices associated with the specified user name. If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request.
You can paginate the results using the MaxItems and Marker parameters.
Request Syntax
client.list_mfa_devices( UserName='string', Marker='string', MaxItems=123 )
string
The name of the user whose MFA devices you want to list.
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of MFA devices you want in the response. If there are additional MFA devices beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'MFADevices': [ { 'UserName': 'string', 'SerialNumber': 'string', 'EnableDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListMFADevices request.
MFADevices (list) --
A list of MFA devices.
(dict) --
Contains information about an MFA device.
This data type is used as a response element in the ListMFADevices action.
UserName (string) --
The user with whom the MFA device is associated.
SerialNumber (string) --
The serial number that uniquely identifies the MFA device. For virtual MFA devices, the serial number is the device ARN.
EnableDate (datetime) --
The date when the MFA device was enabled for the user.
IsTruncated (boolean) --
A flag that indicates whether there are more MFA devices to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more MFA devices in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Lists the groups the specified user belongs to.
You can paginate the results using the MaxItems and Marker parameters.
Request Syntax
client.list_groups_for_user( UserName='string', Marker='string', MaxItems=123 )
string
[REQUIRED]
The name of the user to list groups for.
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of groups you want in the response. If there are additional groups beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'Groups': [ { 'Path': 'string', 'GroupName': 'string', 'GroupId': 'string', 'Arn': 'string', 'CreateDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListGroupsForUser request.
Groups (list) --
A list of groups.
(dict) --
Contains information about an IAM group entity.
This data type is used as a response element in the following actions:
CreateGroup
GetGroup
ListGroups
Path (string) --
The path to the group. For more information about paths, see IAM Identifiers in the Using IAM guide.
GroupName (string) --
The friendly name that identifies the group.
GroupId (string) --
The stable and unique string identifying the group. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the group. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
CreateDate (datetime) --
The date and time, in ISO 8601 date-time format, when the group was created.
IsTruncated (boolean) --
A flag that indicates whether there are more groups to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more groups in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Deletes the specified signing certificate 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. Because this action works for access keys under the AWS account, you can use this action to manage root credentials even if the AWS account has no associated users.
Request Syntax
client.delete_signing_certificate( UserName='string', CertificateId='string' )
string
The name of the user the signing certificate belongs to.
string
[REQUIRED]
The ID of the signing certificate to delete.
None
Deletes the password policy for the AWS account.
Request Syntax
client.delete_account_password_policy()
None
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, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.detach_role_policy( RoleName='string', PolicyArn='string' )
string
[REQUIRED]
The name (friendly name, not ARN) of the role to detach the policy from.
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
None
Changes the password for the specified user.
Users can change their own passwords by calling ChangePassword. For more information about modifying passwords, see Managing Passwords in the Using IAM guide.
Request Syntax
client.update_login_profile( UserName='string', Password='string', PasswordResetRequired=True|False )
string
[REQUIRED]
The name of the user whose password you want to update.
string
The new password for the specified user.
boolean
Require the specified user to set a new password on next sign-in.
None
Removes the specified role from the specified instance profile.
For more information about roles, go to Working with Roles. For more information about instance profiles, go to About Instance Profiles.
Request Syntax
client.remove_role_from_instance_profile( InstanceProfileName='string', RoleName='string' )
string
[REQUIRED]
The name of the instance profile to update.
string
[REQUIRED]
The name of the role to remove.
None
Updates the name and/or the path of the specified server certificate.
Request Syntax
client.update_server_certificate( ServerCertificateName='string', NewPath='string', NewServerCertificateName='string' )
string
[REQUIRED]
The name of the server certificate that you want to update.
string
The new path for the server certificate. Include this only if you are updating the server certificate's path.
string
The new name for the server certificate. Include this only if you are updating the server certificate's name.
None
Retrieves a credential report for the AWS account. For more information about the credential report, see Getting Credential Reports in the Using IAM guide.
Request Syntax
client.get_credential_report()
dict
Response Syntax
{ 'Content': b'bytes', 'ReportFormat': 'text/csv', 'GeneratedTime': datetime(2015, 1, 1) }
Response Structure
(dict) --
Contains the response to a successful GetCredentialReport request.
Content (bytes) --
Contains the credential report. The report is Base64-encoded.
ReportFormat (string) --
The format (MIME type) of the credential report.
GeneratedTime (datetime) --
The date and time when the credential report was created, in ISO 8601 date-time format.
Retrieves information about the specified server certificate.
Request Syntax
client.get_server_certificate( ServerCertificateName='string' )
string
[REQUIRED]
The name of the server certificate you want to retrieve information about.
dict
Response Syntax
{ 'ServerCertificate': { 'ServerCertificateMetadata': { 'Path': 'string', 'ServerCertificateName': 'string', 'ServerCertificateId': 'string', 'Arn': 'string', 'UploadDate': datetime(2015, 1, 1), 'Expiration': datetime(2015, 1, 1) }, 'CertificateBody': 'string', 'CertificateChain': 'string' } }
Response Structure
(dict) --
Contains the response to a successful GetServerCertificate request.
ServerCertificate (dict) --
Information about the server certificate.
ServerCertificateMetadata (dict) --
The meta information of the server certificate, such as its name, path, ID, and ARN.
Path (string) --
The path to the server certificate. For more information about paths, see IAM Identifiers in the Using IAM guide.
ServerCertificateName (string) --
The name that identifies the server certificate.
ServerCertificateId (string) --
The stable and unique string identifying the server certificate. For more information about IDs, see IAM Identifiers in the Using IAM guide.
Arn (string) --
The Amazon Resource Name (ARN) specifying the server certificate. For more information about ARNs and how to use them in policies, see IAM Identifiers in the Using IAM guide.
UploadDate (datetime) --
The date when the server certificate was uploaded.
Expiration (datetime) --
The date on which the certificate is set to expire.
CertificateBody (string) --
The contents of the public key certificate.
CertificateChain (string) --
The contents of the public key certificate chain.
Returns information about the specified OpenID Connect provider.
Request Syntax
client.get_open_id_connect_provider( OpenIDConnectProviderArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the IAM OpenID Connect (OIDC) provider to get information for. You can get a list of OIDC provider ARNs by using the ListOpenIDConnectProviders action.
dict
Response Syntax
{ 'Url': 'string', 'ClientIDList': [ 'string', ], 'ThumbprintList': [ 'string', ], 'CreateDate': datetime(2015, 1, 1) }
Response Structure
(dict) --
Contains the response to a successful GetOpenIDConnectProvider request.
Url (string) --
The URL that the IAM OpenID Connect provider is associated with. For more information, see CreateOpenIDConnectProvider.
ClientIDList (list) --
A list of client IDs (also known as audiences) that are associated with the specified IAM OpenID Connect provider. For more information, see CreateOpenIDConnectProvider.
(string) --
ThumbprintList (list) --
A list of certificate thumbprints that are associated with the specified IAM OpenID Connect provider. For more information, see CreateOpenIDConnectProvider.
(string) --
Contains a thumbprint for an identity provider's server certificate.
The identity provider's server certificate thumbprint is the hex-encoded SHA-1 hash value of the self-signed X.509 certificate used by the domain where the OpenID Connect provider makes its keys available. It is always a 40-character string.
CreateDate (datetime) --
The date and time when the IAM OpenID Connect provider entity was created in the AWS account.
Lists all managed policies that are attached to the specified role.
A 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, refer to Managed Policies and Inline Policies in the Using IAM 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 action returns an empty list.
Request Syntax
client.list_attached_role_policies( RoleName='string', PathPrefix='string', Marker='string', MaxItems=123 )
string
[REQUIRED]
The name (friendly name, not ARN) of the role to list attached policies for.
string
The path prefix for filtering the results. This parameter is optional. If it is not included, it defaults to a slash (/), listing all policies.
string
Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of policies you want in the response. If there are additional policies beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'AttachedPolicies': [ { 'PolicyName': 'string', 'PolicyArn': 'string' }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListAttachedRolePolicies request.
AttachedPolicies (list) --
A list of the attached policies.
(dict) --
Contains information about an attached policy.
An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies, ListAttachedRolePolicies, ListAttachedUserPolicies, and GetAccountAuthorizationDetails actions.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
PolicyName (string) --
The friendly name of the attached policy.
PolicyArn (string) --
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
IsTruncated (boolean) --
A flag that indicates whether there are more policies to list. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more policies in the list.
Marker (string) --
If IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Updates the name and/or the path of the specified group.
Request Syntax
client.update_group( GroupName='string', NewPath='string', NewGroupName='string' )
string
[REQUIRED]
Name of the group to update. If you're changing the name of the group, this is the original name.
string
New path for the group. Only include this if changing the group's path.
string
New name for the group. Only include this if changing the group's name.
None
Retrieves the user name and password-creation date for the specified user. If the user has not been assigned a password, the action returns a 404 ( NoSuchEntity) error.
Request Syntax
client.get_login_profile( UserName='string' )
string
[REQUIRED]
The name of the user whose login profile you want to retrieve.
dict
Response Syntax
{ 'LoginProfile': { 'UserName': 'string', 'CreateDate': datetime(2015, 1, 1), 'PasswordResetRequired': True|False } }
Response Structure
(dict) --
Contains the response to a successful GetLoginProfile request.
LoginProfile (dict) --
The user name and password create date for the user.
UserName (string) --
The name of the user, which can be used for signing in to the AWS Management Console.
CreateDate (datetime) --
The date when the password for the user was created.
PasswordResetRequired (boolean) --
Specifies whether the user is required to set a new password on next sign-in.
Uploads an X.509 signing certificate and associates it with the specified 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 user name is determined implicitly based on the AWS access key ID used to sign the request. Because this action works for access keys under the AWS account, you can use this action to manage root credentials even if the AWS account has no associated users.
Request Syntax
client.upload_signing_certificate( UserName='string', CertificateBody='string' )
string
The name of the user the signing certificate is for.
string
[REQUIRED]
The contents of the signing certificate.
dict
Response Syntax
{ 'Certificate': { 'UserName': 'string', 'CertificateId': 'string', 'CertificateBody': 'string', 'Status': 'Active'|'Inactive', 'UploadDate': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Contains the response to a successful UploadSigningCertificate request.
Certificate (dict) --
Information about the certificate.
UserName (string) --
The name of the user the signing certificate is associated with.
CertificateId (string) --
The ID for the signing certificate.
CertificateBody (string) --
The contents of the signing certificate.
Status (string) --
The status of the signing certificate. Active means the key is valid for API calls, while Inactive means it is not.
UploadDate (datetime) --
The date when the signing certificate was uploaded.
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 action works for access keys under the AWS account, you can use this action to manage root credentials 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 in the Using IAM guide.
Request Syntax
client.create_access_key( UserName='string' )
string
The user name that the new key will belong to.
dict
Response Syntax
{ 'AccessKey': { 'UserName': 'string', 'AccessKeyId': 'string', 'Status': 'Active'|'Inactive', 'SecretAccessKey': 'string', 'CreateDate': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Contains the response to a successful CreateAccessKey request.
AccessKey (dict) --
Information about the access key.
UserName (string) --
The name of the IAM user that the access key is associated with.
AccessKeyId (string) --
The ID for this access key.
Status (string) --
The status of the access key. Active means the key is valid for API calls, while Inactive means it is not.
SecretAccessKey (string) --
The secret key used to sign requests.
CreateDate (datetime) --
The date when the access key was created.
Changes the status of the specified signing certificate from active to disabled, or vice versa. This action can be used to disable a user's signing certificate as part of a certificate rotation work flow.
If the UserName field is not specified, the UserName is determined implicitly based on the AWS access key ID used to sign the request. Because this action works for access keys under the AWS account, you can use this action to manage root credentials even if the AWS account has no associated users.
Request Syntax
client.update_signing_certificate( UserName='string', CertificateId='string', Status='Active'|'Inactive' )
string
The name of the user the signing certificate belongs to.
string
[REQUIRED]
The ID of the signing certificate you want to update.
string
[REQUIRED]
The status you want to assign to the certificate. Active means the certificate can be used for API calls to AWS, while Inactive means the certificate cannot be used.
None
Changes the status of the specified access key from Active to Inactive, or vice versa. This action can be used to disable a user's key as part of a key rotation work flow.
If the UserName field is not specified, the UserName is determined implicitly based on the AWS access key ID used to sign the request. Because this action works for access keys under the AWS account, you can use this action to manage root credentials even if the AWS account has no associated users.
For information about rotating keys, see Managing Keys and Certificates in the Using IAM guide.
Request Syntax
client.update_access_key( UserName='string', AccessKeyId='string', Status='Active'|'Inactive' )
string
The name of the user whose key you want to update.
string
[REQUIRED]
The access key ID of the secret access key you want to update.
string
[REQUIRED]
The status you want to assign to the secret access key. Active means the key can be used for API calls to AWS, while Inactive means the key cannot be used.
None
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.
Request Syntax
client.get_access_key_last_used( AccessKeyId='string' )
string
[REQUIRED]
The identifier of an access key.
dict
Response Syntax
{ 'UserName': 'string', 'AccessKeyLastUsed': { 'LastUsedDate': datetime(2015, 1, 1), 'ServiceName': 'string', 'Region': 'string' } }
Response Structure
(dict) --
Contains the response to a successful GetAccessKeyLastUsed request. It is also returned as a member of the AccessKeyMetaData structure returned by the ListAccessKeys action.
UserName (string) --
The name of the AWS IAM user that owns this access key.
AccessKeyLastUsed (dict) --
Contains information about the last time the access key was used.
LastUsedDate (datetime) --
The date and time, in ISO 8601 date-time format, when the access key was most recently used.
ServiceName (string) --
The name of the AWS service with which this access key was most recently used.
Region (string) --
The AWS region where this access key was most recently used.
For more information about AWS regions, see Regions and Endpoints in the Amazon Web Services General Reference.
Deletes the specified version of the specified managed policy.
You cannot delete the default version of a policy using this API. To delete the default version of 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, refer to Versioning for Managed Policies in the Using IAM guide.
Request Syntax
client.delete_policy_version( PolicyArn='string', VersionId='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
string
[REQUIRED]
The policy version to delete.
For more information about managed policy versions, see Versioning for Managed Policies in the Using IAM guide.
None
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, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.detach_user_policy( UserName='string', PolicyArn='string' )
string
[REQUIRED]
The name (friendly name, not ARN) of the user to detach the policy from.
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
None
Creates an IAM entity to describe an identity provider (IdP) that supports SAML 2.0.
The SAML provider that you create with this operation can be used as a principal in a role's trust policy to establish a trust relationship between AWS and a SAML identity provider. 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, you upload an a SAML metadata document that you get from your IdP and that includes the issuer's name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. You must generate the metadata document using the identity management software that is used as your organization's IdP.
For more information, see Giving Console Access Using SAML and Creating Temporary Security Credentials for SAML Federation in the Using Temporary Credentials guide.
Request Syntax
client.create_saml_provider( SAMLMetadataDocument='string', Name='string' )
string
[REQUIRED]
An XML document generated by an identity provider (IdP) that supports SAML 2.0. The document includes the issuer's name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. You must generate the metadata document using the identity management software that is used as your organization's IdP.
For more information, see Creating Temporary Security Credentials for SAML Federation in the Using Temporary Security Credentials guide.
string
[REQUIRED]
The name of the provider to create.
dict
Response Syntax
{ 'SAMLProviderArn': 'string' }
Response Structure
(dict) --
Contains the response to a successful CreateSAMLProvider request.
SAMLProviderArn (string) --
The Amazon Resource Name (ARN) of the SAML provider.
Attaches the specified managed policy to the specified role.
When you attach a managed policy to a role, the managed policy is used as the role's access (permissions) policy. 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.
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, refer to Managed Policies and Inline Policies in the Using IAM guide.
Request Syntax
client.attach_role_policy( RoleName='string', PolicyArn='string' )
string
[REQUIRED]
The name (friendly name, not ARN) of the role to attach the policy to.
string
[REQUIRED]
The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
None