aws-sdk-iam 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aws_sdk_iam/__init__.py +15 -0
- aws_sdk_iam/_async.py +25 -0
- aws_sdk_iam/_auth/_identity.py +15 -0
- aws_sdk_iam/_auth/_providers.py +159 -0
- aws_sdk_iam/_auth/_signers.py +83 -0
- aws_sdk_iam/_auth/_sigv4.py +364 -0
- aws_sdk_iam/_auth/_zapros_handler.py +62 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/accept_delegation_request.py +143 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/add_client_id_to_open_id_connect_provider.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/add_role_to_instance_profile.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/add_user_to_group.py +141 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/associate_delegation_request.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/attach_group_policy.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/attach_role_policy.py +159 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/attach_user_policy.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/change_password.py +159 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_access_key.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_account_alias.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_delegation_request.py +177 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_group.py +167 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_instance_profile.py +173 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_login_profile.py +175 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_open_id_connect_provider.py +181 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_policy.py +179 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_policy_version.py +173 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_role.py +175 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_saml_provider.py +175 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_service_linked_role.py +169 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_service_specific_credential.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_user.py +175 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/create_virtual_mfa_device.py +177 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/deactivate_mfa_device.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_access_key.py +141 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_account_alias.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_account_password_policy.py +130 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_group.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_group_policy.py +141 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_instance_profile.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_login_profile.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_open_id_connect_provider.py +143 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_policy.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_policy_version.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_role.py +159 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_role_permissions_boundary.py +143 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_role_policy.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_saml_provider.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_server_certificate.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_service_linked_role.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_service_specific_credential.py +131 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_signing_certificate.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_ssh_public_key.py +129 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_user.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_user_permissions_boundary.py +137 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_user_policy.py +141 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/delete_virtual_mfa_device.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/detach_group_policy.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/detach_role_policy.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/detach_user_policy.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/disable_organizations_root_credentials_management.py +169 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/disable_organizations_root_sessions.py +169 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/disable_outbound_web_identity_federation.py +118 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/enable_mfa_device.py +165 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/enable_organizations_root_credentials_management.py +175 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/enable_organizations_root_sessions.py +175 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/enable_outbound_web_identity_federation.py +140 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/generate_credential_report.py +146 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/generate_organizations_access_report.py +151 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/generate_service_last_accessed_details.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_access_key_last_used.py +143 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_account_authorization_details.py +151 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_account_password_policy.py +146 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_account_summary.py +142 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_context_keys_for_custom_policy.py +151 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_context_keys_for_principal_policy.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_credential_report.py +158 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_delegation_request.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_group.py +151 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_group_policy.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_human_readable_summary.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_instance_profile.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_login_profile.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_mfa_device.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_open_id_connect_provider.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_organizations_access_report.py +151 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_outbound_web_identity_federation_info.py +140 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_policy.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_policy_version.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_role.py +150 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_role_policy.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_saml_provider.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_server_certificate.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_service_last_accessed_details.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_service_last_accessed_details_with_entities.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_service_linked_role_deletion_status.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_ssh_public_key.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_user.py +150 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/get_user_policy.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_access_keys.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_account_aliases.py +151 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_attached_group_policies.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_attached_role_policies.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_attached_user_policies.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_delegation_requests.py +161 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_entities_for_policy.py +161 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_group_policies.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_groups.py +145 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_groups_for_user.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_instance_profile_tags.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_instance_profiles.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_instance_profiles_for_role.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_mfa_device_tags.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_mfa_devices.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_open_id_connect_provider_tags.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_open_id_connect_providers.py +151 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_organizations_features.py +169 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_policies.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_policies_granting_service_access.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_policy_tags.py +161 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_policy_versions.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_role_policies.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_role_tags.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_roles.py +145 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_saml_provider_tags.py +161 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_saml_providers.py +151 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_server_certificate_tags.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_server_certificates.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_service_specific_credentials.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_signing_certificates.py +159 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_ssh_public_keys.py +151 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_user_policies.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_user_tags.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_users.py +145 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/list_virtual_mfa_devices.py +143 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/put_group_policy.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/put_role_permissions_boundary.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/put_role_policy.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/put_user_permissions_boundary.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/put_user_policy.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/reject_delegation_request.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/remove_client_id_from_open_id_connect_provider.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/remove_role_from_instance_profile.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/remove_user_from_group.py +141 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/reset_service_specific_credential.py +151 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/resync_mfa_device.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/send_delegation_token.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/set_default_policy_version.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/set_security_token_service_preferences.py +131 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/simulate_custom_policy.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/simulate_principal_policy.py +163 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/tag_instance_profile.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/tag_mfa_device.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/tag_open_id_connect_provider.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/tag_policy.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/tag_role.py +152 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/tag_saml_provider.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/tag_server_certificate.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/tag_user.py +152 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/untag_instance_profile.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/untag_mfa_device.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/untag_open_id_connect_provider.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/untag_policy.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/untag_role.py +141 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/untag_saml_provider.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/untag_server_certificate.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/untag_user.py +141 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_access_key.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_account_password_policy.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_assume_role_policy.py +155 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_delegation_request.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_group.py +147 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_login_profile.py +153 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_open_id_connect_provider_thumbprint.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_role.py +157 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_role_description.py +161 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_saml_provider.py +175 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_server_certificate.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_service_specific_credential.py +131 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_signing_certificate.py +149 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_ssh_public_key.py +135 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/update_user.py +159 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/upload_server_certificate.py +189 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/upload_signing_certificate.py +193 -0
- aws_sdk_iam/_operations/aws_identity_management_v20100508/upload_ssh_public_key.py +175 -0
- aws_sdk_iam/_pagination.py +21 -0
- aws_sdk_iam/_protocol/__init__.py +1 -0
- aws_sdk_iam/_protocol/errors.py +58 -0
- aws_sdk_iam/_protocol/xml.py +27 -0
- aws_sdk_iam/_rule_engine/__init__.py +0 -0
- aws_sdk_iam/_rule_engine/_aws_partition.py +160 -0
- aws_sdk_iam/_rule_engine/_endpoint_rule_set.py +507 -0
- aws_sdk_iam/_rule_engine/_endpoint_runtime.py +389 -0
- aws_sdk_iam/_services/_pipeline.py +194 -0
- aws_sdk_iam/_services/async_iam.py +9492 -0
- aws_sdk_iam/_services/iam.py +9301 -0
- aws_sdk_iam/errors/__init__.py +108 -0
- aws_sdk_iam/errors/_base.py +94 -0
- aws_sdk_iam/errors/account_not_management_or_delegated_administrator_exception.py +54 -0
- aws_sdk_iam/errors/caller_is_not_management_account_exception.py +50 -0
- aws_sdk_iam/errors/concurrent_modification_exception.py +50 -0
- aws_sdk_iam/errors/credential_report_expired_exception.py +50 -0
- aws_sdk_iam/errors/credential_report_not_present_exception.py +52 -0
- aws_sdk_iam/errors/credential_report_not_ready_exception.py +50 -0
- aws_sdk_iam/errors/delete_conflict_exception.py +50 -0
- aws_sdk_iam/errors/duplicate_certificate_exception.py +50 -0
- aws_sdk_iam/errors/duplicate_ssh_public_key_exception.py +50 -0
- aws_sdk_iam/errors/entity_already_exists_exception.py +50 -0
- aws_sdk_iam/errors/entity_temporarily_unmodifiable_exception.py +52 -0
- aws_sdk_iam/errors/feature_disabled_exception.py +50 -0
- aws_sdk_iam/errors/feature_enabled_exception.py +50 -0
- aws_sdk_iam/errors/invalid_authentication_code_exception.py +52 -0
- aws_sdk_iam/errors/invalid_certificate_exception.py +50 -0
- aws_sdk_iam/errors/invalid_input_exception.py +48 -0
- aws_sdk_iam/errors/invalid_public_key_exception.py +50 -0
- aws_sdk_iam/errors/invalid_user_type_exception.py +50 -0
- aws_sdk_iam/errors/key_pair_mismatch_exception.py +50 -0
- aws_sdk_iam/errors/limit_exceeded_exception.py +50 -0
- aws_sdk_iam/errors/malformed_certificate_exception.py +50 -0
- aws_sdk_iam/errors/malformed_policy_document_exception.py +50 -0
- aws_sdk_iam/errors/no_such_entity_exception.py +48 -0
- aws_sdk_iam/errors/open_id_idp_communication_error_exception.py +52 -0
- aws_sdk_iam/errors/organization_not_found_exception.py +48 -0
- aws_sdk_iam/errors/organization_not_in_all_features_mode_exception.py +50 -0
- aws_sdk_iam/errors/password_policy_violation_exception.py +50 -0
- aws_sdk_iam/errors/policy_evaluation_exception.py +50 -0
- aws_sdk_iam/errors/policy_not_attachable_exception.py +50 -0
- aws_sdk_iam/errors/report_generation_limit_exceeded_exception.py +52 -0
- aws_sdk_iam/errors/service_access_not_enabled_exception.py +48 -0
- aws_sdk_iam/errors/service_failure_exception.py +50 -0
- aws_sdk_iam/errors/service_not_supported_exception.py +50 -0
- aws_sdk_iam/errors/unmodifiable_entity_exception.py +50 -0
- aws_sdk_iam/errors/unrecognized_public_key_encoding_exception.py +52 -0
- aws_sdk_iam/py.typed +0 -0
- aws_sdk_iam/types/accept_delegation_request_request.py +34 -0
- aws_sdk_iam/types/access_advisor_usage_granularity_type.py +41 -0
- aws_sdk_iam/types/access_detail.py +91 -0
- aws_sdk_iam/types/access_details.py +48 -0
- aws_sdk_iam/types/access_key.py +80 -0
- aws_sdk_iam/types/access_key_id_type.py +5 -0
- aws_sdk_iam/types/access_key_last_used.py +55 -0
- aws_sdk_iam/types/access_key_metadata.py +67 -0
- aws_sdk_iam/types/access_key_metadata_list_type.py +52 -0
- aws_sdk_iam/types/access_key_secret_type.py +5 -0
- aws_sdk_iam/types/account_alias_list_type.py +40 -0
- aws_sdk_iam/types/account_alias_type.py +5 -0
- aws_sdk_iam/types/account_id_type.py +5 -0
- aws_sdk_iam/types/action_name_list_type.py +40 -0
- aws_sdk_iam/types/action_name_type.py +5 -0
- aws_sdk_iam/types/add_client_id_to_open_id_connect_provider_request.py +52 -0
- aws_sdk_iam/types/add_role_to_instance_profile_request.py +43 -0
- aws_sdk_iam/types/add_user_to_group_request.py +39 -0
- aws_sdk_iam/types/all_users.py +5 -0
- aws_sdk_iam/types/arn_list_type.py +38 -0
- aws_sdk_iam/types/arn_type.py +6 -0
- aws_sdk_iam/types/assertion_encryption_mode_type.py +41 -0
- aws_sdk_iam/types/assignment_status_type.py +41 -0
- aws_sdk_iam/types/associate_delegation_request_request.py +34 -0
- aws_sdk_iam/types/attach_group_policy_request.py +39 -0
- aws_sdk_iam/types/attach_role_policy_request.py +39 -0
- aws_sdk_iam/types/attach_user_policy_request.py +39 -0
- aws_sdk_iam/types/attached_permissions_boundary.py +53 -0
- aws_sdk_iam/types/attached_policies_list_type.py +50 -0
- aws_sdk_iam/types/attached_policy.py +36 -0
- aws_sdk_iam/types/attachment_count_type.py +5 -0
- aws_sdk_iam/types/authentication_code_type.py +5 -0
- aws_sdk_iam/types/boolean_object_type.py +5 -0
- aws_sdk_iam/types/boolean_type.py +7 -0
- aws_sdk_iam/types/bootstrap_datum.py +26 -0
- aws_sdk_iam/types/certificate_body_type.py +5 -0
- aws_sdk_iam/types/certificate_chain_type.py +5 -0
- aws_sdk_iam/types/certificate_id_type.py +5 -0
- aws_sdk_iam/types/certificate_list_type.py +52 -0
- aws_sdk_iam/types/certification_key_type.py +5 -0
- aws_sdk_iam/types/certification_map_type.py +56 -0
- aws_sdk_iam/types/certification_value_type.py +5 -0
- aws_sdk_iam/types/change_password_request.py +38 -0
- aws_sdk_iam/types/client_id_list_type.py +38 -0
- aws_sdk_iam/types/client_id_type.py +5 -0
- aws_sdk_iam/types/column_number.py +7 -0
- aws_sdk_iam/types/concurrent_modification_message.py +5 -0
- aws_sdk_iam/types/console_deep_link_type.py +5 -0
- aws_sdk_iam/types/context_entry.py +71 -0
- aws_sdk_iam/types/context_entry_list_type.py +48 -0
- aws_sdk_iam/types/context_key_name_type.py +5 -0
- aws_sdk_iam/types/context_key_names_result_list_type.py +40 -0
- aws_sdk_iam/types/context_key_type_enum.py +59 -0
- aws_sdk_iam/types/context_key_value_list_type.py +40 -0
- aws_sdk_iam/types/context_key_value_type.py +5 -0
- aws_sdk_iam/types/create_access_key_request.py +31 -0
- aws_sdk_iam/types/create_access_key_response.py +38 -0
- aws_sdk_iam/types/create_account_alias_request.py +30 -0
- aws_sdk_iam/types/create_delegation_request_request.py +131 -0
- aws_sdk_iam/types/create_delegation_request_response.py +43 -0
- aws_sdk_iam/types/create_group_request.py +39 -0
- aws_sdk_iam/types/create_group_response.py +34 -0
- aws_sdk_iam/types/create_instance_profile_request.py +57 -0
- aws_sdk_iam/types/create_instance_profile_response.py +40 -0
- aws_sdk_iam/types/create_login_profile_request.py +53 -0
- aws_sdk_iam/types/create_login_profile_response.py +38 -0
- aws_sdk_iam/types/create_open_id_connect_provider_request.py +83 -0
- aws_sdk_iam/types/create_open_id_connect_provider_response.py +52 -0
- aws_sdk_iam/types/create_policy_request.py +72 -0
- aws_sdk_iam/types/create_policy_response.py +35 -0
- aws_sdk_iam/types/create_policy_version_request.py +55 -0
- aws_sdk_iam/types/create_policy_version_response.py +37 -0
- aws_sdk_iam/types/create_role_request.py +105 -0
- aws_sdk_iam/types/create_role_response.py +34 -0
- aws_sdk_iam/types/create_saml_provider_request.py +90 -0
- aws_sdk_iam/types/create_saml_provider_response.py +43 -0
- aws_sdk_iam/types/create_service_linked_role_request.py +51 -0
- aws_sdk_iam/types/create_service_linked_role_response.py +33 -0
- aws_sdk_iam/types/create_service_specific_credential_request.py +56 -0
- aws_sdk_iam/types/create_service_specific_credential_response.py +45 -0
- aws_sdk_iam/types/create_user_request.py +63 -0
- aws_sdk_iam/types/create_user_response.py +33 -0
- aws_sdk_iam/types/create_virtual_mfa_device_request.py +59 -0
- aws_sdk_iam/types/create_virtual_mfa_device_response.py +42 -0
- aws_sdk_iam/types/credential_age_days.py +5 -0
- aws_sdk_iam/types/credential_report_expired_exception_message.py +5 -0
- aws_sdk_iam/types/credential_report_not_present_exception_message.py +5 -0
- aws_sdk_iam/types/credential_report_not_ready_exception_message.py +5 -0
- aws_sdk_iam/types/custom_suffix_type.py +5 -0
- aws_sdk_iam/types/date_type.py +24 -0
- aws_sdk_iam/types/deactivate_mfa_device_request.py +41 -0
- aws_sdk_iam/types/delegation_permission.py +49 -0
- aws_sdk_iam/types/delegation_request.py +249 -0
- aws_sdk_iam/types/delegation_request_description_type.py +5 -0
- aws_sdk_iam/types/delegation_request_id_type.py +5 -0
- aws_sdk_iam/types/delegation_requests_list_type.py +52 -0
- aws_sdk_iam/types/delete_access_key_request.py +41 -0
- aws_sdk_iam/types/delete_account_alias_request.py +30 -0
- aws_sdk_iam/types/delete_conflict_message.py +5 -0
- aws_sdk_iam/types/delete_group_policy_request.py +39 -0
- aws_sdk_iam/types/delete_group_request.py +30 -0
- aws_sdk_iam/types/delete_instance_profile_request.py +34 -0
- aws_sdk_iam/types/delete_login_profile_request.py +29 -0
- aws_sdk_iam/types/delete_open_id_connect_provider_request.py +39 -0
- aws_sdk_iam/types/delete_policy_request.py +30 -0
- aws_sdk_iam/types/delete_policy_version_request.py +39 -0
- aws_sdk_iam/types/delete_role_permissions_boundary_request.py +34 -0
- aws_sdk_iam/types/delete_role_policy_request.py +39 -0
- aws_sdk_iam/types/delete_role_request.py +30 -0
- aws_sdk_iam/types/delete_saml_provider_request.py +32 -0
- aws_sdk_iam/types/delete_server_certificate_request.py +36 -0
- aws_sdk_iam/types/delete_service_linked_role_request.py +30 -0
- aws_sdk_iam/types/delete_service_linked_role_response.py +32 -0
- aws_sdk_iam/types/delete_service_specific_credential_request.py +52 -0
- aws_sdk_iam/types/delete_signing_certificate_request.py +43 -0
- aws_sdk_iam/types/delete_ssh_public_key_request.py +41 -0
- aws_sdk_iam/types/delete_user_permissions_boundary_request.py +34 -0
- aws_sdk_iam/types/delete_user_policy_request.py +39 -0
- aws_sdk_iam/types/delete_user_request.py +30 -0
- aws_sdk_iam/types/delete_virtual_mfa_device_request.py +32 -0
- aws_sdk_iam/types/deletion_task_failure_reason_type.py +49 -0
- aws_sdk_iam/types/deletion_task_id_type.py +5 -0
- aws_sdk_iam/types/deletion_task_status_type.py +43 -0
- aws_sdk_iam/types/detach_group_policy_request.py +39 -0
- aws_sdk_iam/types/detach_role_policy_request.py +39 -0
- aws_sdk_iam/types/detach_user_policy_request.py +39 -0
- aws_sdk_iam/types/disable_organizations_root_credentials_management_request.py +24 -0
- aws_sdk_iam/types/disable_organizations_root_credentials_management_response.py +55 -0
- aws_sdk_iam/types/disable_organizations_root_sessions_request.py +22 -0
- aws_sdk_iam/types/disable_organizations_root_sessions_response.py +53 -0
- aws_sdk_iam/types/duplicate_certificate_message.py +5 -0
- aws_sdk_iam/types/duplicate_ssh_public_key_message.py +5 -0
- aws_sdk_iam/types/enable_mfa_device_request.py +64 -0
- aws_sdk_iam/types/enable_organizations_root_credentials_management_request.py +24 -0
- aws_sdk_iam/types/enable_organizations_root_credentials_management_response.py +55 -0
- aws_sdk_iam/types/enable_organizations_root_sessions_request.py +22 -0
- aws_sdk_iam/types/enable_organizations_root_sessions_response.py +53 -0
- aws_sdk_iam/types/enable_outbound_web_identity_federation_response.py +31 -0
- aws_sdk_iam/types/encoding_type.py +39 -0
- aws_sdk_iam/types/entity_already_exists_message.py +5 -0
- aws_sdk_iam/types/entity_details.py +55 -0
- aws_sdk_iam/types/entity_details_list_type.py +50 -0
- aws_sdk_iam/types/entity_info.py +73 -0
- aws_sdk_iam/types/entity_list_type.py +48 -0
- aws_sdk_iam/types/entity_name_type.py +5 -0
- aws_sdk_iam/types/entity_temporarily_unmodifiable_message.py +5 -0
- aws_sdk_iam/types/entity_type.py +45 -0
- aws_sdk_iam/types/error_details.py +38 -0
- aws_sdk_iam/types/eval_decision_details_type.py +76 -0
- aws_sdk_iam/types/eval_decision_source_type.py +5 -0
- aws_sdk_iam/types/evaluation_result.py +190 -0
- aws_sdk_iam/types/evaluation_results_list_type.py +52 -0
- aws_sdk_iam/types/exception_message.py +5 -0
- aws_sdk_iam/types/existing_user_name_type.py +5 -0
- aws_sdk_iam/types/feature_disabled_message.py +5 -0
- aws_sdk_iam/types/feature_enabled_message.py +5 -0
- aws_sdk_iam/types/feature_type.py +39 -0
- aws_sdk_iam/types/features_list_type.py +48 -0
- aws_sdk_iam/types/generate_credential_report_response.py +47 -0
- aws_sdk_iam/types/generate_organizations_access_report_request.py +49 -0
- aws_sdk_iam/types/generate_organizations_access_report_response.py +31 -0
- aws_sdk_iam/types/generate_service_last_accessed_details_request.py +55 -0
- aws_sdk_iam/types/generate_service_last_accessed_details_response.py +31 -0
- aws_sdk_iam/types/get_access_key_last_used_request.py +30 -0
- aws_sdk_iam/types/get_access_key_last_used_response.py +51 -0
- aws_sdk_iam/types/get_account_authorization_details_request.py +55 -0
- aws_sdk_iam/types/get_account_authorization_details_response.py +125 -0
- aws_sdk_iam/types/get_account_password_policy_response.py +40 -0
- aws_sdk_iam/types/get_account_summary_response.py +37 -0
- aws_sdk_iam/types/get_context_keys_for_custom_policy_request.py +46 -0
- aws_sdk_iam/types/get_context_keys_for_policy_response.py +41 -0
- aws_sdk_iam/types/get_context_keys_for_principal_policy_request.py +55 -0
- aws_sdk_iam/types/get_credential_report_response.py +69 -0
- aws_sdk_iam/types/get_delegation_request_request.py +50 -0
- aws_sdk_iam/types/get_delegation_request_response.py +81 -0
- aws_sdk_iam/types/get_group_policy_request.py +39 -0
- aws_sdk_iam/types/get_group_policy_response.py +48 -0
- aws_sdk_iam/types/get_group_request.py +47 -0
- aws_sdk_iam/types/get_group_response.py +72 -0
- aws_sdk_iam/types/get_human_readable_summary_request.py +39 -0
- aws_sdk_iam/types/get_human_readable_summary_response.py +55 -0
- aws_sdk_iam/types/get_instance_profile_request.py +34 -0
- aws_sdk_iam/types/get_instance_profile_response.py +40 -0
- aws_sdk_iam/types/get_login_profile_request.py +29 -0
- aws_sdk_iam/types/get_login_profile_response.py +38 -0
- aws_sdk_iam/types/get_mfa_device_request.py +39 -0
- aws_sdk_iam/types/get_mfa_device_response.py +75 -0
- aws_sdk_iam/types/get_open_id_connect_provider_request.py +39 -0
- aws_sdk_iam/types/get_open_id_connect_provider_response.py +99 -0
- aws_sdk_iam/types/get_organizations_access_report_request.py +67 -0
- aws_sdk_iam/types/get_organizations_access_report_response.py +163 -0
- aws_sdk_iam/types/get_outbound_web_identity_federation_info_response.py +47 -0
- aws_sdk_iam/types/get_policy_request.py +30 -0
- aws_sdk_iam/types/get_policy_response.py +35 -0
- aws_sdk_iam/types/get_policy_version_request.py +39 -0
- aws_sdk_iam/types/get_policy_version_response.py +37 -0
- aws_sdk_iam/types/get_role_policy_request.py +39 -0
- aws_sdk_iam/types/get_role_policy_response.py +48 -0
- aws_sdk_iam/types/get_role_request.py +30 -0
- aws_sdk_iam/types/get_role_response.py +34 -0
- aws_sdk_iam/types/get_saml_provider_request.py +30 -0
- aws_sdk_iam/types/get_saml_provider_response.py +126 -0
- aws_sdk_iam/types/get_server_certificate_request.py +36 -0
- aws_sdk_iam/types/get_server_certificate_response.py +42 -0
- aws_sdk_iam/types/get_service_last_accessed_details_request.py +51 -0
- aws_sdk_iam/types/get_service_last_accessed_details_response.py +159 -0
- aws_sdk_iam/types/get_service_last_accessed_details_with_entities_request.py +62 -0
- aws_sdk_iam/types/get_service_last_accessed_details_with_entities_response.py +139 -0
- aws_sdk_iam/types/get_service_linked_role_deletion_status_request.py +34 -0
- aws_sdk_iam/types/get_service_linked_role_deletion_status_response.py +63 -0
- aws_sdk_iam/types/get_ssh_public_key_request.py +56 -0
- aws_sdk_iam/types/get_ssh_public_key_response.py +37 -0
- aws_sdk_iam/types/get_user_policy_request.py +39 -0
- aws_sdk_iam/types/get_user_policy_response.py +48 -0
- aws_sdk_iam/types/get_user_request.py +31 -0
- aws_sdk_iam/types/get_user_response.py +34 -0
- aws_sdk_iam/types/global_endpoint_token_version.py +41 -0
- aws_sdk_iam/types/group.py +72 -0
- aws_sdk_iam/types/group_detail.py +110 -0
- aws_sdk_iam/types/group_detail_list_type.py +48 -0
- aws_sdk_iam/types/group_list_type.py +46 -0
- aws_sdk_iam/types/group_name_list_type.py +38 -0
- aws_sdk_iam/types/group_name_type.py +5 -0
- aws_sdk_iam/types/id_type.py +5 -0
- aws_sdk_iam/types/instance_profile.py +106 -0
- aws_sdk_iam/types/instance_profile_list_type.py +50 -0
- aws_sdk_iam/types/instance_profile_name_type.py +5 -0
- aws_sdk_iam/types/integer_type.py +5 -0
- aws_sdk_iam/types/invalid_authentication_code_message.py +5 -0
- aws_sdk_iam/types/invalid_certificate_message.py +5 -0
- aws_sdk_iam/types/invalid_input_message.py +5 -0
- aws_sdk_iam/types/invalid_public_key_message.py +5 -0
- aws_sdk_iam/types/invalid_user_type_message.py +5 -0
- aws_sdk_iam/types/job_id_type.py +5 -0
- aws_sdk_iam/types/job_status_type.py +41 -0
- aws_sdk_iam/types/key_pair_mismatch_message.py +5 -0
- aws_sdk_iam/types/limit_exceeded_message.py +5 -0
- aws_sdk_iam/types/line_number.py +7 -0
- aws_sdk_iam/types/list_access_keys_request.py +47 -0
- aws_sdk_iam/types/list_access_keys_response.py +67 -0
- aws_sdk_iam/types/list_account_aliases_request.py +37 -0
- aws_sdk_iam/types/list_account_aliases_response.py +65 -0
- aws_sdk_iam/types/list_attached_group_policies_request.py +57 -0
- aws_sdk_iam/types/list_attached_group_policies_response.py +63 -0
- aws_sdk_iam/types/list_attached_role_policies_request.py +55 -0
- aws_sdk_iam/types/list_attached_role_policies_response.py +63 -0
- aws_sdk_iam/types/list_attached_user_policies_request.py +55 -0
- aws_sdk_iam/types/list_attached_user_policies_response.py +63 -0
- aws_sdk_iam/types/list_delegation_requests_request.py +45 -0
- aws_sdk_iam/types/list_delegation_requests_response.py +63 -0
- aws_sdk_iam/types/list_entities_for_policy_request.py +91 -0
- aws_sdk_iam/types/list_entities_for_policy_response.py +99 -0
- aws_sdk_iam/types/list_group_policies_request.py +47 -0
- aws_sdk_iam/types/list_group_policies_response.py +61 -0
- aws_sdk_iam/types/list_groups_for_user_request.py +47 -0
- aws_sdk_iam/types/list_groups_for_user_response.py +61 -0
- aws_sdk_iam/types/list_groups_request.py +45 -0
- aws_sdk_iam/types/list_groups_response.py +61 -0
- aws_sdk_iam/types/list_instance_profile_tags_request.py +51 -0
- aws_sdk_iam/types/list_instance_profile_tags_response.py +59 -0
- aws_sdk_iam/types/list_instance_profiles_for_role_request.py +49 -0
- aws_sdk_iam/types/list_instance_profiles_for_role_response.py +69 -0
- aws_sdk_iam/types/list_instance_profiles_request.py +45 -0
- aws_sdk_iam/types/list_instance_profiles_response.py +67 -0
- aws_sdk_iam/types/list_mfa_device_tags_request.py +47 -0
- aws_sdk_iam/types/list_mfa_device_tags_response.py +59 -0
- aws_sdk_iam/types/list_mfa_devices_request.py +47 -0
- aws_sdk_iam/types/list_mfa_devices_response.py +61 -0
- aws_sdk_iam/types/list_open_id_connect_provider_tags_request.py +58 -0
- aws_sdk_iam/types/list_open_id_connect_provider_tags_response.py +63 -0
- aws_sdk_iam/types/list_open_id_connect_providers_request.py +20 -0
- aws_sdk_iam/types/list_open_id_connect_providers_response.py +43 -0
- aws_sdk_iam/types/list_organizations_features_request.py +20 -0
- aws_sdk_iam/types/list_organizations_features_response.py +51 -0
- aws_sdk_iam/types/list_policies_granting_service_access_entry.py +53 -0
- aws_sdk_iam/types/list_policies_granting_service_access_request.py +66 -0
- aws_sdk_iam/types/list_policies_granting_service_access_response.py +69 -0
- aws_sdk_iam/types/list_policies_request.py +95 -0
- aws_sdk_iam/types/list_policies_response.py +59 -0
- aws_sdk_iam/types/list_policy_granting_service_access_response_list_type.py +66 -0
- aws_sdk_iam/types/list_policy_tags_request.py +47 -0
- aws_sdk_iam/types/list_policy_tags_response.py +59 -0
- aws_sdk_iam/types/list_policy_versions_request.py +47 -0
- aws_sdk_iam/types/list_policy_versions_response.py +63 -0
- aws_sdk_iam/types/list_role_policies_request.py +47 -0
- aws_sdk_iam/types/list_role_policies_response.py +61 -0
- aws_sdk_iam/types/list_role_tags_request.py +47 -0
- aws_sdk_iam/types/list_role_tags_response.py +59 -0
- aws_sdk_iam/types/list_roles_request.py +45 -0
- aws_sdk_iam/types/list_roles_response.py +59 -0
- aws_sdk_iam/types/list_saml_provider_tags_request.py +49 -0
- aws_sdk_iam/types/list_saml_provider_tags_response.py +59 -0
- aws_sdk_iam/types/list_saml_providers_request.py +20 -0
- aws_sdk_iam/types/list_saml_providers_response.py +41 -0
- aws_sdk_iam/types/list_server_certificate_tags_request.py +53 -0
- aws_sdk_iam/types/list_server_certificate_tags_response.py +59 -0
- aws_sdk_iam/types/list_server_certificates_request.py +45 -0
- aws_sdk_iam/types/list_server_certificates_response.py +67 -0
- aws_sdk_iam/types/list_service_specific_credentials_request.py +63 -0
- aws_sdk_iam/types/list_service_specific_credentials_response.py +67 -0
- aws_sdk_iam/types/list_signing_certificates_request.py +47 -0
- aws_sdk_iam/types/list_signing_certificates_response.py +63 -0
- aws_sdk_iam/types/list_ssh_public_keys_request.py +45 -0
- aws_sdk_iam/types/list_ssh_public_keys_response.py +63 -0
- aws_sdk_iam/types/list_user_policies_request.py +47 -0
- aws_sdk_iam/types/list_user_policies_response.py +61 -0
- aws_sdk_iam/types/list_user_tags_request.py +47 -0
- aws_sdk_iam/types/list_user_tags_response.py +59 -0
- aws_sdk_iam/types/list_users_request.py +45 -0
- aws_sdk_iam/types/list_users_response.py +59 -0
- aws_sdk_iam/types/list_virtual_mfa_devices_request.py +57 -0
- aws_sdk_iam/types/list_virtual_mfa_devices_response.py +67 -0
- aws_sdk_iam/types/locale_type.py +5 -0
- aws_sdk_iam/types/login_profile.py +63 -0
- aws_sdk_iam/types/malformed_certificate_message.py +5 -0
- aws_sdk_iam/types/malformed_policy_document_message.py +5 -0
- aws_sdk_iam/types/managed_policy_detail.py +163 -0
- aws_sdk_iam/types/managed_policy_detail_list_type.py +52 -0
- aws_sdk_iam/types/marker_type.py +5 -0
- aws_sdk_iam/types/max_items_type.py +5 -0
- aws_sdk_iam/types/max_password_age_type.py +5 -0
- aws_sdk_iam/types/mfa_device.py +56 -0
- aws_sdk_iam/types/mfa_device_list_type.py +48 -0
- aws_sdk_iam/types/minimum_password_length_type.py +5 -0
- aws_sdk_iam/types/no_such_entity_message.py +5 -0
- aws_sdk_iam/types/notes_type.py +5 -0
- aws_sdk_iam/types/notification_channel_type.py +5 -0
- aws_sdk_iam/types/open_id_connect_provider_list_entry.py +28 -0
- aws_sdk_iam/types/open_id_connect_provider_list_type.py +60 -0
- aws_sdk_iam/types/open_id_connect_provider_url_type.py +6 -0
- aws_sdk_iam/types/open_id_idp_communication_error_exception_message.py +5 -0
- aws_sdk_iam/types/organization_id_type.py +5 -0
- aws_sdk_iam/types/organizations_decision_detail.py +36 -0
- aws_sdk_iam/types/organizations_entity_path_type.py +5 -0
- aws_sdk_iam/types/organizations_policy_id_type.py +5 -0
- aws_sdk_iam/types/owner_id_type.py +5 -0
- aws_sdk_iam/types/password_policy.py +155 -0
- aws_sdk_iam/types/password_policy_violation_message.py +5 -0
- aws_sdk_iam/types/password_reuse_prevention_type.py +5 -0
- aws_sdk_iam/types/password_type.py +5 -0
- aws_sdk_iam/types/path_prefix_type.py +5 -0
- aws_sdk_iam/types/path_type.py +5 -0
- aws_sdk_iam/types/permission_check_result_type.py +41 -0
- aws_sdk_iam/types/permission_check_status_type.py +41 -0
- aws_sdk_iam/types/permission_type.py +5 -0
- aws_sdk_iam/types/permissions_boundary_attachment_type.py +33 -0
- aws_sdk_iam/types/permissions_boundary_decision_detail.py +36 -0
- aws_sdk_iam/types/policy.py +155 -0
- aws_sdk_iam/types/policy_description_type.py +5 -0
- aws_sdk_iam/types/policy_detail.py +39 -0
- aws_sdk_iam/types/policy_detail_list_type.py +48 -0
- aws_sdk_iam/types/policy_document_type.py +5 -0
- aws_sdk_iam/types/policy_document_version_list_type.py +50 -0
- aws_sdk_iam/types/policy_evaluation_decision_type.py +43 -0
- aws_sdk_iam/types/policy_evaluation_error_message.py +5 -0
- aws_sdk_iam/types/policy_granting_service_access.py +83 -0
- aws_sdk_iam/types/policy_granting_service_access_list_type.py +62 -0
- aws_sdk_iam/types/policy_group.py +37 -0
- aws_sdk_iam/types/policy_group_list_type.py +48 -0
- aws_sdk_iam/types/policy_identifier_type.py +5 -0
- aws_sdk_iam/types/policy_list_type.py +46 -0
- aws_sdk_iam/types/policy_name_list_type.py +40 -0
- aws_sdk_iam/types/policy_name_type.py +5 -0
- aws_sdk_iam/types/policy_not_attachable_message.py +5 -0
- aws_sdk_iam/types/policy_owner_entity_type.py +41 -0
- aws_sdk_iam/types/policy_parameter.py +69 -0
- aws_sdk_iam/types/policy_parameter_list_type.py +50 -0
- aws_sdk_iam/types/policy_parameter_name_type.py +5 -0
- aws_sdk_iam/types/policy_parameter_type_enum.py +39 -0
- aws_sdk_iam/types/policy_parameter_value_type.py +5 -0
- aws_sdk_iam/types/policy_parameter_values_list_type.py +40 -0
- aws_sdk_iam/types/policy_path_type.py +5 -0
- aws_sdk_iam/types/policy_role.py +37 -0
- aws_sdk_iam/types/policy_role_list_type.py +48 -0
- aws_sdk_iam/types/policy_scope_type.py +41 -0
- aws_sdk_iam/types/policy_source_type.py +49 -0
- aws_sdk_iam/types/policy_type.py +39 -0
- aws_sdk_iam/types/policy_usage_type.py +40 -0
- aws_sdk_iam/types/policy_user.py +37 -0
- aws_sdk_iam/types/policy_user_list_type.py +48 -0
- aws_sdk_iam/types/policy_version.py +71 -0
- aws_sdk_iam/types/policy_version_id_type.py +5 -0
- aws_sdk_iam/types/position.py +36 -0
- aws_sdk_iam/types/private_key_id_type.py +5 -0
- aws_sdk_iam/types/private_key_list.py +48 -0
- aws_sdk_iam/types/private_key_type.py +5 -0
- aws_sdk_iam/types/public_key_fingerprint_type.py +5 -0
- aws_sdk_iam/types/public_key_id_type.py +5 -0
- aws_sdk_iam/types/public_key_material_type.py +5 -0
- aws_sdk_iam/types/put_group_policy_request.py +48 -0
- aws_sdk_iam/types/put_role_permissions_boundary_request.py +43 -0
- aws_sdk_iam/types/put_role_policy_request.py +48 -0
- aws_sdk_iam/types/put_user_permissions_boundary_request.py +43 -0
- aws_sdk_iam/types/put_user_policy_request.py +48 -0
- aws_sdk_iam/types/reason_type.py +5 -0
- aws_sdk_iam/types/redirect_url_type.py +5 -0
- aws_sdk_iam/types/region_name_type.py +5 -0
- aws_sdk_iam/types/reject_delegation_request_request.py +43 -0
- aws_sdk_iam/types/remove_client_id_from_open_id_connect_provider_request.py +52 -0
- aws_sdk_iam/types/remove_role_from_instance_profile_request.py +47 -0
- aws_sdk_iam/types/remove_user_from_group_request.py +39 -0
- aws_sdk_iam/types/report_content_type.py +26 -0
- aws_sdk_iam/types/report_format_type.py +31 -0
- aws_sdk_iam/types/report_generation_limit_exceeded_message.py +5 -0
- aws_sdk_iam/types/report_state_description_type.py +5 -0
- aws_sdk_iam/types/report_state_type.py +41 -0
- aws_sdk_iam/types/request_message_type.py +5 -0
- aws_sdk_iam/types/requestor_name_type.py +5 -0
- aws_sdk_iam/types/requestor_workflow_id_type.py +5 -0
- aws_sdk_iam/types/reset_service_specific_credential_request.py +52 -0
- aws_sdk_iam/types/reset_service_specific_credential_response.py +45 -0
- aws_sdk_iam/types/resource_handling_option_type.py +5 -0
- aws_sdk_iam/types/resource_name_list_type.py +40 -0
- aws_sdk_iam/types/resource_name_type.py +5 -0
- aws_sdk_iam/types/resource_specific_result.py +138 -0
- aws_sdk_iam/types/resource_specific_result_list_type.py +52 -0
- aws_sdk_iam/types/response_marker_type.py +5 -0
- aws_sdk_iam/types/resync_mfa_device_request.py +64 -0
- aws_sdk_iam/types/role.py +162 -0
- aws_sdk_iam/types/role_description_type.py +5 -0
- aws_sdk_iam/types/role_detail.py +197 -0
- aws_sdk_iam/types/role_detail_list_type.py +48 -0
- aws_sdk_iam/types/role_last_used.py +45 -0
- aws_sdk_iam/types/role_list_type.py +46 -0
- aws_sdk_iam/types/role_max_session_duration_type.py +5 -0
- aws_sdk_iam/types/role_name_type.py +5 -0
- aws_sdk_iam/types/role_permission_restriction_arn_list_type.py +46 -0
- aws_sdk_iam/types/role_usage_list_type.py +48 -0
- aws_sdk_iam/types/role_usage_type.py +45 -0
- aws_sdk_iam/types/saml_metadata_document_type.py +5 -0
- aws_sdk_iam/types/saml_private_key.py +45 -0
- aws_sdk_iam/types/saml_provider_list_entry.py +60 -0
- aws_sdk_iam/types/saml_provider_list_type.py +52 -0
- aws_sdk_iam/types/saml_provider_name_type.py +5 -0
- aws_sdk_iam/types/send_delegation_token_request.py +34 -0
- aws_sdk_iam/types/serial_number_type.py +5 -0
- aws_sdk_iam/types/server_certificate.py +80 -0
- aws_sdk_iam/types/server_certificate_metadata.py +97 -0
- aws_sdk_iam/types/server_certificate_metadata_list_type.py +58 -0
- aws_sdk_iam/types/server_certificate_name_type.py +5 -0
- aws_sdk_iam/types/service_credential_alias.py +5 -0
- aws_sdk_iam/types/service_credential_secret.py +5 -0
- aws_sdk_iam/types/service_failure_exception_message.py +5 -0
- aws_sdk_iam/types/service_last_accessed.py +125 -0
- aws_sdk_iam/types/service_name.py +5 -0
- aws_sdk_iam/types/service_name_type.py +5 -0
- aws_sdk_iam/types/service_namespace_list_type.py +40 -0
- aws_sdk_iam/types/service_namespace_type.py +5 -0
- aws_sdk_iam/types/service_not_supported_message.py +5 -0
- aws_sdk_iam/types/service_password.py +5 -0
- aws_sdk_iam/types/service_specific_credential.py +154 -0
- aws_sdk_iam/types/service_specific_credential_id.py +5 -0
- aws_sdk_iam/types/service_specific_credential_metadata.py +134 -0
- aws_sdk_iam/types/service_specific_credentials_list_type.py +62 -0
- aws_sdk_iam/types/service_user_name.py +5 -0
- aws_sdk_iam/types/services_last_accessed.py +52 -0
- aws_sdk_iam/types/session_duration_type.py +5 -0
- aws_sdk_iam/types/set_default_policy_version_request.py +39 -0
- aws_sdk_iam/types/set_security_token_service_preferences_request.py +48 -0
- aws_sdk_iam/types/signing_certificate.py +80 -0
- aws_sdk_iam/types/simulate_custom_policy_request.py +178 -0
- aws_sdk_iam/types/simulate_policy_response.py +63 -0
- aws_sdk_iam/types/simulate_principal_policy_request.py +188 -0
- aws_sdk_iam/types/simulation_policy_list_type.py +40 -0
- aws_sdk_iam/types/sort_key_type.py +43 -0
- aws_sdk_iam/types/ssh_public_key.py +93 -0
- aws_sdk_iam/types/ssh_public_key_list_type.py +52 -0
- aws_sdk_iam/types/ssh_public_key_metadata.py +71 -0
- aws_sdk_iam/types/state_type.py +49 -0
- aws_sdk_iam/types/statement.py +82 -0
- aws_sdk_iam/types/statement_list_type.py +46 -0
- aws_sdk_iam/types/status_type.py +41 -0
- aws_sdk_iam/types/string_type.py +5 -0
- aws_sdk_iam/types/summary_content_type.py +5 -0
- aws_sdk_iam/types/summary_key_type.py +103 -0
- aws_sdk_iam/types/summary_map_type.py +71 -0
- aws_sdk_iam/types/summary_state_type.py +43 -0
- aws_sdk_iam/types/summary_value_type.py +5 -0
- aws_sdk_iam/types/tag.py +37 -0
- aws_sdk_iam/types/tag_instance_profile_request.py +49 -0
- aws_sdk_iam/types/tag_key_list_type.py +38 -0
- aws_sdk_iam/types/tag_key_type.py +5 -0
- aws_sdk_iam/types/tag_list_type.py +46 -0
- aws_sdk_iam/types/tag_mfa_device_request.py +45 -0
- aws_sdk_iam/types/tag_open_id_connect_provider_request.py +54 -0
- aws_sdk_iam/types/tag_policy_request.py +45 -0
- aws_sdk_iam/types/tag_role_request.py +45 -0
- aws_sdk_iam/types/tag_saml_provider_request.py +45 -0
- aws_sdk_iam/types/tag_server_certificate_request.py +51 -0
- aws_sdk_iam/types/tag_user_request.py +45 -0
- aws_sdk_iam/types/tag_value_type.py +5 -0
- aws_sdk_iam/types/thumbprint_list_type.py +38 -0
- aws_sdk_iam/types/thumbprint_type.py +6 -0
- aws_sdk_iam/types/tracked_action_last_accessed.py +63 -0
- aws_sdk_iam/types/tracked_actions_last_accessed.py +56 -0
- aws_sdk_iam/types/unmodifiable_entity_message.py +5 -0
- aws_sdk_iam/types/unrecognized_public_key_encoding_message.py +5 -0
- aws_sdk_iam/types/untag_instance_profile_request.py +51 -0
- aws_sdk_iam/types/untag_mfa_device_request.py +47 -0
- aws_sdk_iam/types/untag_open_id_connect_provider_request.py +58 -0
- aws_sdk_iam/types/untag_policy_request.py +47 -0
- aws_sdk_iam/types/untag_role_request.py +47 -0
- aws_sdk_iam/types/untag_saml_provider_request.py +49 -0
- aws_sdk_iam/types/untag_server_certificate_request.py +53 -0
- aws_sdk_iam/types/untag_user_request.py +47 -0
- aws_sdk_iam/types/update_access_key_request.py +56 -0
- aws_sdk_iam/types/update_account_password_policy_request.py +142 -0
- aws_sdk_iam/types/update_assume_role_policy_request.py +41 -0
- aws_sdk_iam/types/update_delegation_request_request.py +43 -0
- aws_sdk_iam/types/update_group_request.py +46 -0
- aws_sdk_iam/types/update_login_profile_request.py +56 -0
- aws_sdk_iam/types/update_open_id_connect_provider_thumbprint_request.py +62 -0
- aws_sdk_iam/types/update_role_description_request.py +39 -0
- aws_sdk_iam/types/update_role_description_response.py +33 -0
- aws_sdk_iam/types/update_role_request.py +53 -0
- aws_sdk_iam/types/update_role_response.py +20 -0
- aws_sdk_iam/types/update_saml_provider_request.py +85 -0
- aws_sdk_iam/types/update_saml_provider_response.py +29 -0
- aws_sdk_iam/types/update_server_certificate_request.py +61 -0
- aws_sdk_iam/types/update_service_specific_credential_request.py +69 -0
- aws_sdk_iam/types/update_signing_certificate_request.py +58 -0
- aws_sdk_iam/types/update_ssh_public_key_request.py +56 -0
- aws_sdk_iam/types/update_user_request.py +47 -0
- aws_sdk_iam/types/upload_server_certificate_request.py +91 -0
- aws_sdk_iam/types/upload_server_certificate_response.py +57 -0
- aws_sdk_iam/types/upload_signing_certificate_request.py +43 -0
- aws_sdk_iam/types/upload_signing_certificate_response.py +40 -0
- aws_sdk_iam/types/upload_ssh_public_key_request.py +43 -0
- aws_sdk_iam/types/upload_ssh_public_key_response.py +37 -0
- aws_sdk_iam/types/user.py +122 -0
- aws_sdk_iam/types/user_detail.py +160 -0
- aws_sdk_iam/types/user_detail_list_type.py +48 -0
- aws_sdk_iam/types/user_list_type.py +46 -0
- aws_sdk_iam/types/user_name_type.py +5 -0
- aws_sdk_iam/types/virtual_mfa_device.py +104 -0
- aws_sdk_iam/types/virtual_mfa_device_list_type.py +52 -0
- aws_sdk_iam/types/virtual_mfa_device_name.py +5 -0
- aws_sdk_iam-0.2.0.dist-info/METADATA +111 -0
- aws_sdk_iam-0.2.0.dist-info/RECORD +774 -0
- aws_sdk_iam-0.2.0.dist-info/WHEEL +5 -0
- aws_sdk_iam-0.2.0.dist-info/licenses/LICENSE +21 -0
- aws_sdk_iam-0.2.0.dist-info/top_level.txt +1 -0
aws_sdk_iam/__init__.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from ._auth._identity import Identity as Identity, Credentials as Credentials
|
|
3
|
+
from ._auth._providers import (
|
|
4
|
+
IdentityNotFound as IdentityNotFound,
|
|
5
|
+
IdentityProvider as IdentityProvider,
|
|
6
|
+
ChainedProvider as ChainedProvider,
|
|
7
|
+
CachedProvider as CachedProvider,
|
|
8
|
+
CredentialsProvider as CredentialsProvider,
|
|
9
|
+
StaticAwsCredentialsProvider as StaticAwsCredentialsProvider,
|
|
10
|
+
EnvCredentialsProvider as EnvCredentialsProvider,
|
|
11
|
+
ProfileCredentialsProvider as ProfileCredentialsProvider,
|
|
12
|
+
)
|
|
13
|
+
from ._auth._signers import Signer as Signer, SigV4Signer as SigV4Signer
|
|
14
|
+
from ._services.iam import IAMClient as IAMClient
|
|
15
|
+
from ._services.async_iam import AsyncIAMClient as AsyncIAMClient
|
aws_sdk_iam/_async.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
from typing import TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
import trio
|
|
8
|
+
else:
|
|
9
|
+
try:
|
|
10
|
+
import trio
|
|
11
|
+
except ImportError:
|
|
12
|
+
trio = None
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def in_trio_run() -> bool:
|
|
16
|
+
if trio is None:
|
|
17
|
+
return False
|
|
18
|
+
return trio.lowlevel.in_trio_run()
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
async def anysleep(delay: float) -> None:
|
|
22
|
+
if in_trio_run():
|
|
23
|
+
await trio.sleep(delay)
|
|
24
|
+
else:
|
|
25
|
+
await asyncio.sleep(delay)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from typing import TypedDict
|
|
5
|
+
from typing_extensions import NotRequired
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Identity(TypedDict):
|
|
9
|
+
expiration: NotRequired[datetime | None]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Credentials(Identity):
|
|
13
|
+
access_key: str
|
|
14
|
+
secret_key: str
|
|
15
|
+
session_token: NotRequired[str | None]
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import configparser
|
|
4
|
+
import os
|
|
5
|
+
from abc import abstractmethod
|
|
6
|
+
from datetime import datetime, timezone
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Generic, TypeVar
|
|
9
|
+
|
|
10
|
+
from aws_sdk_iam._auth._identity import (
|
|
11
|
+
Credentials,
|
|
12
|
+
Identity,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class IdentityNotFound(Exception):
|
|
17
|
+
"""Raised when a provider cannot resolve an identity. Chain continues."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
IdentityT = TypeVar("IdentityT", bound="Identity")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class IdentityProvider(Generic[IdentityT]):
|
|
24
|
+
@abstractmethod
|
|
25
|
+
def resolve_identity(self) -> IdentityT:
|
|
26
|
+
raise NotImplementedError
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ChainedProvider(IdentityProvider[IdentityT]):
|
|
30
|
+
"""Try each provider in order; first non-`IdentityNotFound` wins."""
|
|
31
|
+
|
|
32
|
+
def __init__(self, *providers: IdentityProvider[IdentityT]) -> None:
|
|
33
|
+
if not providers:
|
|
34
|
+
raise ValueError("ChainedProvider requires at least one provider")
|
|
35
|
+
self._providers = providers
|
|
36
|
+
|
|
37
|
+
def resolve_identity(self) -> IdentityT:
|
|
38
|
+
errors: list[str] = []
|
|
39
|
+
for p in self._providers:
|
|
40
|
+
try:
|
|
41
|
+
return p.resolve_identity()
|
|
42
|
+
except IdentityNotFound as e:
|
|
43
|
+
errors.append(f"{type(p).__name__}: {e}")
|
|
44
|
+
raise IdentityNotFound("no provider succeeded: " + "; ".join(errors))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class CachedProvider(IdentityProvider[IdentityT]):
|
|
48
|
+
"""Cache an identity until its `expiration` (minus skew) elapses."""
|
|
49
|
+
|
|
50
|
+
_SKEW_SECONDS = 60
|
|
51
|
+
|
|
52
|
+
def __init__(self, inner: IdentityProvider[IdentityT]) -> None:
|
|
53
|
+
self._inner = inner
|
|
54
|
+
self._cached: IdentityT | None = None
|
|
55
|
+
|
|
56
|
+
def resolve_identity(self) -> IdentityT:
|
|
57
|
+
if self._cached is not None and not self._expired(self._cached):
|
|
58
|
+
return self._cached
|
|
59
|
+
self._cached = self._inner.resolve_identity()
|
|
60
|
+
return self._cached
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def _expired(cls, ident: Identity) -> bool:
|
|
64
|
+
exp = ident.get("expiration")
|
|
65
|
+
if exp is None:
|
|
66
|
+
return False
|
|
67
|
+
return (exp - datetime.now(timezone.utc)).total_seconds() <= cls._SKEW_SECONDS
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class CredentialsProvider(IdentityProvider[Credentials]):
|
|
71
|
+
"""Base class for providers that resolve AWS `Credentials`."""
|
|
72
|
+
|
|
73
|
+
@abstractmethod
|
|
74
|
+
def resolve_identity(self) -> Credentials:
|
|
75
|
+
raise NotImplementedError
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class StaticAwsCredentialsProvider(CredentialsProvider):
|
|
79
|
+
def __init__(self, credentials: Credentials) -> None:
|
|
80
|
+
self._credentials = credentials
|
|
81
|
+
|
|
82
|
+
def resolve_identity(self) -> Credentials:
|
|
83
|
+
return self._credentials
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class EnvCredentialsProvider(CredentialsProvider):
|
|
87
|
+
"""Read AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKEN."""
|
|
88
|
+
|
|
89
|
+
def resolve_identity(self) -> Credentials:
|
|
90
|
+
ak = os.environ.get("AWS_ACCESS_KEY_ID")
|
|
91
|
+
sk = os.environ.get("AWS_SECRET_ACCESS_KEY")
|
|
92
|
+
if not ak or not sk:
|
|
93
|
+
raise IdentityNotFound("AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY unset")
|
|
94
|
+
out: Credentials = {"access_key": ak, "secret_key": sk}
|
|
95
|
+
token = os.environ.get("AWS_SESSION_TOKEN")
|
|
96
|
+
if token:
|
|
97
|
+
out["session_token"] = token
|
|
98
|
+
return out
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class ProfileCredentialsProvider(CredentialsProvider):
|
|
102
|
+
"""Read ~/.aws/credentials and ~/.aws/config for the active profile."""
|
|
103
|
+
|
|
104
|
+
def __init__(
|
|
105
|
+
self,
|
|
106
|
+
profile: str | None = None,
|
|
107
|
+
credentials_file: Path | None = None,
|
|
108
|
+
config_file: Path | None = None,
|
|
109
|
+
) -> None:
|
|
110
|
+
self._profile = profile or os.environ.get("AWS_PROFILE", "default")
|
|
111
|
+
self._cred_file = credentials_file or Path(
|
|
112
|
+
os.environ.get("AWS_SHARED_CREDENTIALS_FILE")
|
|
113
|
+
or Path.home() / ".aws" / "credentials"
|
|
114
|
+
)
|
|
115
|
+
self._cfg_file = config_file or Path(
|
|
116
|
+
os.environ.get("AWS_CONFIG_FILE") or Path.home() / ".aws" / "config"
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
def resolve_identity(self) -> Credentials:
|
|
120
|
+
section = self._load_profile()
|
|
121
|
+
ak = section.get("aws_access_key_id")
|
|
122
|
+
sk = section.get("aws_secret_access_key")
|
|
123
|
+
if not ak or not sk:
|
|
124
|
+
raise IdentityNotFound(
|
|
125
|
+
f"profile {self._profile!r}: missing aws_access_key_id/aws_secret_access_key"
|
|
126
|
+
)
|
|
127
|
+
out: Credentials = {"access_key": ak, "secret_key": sk}
|
|
128
|
+
token = section.get("aws_session_token")
|
|
129
|
+
if token:
|
|
130
|
+
out["session_token"] = token
|
|
131
|
+
return out
|
|
132
|
+
|
|
133
|
+
def _load_profile(self) -> dict[str, str]:
|
|
134
|
+
merged: dict[str, str] = {}
|
|
135
|
+
if self._cfg_file.is_file():
|
|
136
|
+
cfg = configparser.ConfigParser()
|
|
137
|
+
cfg.read(self._cfg_file)
|
|
138
|
+
# config file profiles look like `[profile foo]`, except default
|
|
139
|
+
key = (
|
|
140
|
+
"default" if self._profile == "default" else f"profile {self._profile}"
|
|
141
|
+
)
|
|
142
|
+
if cfg.has_section(key):
|
|
143
|
+
merged.update(dict(cfg.items(key)))
|
|
144
|
+
if self._cred_file.is_file():
|
|
145
|
+
cfg = configparser.ConfigParser()
|
|
146
|
+
cfg.read(self._cred_file)
|
|
147
|
+
if cfg.has_section(self._profile):
|
|
148
|
+
merged.update(dict(cfg.items(self._profile)))
|
|
149
|
+
if not merged:
|
|
150
|
+
raise IdentityNotFound(
|
|
151
|
+
f"profile {self._profile!r} not found in {self._cred_file} or {self._cfg_file}"
|
|
152
|
+
)
|
|
153
|
+
return merged
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def default_aws_credentials_chain() -> IdentityProvider[Credentials]:
|
|
157
|
+
return CachedProvider(
|
|
158
|
+
ChainedProvider(EnvCredentialsProvider(), ProfileCredentialsProvider())
|
|
159
|
+
)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from abc import ABC, abstractmethod
|
|
4
|
+
from typing import Generic, TypeVar
|
|
5
|
+
from typing import Any
|
|
6
|
+
from zapros import Request
|
|
7
|
+
from aws_sdk_iam._auth._sigv4 import SigV4AuthContext, sign_sigv4
|
|
8
|
+
from aws_sdk_iam._auth._identity import Credentials, Identity
|
|
9
|
+
from aws_sdk_iam._auth._providers import IdentityProvider
|
|
10
|
+
|
|
11
|
+
IdentityT = TypeVar("IdentityT", bound="Identity")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Signer(ABC, Generic[IdentityT]):
|
|
15
|
+
"""Per-request request signer. Holds an IdentityProvider plus static config."""
|
|
16
|
+
|
|
17
|
+
def __init__(self, provider: IdentityProvider[IdentityT]) -> None:
|
|
18
|
+
self.provider = provider
|
|
19
|
+
|
|
20
|
+
@abstractmethod
|
|
21
|
+
async def asign(self, req: Request) -> Request: ...
|
|
22
|
+
@abstractmethod
|
|
23
|
+
def sign(self, req: Request) -> Request: ...
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class SigV4Signer(Signer[Credentials]):
|
|
27
|
+
"""aws.auth#sigv4 — AWS Signature Version 4.
|
|
28
|
+
|
|
29
|
+
The full auth scheme (``name`` variant, ``signingName``, ``signingRegion``,
|
|
30
|
+
encoding/normalization flags) is provided by the caller — either from the
|
|
31
|
+
endpoint rule-set's ``authSchemes`` property or built by the generated
|
|
32
|
+
``get_signer`` from operation defaults.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def __init__(
|
|
36
|
+
self, provider: IdentityProvider[Credentials], *, auth_scheme: dict[str, Any]
|
|
37
|
+
) -> None:
|
|
38
|
+
super().__init__(provider)
|
|
39
|
+
self._auth_scheme = auth_scheme
|
|
40
|
+
|
|
41
|
+
async def asign(self, req: Request) -> Request:
|
|
42
|
+
creds = self.provider.resolve_identity()
|
|
43
|
+
ctx: SigV4AuthContext = {
|
|
44
|
+
"type": "sig_v4",
|
|
45
|
+
"access_key_id": creds["access_key"],
|
|
46
|
+
"secret_access_key": creds["secret_key"],
|
|
47
|
+
"session_token": creds.get("session_token"),
|
|
48
|
+
"signing_region": self._auth_scheme["signingRegion"],
|
|
49
|
+
"signing_name": self._auth_scheme["signingName"],
|
|
50
|
+
}
|
|
51
|
+
if req.body is None:
|
|
52
|
+
body: bytes | None = b""
|
|
53
|
+
elif isinstance(req.body, bytes):
|
|
54
|
+
body = req.body
|
|
55
|
+
else:
|
|
56
|
+
body = None
|
|
57
|
+
# Strip Accept-Encoding so transports/intermediaries can't transcode
|
|
58
|
+
# the response and so the value never enters the canonical request.
|
|
59
|
+
if "accept-encoding" in req.headers:
|
|
60
|
+
del req.headers["Accept-Encoding"]
|
|
61
|
+
return sign_sigv4(req, ctx, body)
|
|
62
|
+
|
|
63
|
+
def sign(self, req: Request) -> Request:
|
|
64
|
+
creds = self.provider.resolve_identity()
|
|
65
|
+
ctx: SigV4AuthContext = {
|
|
66
|
+
"type": "sig_v4",
|
|
67
|
+
"access_key_id": creds["access_key"],
|
|
68
|
+
"secret_access_key": creds["secret_key"],
|
|
69
|
+
"session_token": creds.get("session_token"),
|
|
70
|
+
"signing_region": self._auth_scheme["signingRegion"],
|
|
71
|
+
"signing_name": self._auth_scheme["signingName"],
|
|
72
|
+
}
|
|
73
|
+
if req.body is None:
|
|
74
|
+
body: bytes | None = b""
|
|
75
|
+
elif isinstance(req.body, bytes):
|
|
76
|
+
body = req.body
|
|
77
|
+
else:
|
|
78
|
+
body = None
|
|
79
|
+
# Strip Accept-Encoding so transports/intermediaries can't transcode
|
|
80
|
+
# the response and so the value never enters the canonical request.
|
|
81
|
+
if "accept-encoding" in req.headers:
|
|
82
|
+
del req.headers["Accept-Encoding"]
|
|
83
|
+
return sign_sigv4(req, ctx, body)
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
"""AWS Signature Version 4 — single-chunk signing.
|
|
2
|
+
|
|
3
|
+
Reference:
|
|
4
|
+
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-create-signed-request.html
|
|
5
|
+
|
|
6
|
+
Verified byte-for-byte against ``botocore.auth.S3SigV4Auth`` / ``SigV4Auth``
|
|
7
|
+
across S3 GET/PUT/POST, query-string, session-token, and non-S3 (IAM)
|
|
8
|
+
canonicalization paths.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import datetime as _dt
|
|
14
|
+
import hashlib
|
|
15
|
+
import hmac
|
|
16
|
+
import re
|
|
17
|
+
from typing import Literal, TypedDict
|
|
18
|
+
from urllib.parse import quote, unquote
|
|
19
|
+
|
|
20
|
+
from pywhatwgurl import URLSearchParams
|
|
21
|
+
from zapros import Headers, Request
|
|
22
|
+
import zapros
|
|
23
|
+
from zapros._utils import get_host_header_value
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class SigV4AuthContext(TypedDict):
|
|
27
|
+
type: Literal["sig_v4"]
|
|
28
|
+
access_key_id: str
|
|
29
|
+
secret_access_key: str
|
|
30
|
+
session_token: str | None
|
|
31
|
+
signing_region: str
|
|
32
|
+
signing_name: str
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
_SIGV4_ALGORITHM = "AWS4-HMAC-SHA256"
|
|
36
|
+
_EMPTY_PAYLOAD_SHA256 = hashlib.sha256(b"").hexdigest()
|
|
37
|
+
|
|
38
|
+
# Headers excluded from the signed-headers set. Mirrors botocore's denylist:
|
|
39
|
+
# these are hop-by-hop / mutable in transit, so signing them would break
|
|
40
|
+
# proxies or duplicate values already added by the transport layer.
|
|
41
|
+
_UNSIGNED_HEADERS = frozenset(
|
|
42
|
+
{
|
|
43
|
+
"authorization",
|
|
44
|
+
"cache-control",
|
|
45
|
+
"connection",
|
|
46
|
+
"expect",
|
|
47
|
+
"from",
|
|
48
|
+
"keep-alive",
|
|
49
|
+
"max-forwards",
|
|
50
|
+
"pragma",
|
|
51
|
+
"referer",
|
|
52
|
+
"te",
|
|
53
|
+
"trailer",
|
|
54
|
+
"transfer-encoding",
|
|
55
|
+
"upgrade",
|
|
56
|
+
"user-agent",
|
|
57
|
+
"x-amzn-trace-id",
|
|
58
|
+
"content-length",
|
|
59
|
+
"accept",
|
|
60
|
+
"accept-encoding",
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
_MULTI_SPACE = re.compile(r" +")
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def _uri_encode(value: str) -> str:
|
|
68
|
+
"""RFC 3986 percent-encoding using only the unreserved set as safe."""
|
|
69
|
+
return quote(value, safe="-_.~")
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def _canonical_path(path: str, *, service: str) -> str:
|
|
73
|
+
"""Build CanonicalURI.
|
|
74
|
+
|
|
75
|
+
Per the SigV4 spec, every segment is URI-encoded; for services other
|
|
76
|
+
than S3 each segment is URI-encoded **twice**. S3 keeps the path
|
|
77
|
+
exactly as provided (no normalization, no double-encoding).
|
|
78
|
+
"""
|
|
79
|
+
if not path:
|
|
80
|
+
return "/"
|
|
81
|
+
if service == "s3":
|
|
82
|
+
return path if path.startswith("/") else "/" + path
|
|
83
|
+
decoded = unquote(path)
|
|
84
|
+
first = quote(decoded, safe="/~")
|
|
85
|
+
return quote(first, safe="/~")
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def _canonical_query(query: str) -> str:
|
|
89
|
+
"""Build CanonicalQueryString from a raw query string (with or without ``?``)."""
|
|
90
|
+
if not query:
|
|
91
|
+
return ""
|
|
92
|
+
if query.startswith("?"):
|
|
93
|
+
query = query[1:]
|
|
94
|
+
if not query:
|
|
95
|
+
return ""
|
|
96
|
+
sp = URLSearchParams(query)
|
|
97
|
+
encoded = sorted((_uri_encode(k), _uri_encode(v)) for k, v in sp.entries())
|
|
98
|
+
return "&".join(f"{k}={v}" for k, v in encoded)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def _trim_header_value(value: str) -> str:
|
|
102
|
+
"""Trim leading/trailing whitespace and collapse internal whitespace runs.
|
|
103
|
+
|
|
104
|
+
Spec note: the canonical form treats sequential whitespace inside an
|
|
105
|
+
unquoted value as a single space. We do not parse quoted-string syntax;
|
|
106
|
+
the conservative collapse is correct for every header AWS actually signs.
|
|
107
|
+
"""
|
|
108
|
+
return _MULTI_SPACE.sub(" ", value.strip())
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def _canonical_headers(headers: Headers) -> tuple[str, str]:
|
|
112
|
+
"""Return ``(canonical_headers, signed_headers)``."""
|
|
113
|
+
grouped: dict[str, list[str]] = {}
|
|
114
|
+
for name in headers:
|
|
115
|
+
lname = name.lower()
|
|
116
|
+
if lname in _UNSIGNED_HEADERS:
|
|
117
|
+
continue
|
|
118
|
+
grouped[lname] = [_trim_header_value(v) for v in headers.getall(name)]
|
|
119
|
+
|
|
120
|
+
signed = sorted(grouped)
|
|
121
|
+
canonical = "".join(f"{name}:{','.join(grouped[name])}\n" for name in signed)
|
|
122
|
+
return canonical, ";".join(signed)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def _build_canonical_request(
|
|
126
|
+
*,
|
|
127
|
+
method: str,
|
|
128
|
+
path: str,
|
|
129
|
+
query: str,
|
|
130
|
+
headers: Headers,
|
|
131
|
+
payload_hash: str,
|
|
132
|
+
service: str,
|
|
133
|
+
) -> tuple[str, str]:
|
|
134
|
+
canonical_uri = _canonical_path(path, service=service)
|
|
135
|
+
canonical_query = _canonical_query(query)
|
|
136
|
+
canonical_headers, signed_headers = _canonical_headers(headers)
|
|
137
|
+
canonical_request = (
|
|
138
|
+
f"{method}\n"
|
|
139
|
+
f"{canonical_uri}\n"
|
|
140
|
+
f"{canonical_query}\n"
|
|
141
|
+
f"{canonical_headers}\n"
|
|
142
|
+
f"{signed_headers}\n"
|
|
143
|
+
f"{payload_hash}"
|
|
144
|
+
)
|
|
145
|
+
return canonical_request, signed_headers
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def _derive_signing_key(secret: str, date: str, region: str, service: str) -> bytes:
|
|
149
|
+
k_date = hmac.new(
|
|
150
|
+
b"AWS4" + secret.encode("utf-8"), date.encode("ascii"), hashlib.sha256
|
|
151
|
+
).digest()
|
|
152
|
+
k_region = hmac.new(k_date, region.encode("utf-8"), hashlib.sha256).digest()
|
|
153
|
+
k_service = hmac.new(k_region, service.encode("utf-8"), hashlib.sha256).digest()
|
|
154
|
+
return hmac.new(k_service, b"aws4_request", hashlib.sha256).digest()
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def _amz_now() -> _dt.datetime:
|
|
158
|
+
return _dt.datetime.now(_dt.timezone.utc)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
def _canonical_query_from_pairs(pairs: list[tuple[str, str]]) -> str:
|
|
162
|
+
"""CanonicalQueryString from raw (unencoded) key/value pairs."""
|
|
163
|
+
encoded = sorted((_uri_encode(k), _uri_encode(v)) for k, v in pairs)
|
|
164
|
+
return "&".join(f"{k}={v}" for k, v in encoded)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def sign_sigv4(
|
|
168
|
+
request: Request,
|
|
169
|
+
ctx: SigV4AuthContext,
|
|
170
|
+
body: bytes | None,
|
|
171
|
+
) -> Request:
|
|
172
|
+
"""Return a new ``Request`` carrying SigV4 single-chunk auth headers.
|
|
173
|
+
|
|
174
|
+
Pass ``body=None`` to sign with ``UNSIGNED-PAYLOAD`` (streaming requests).
|
|
175
|
+
The original ``request.body`` is forwarded unchanged in that case.
|
|
176
|
+
"""
|
|
177
|
+
service = ctx["signing_name"]
|
|
178
|
+
region = ctx["signing_region"]
|
|
179
|
+
|
|
180
|
+
headers = request.headers.copy()
|
|
181
|
+
|
|
182
|
+
# X-Amz-Date — honor caller-supplied value (allows deterministic tests).
|
|
183
|
+
existing_date = headers.get("X-Amz-Date")
|
|
184
|
+
if existing_date:
|
|
185
|
+
amz_date = existing_date
|
|
186
|
+
date_stamp = amz_date[:8]
|
|
187
|
+
else:
|
|
188
|
+
now = _amz_now()
|
|
189
|
+
amz_date = now.strftime("%Y%m%dT%H%M%SZ")
|
|
190
|
+
date_stamp = now.strftime("%Y%m%d")
|
|
191
|
+
headers["X-Amz-Date"] = amz_date
|
|
192
|
+
|
|
193
|
+
# Payload hash. For S3, x-amz-content-sha256 is mandatory and must be set
|
|
194
|
+
# BEFORE computing the canonical request (it gets signed).
|
|
195
|
+
payload_hash = headers.get("X-Amz-Content-SHA256")
|
|
196
|
+
if payload_hash is None:
|
|
197
|
+
if body is None:
|
|
198
|
+
payload_hash = "UNSIGNED-PAYLOAD"
|
|
199
|
+
else:
|
|
200
|
+
payload_hash = (
|
|
201
|
+
hashlib.sha256(body).hexdigest() if body else _EMPTY_PAYLOAD_SHA256
|
|
202
|
+
)
|
|
203
|
+
if service == "s3":
|
|
204
|
+
headers["X-Amz-Content-SHA256"] = payload_hash
|
|
205
|
+
|
|
206
|
+
# Session token (STS / assumed-role credentials).
|
|
207
|
+
session_token = ctx.get("session_token")
|
|
208
|
+
if session_token:
|
|
209
|
+
headers["X-Amz-Security-Token"] = session_token
|
|
210
|
+
|
|
211
|
+
# Host header is added by Request.__init__ from the URL; defensive fallback.
|
|
212
|
+
if "host" not in headers and request.url.hostname:
|
|
213
|
+
headers["Host"] = get_host_header_value(request.url)
|
|
214
|
+
|
|
215
|
+
canonical_request, signed_headers = _build_canonical_request(
|
|
216
|
+
method=request.method.upper(),
|
|
217
|
+
path=request.url.pathname,
|
|
218
|
+
query=request.url.search,
|
|
219
|
+
headers=headers,
|
|
220
|
+
payload_hash=payload_hash,
|
|
221
|
+
service=service,
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
credential_scope = f"{date_stamp}/{region}/{service}/aws4_request"
|
|
225
|
+
string_to_sign = (
|
|
226
|
+
f"{_SIGV4_ALGORITHM}\n"
|
|
227
|
+
f"{amz_date}\n"
|
|
228
|
+
f"{credential_scope}\n"
|
|
229
|
+
f"{hashlib.sha256(canonical_request.encode('utf-8')).hexdigest()}"
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
signing_key = _derive_signing_key(
|
|
233
|
+
ctx["secret_access_key"], date_stamp, region, service
|
|
234
|
+
)
|
|
235
|
+
signature = hmac.new(
|
|
236
|
+
signing_key, string_to_sign.encode("utf-8"), hashlib.sha256
|
|
237
|
+
).hexdigest()
|
|
238
|
+
|
|
239
|
+
headers["Authorization"] = (
|
|
240
|
+
f"{_SIGV4_ALGORITHM} "
|
|
241
|
+
f"Credential={ctx['access_key_id']}/{credential_scope},"
|
|
242
|
+
f"SignedHeaders={signed_headers},"
|
|
243
|
+
f"Signature={signature}"
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
effective_body = body if body is not None else request.body
|
|
247
|
+
if effective_body is not None:
|
|
248
|
+
return Request(
|
|
249
|
+
request.url,
|
|
250
|
+
request.method,
|
|
251
|
+
headers,
|
|
252
|
+
body=effective_body,
|
|
253
|
+
context=request.context,
|
|
254
|
+
)
|
|
255
|
+
return Request(request.url, request.method, headers, context=request.context)
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
def presign_sigv4(
|
|
259
|
+
request: Request,
|
|
260
|
+
ctx: SigV4AuthContext,
|
|
261
|
+
*,
|
|
262
|
+
expires_in: int = 3600,
|
|
263
|
+
now: _dt.datetime | None = None,
|
|
264
|
+
) -> Request:
|
|
265
|
+
"""Return a new ``Request`` whose URL carries SigV4 query-string auth.
|
|
266
|
+
|
|
267
|
+
The signature travels in the URL (``X-Amz-*`` query params), so the result
|
|
268
|
+
is usable standalone (browser, curl). Payload is signed as
|
|
269
|
+
``UNSIGNED-PAYLOAD``, so the body is not bound by the signature.
|
|
270
|
+
|
|
271
|
+
``expires_in`` is the validity window in seconds; range 1..604800 (7 days),
|
|
272
|
+
bounded by the max lifetime of the derived signing key.
|
|
273
|
+
"""
|
|
274
|
+
if not 1 <= expires_in <= 604800:
|
|
275
|
+
raise ValueError(f"expires_in must be in [1, 604800], got {expires_in}")
|
|
276
|
+
|
|
277
|
+
sign_time = now or _amz_now()
|
|
278
|
+
if sign_time.tzinfo is None:
|
|
279
|
+
raise ValueError("now must be timezone-aware (UTC)")
|
|
280
|
+
|
|
281
|
+
service = ctx["signing_name"]
|
|
282
|
+
region = ctx["signing_region"]
|
|
283
|
+
|
|
284
|
+
amz_date = sign_time.strftime("%Y%m%dT%H%M%SZ")
|
|
285
|
+
date_stamp = sign_time.strftime("%Y%m%d")
|
|
286
|
+
credential_scope = f"{date_stamp}/{region}/{service}/aws4_request"
|
|
287
|
+
|
|
288
|
+
# Canonical headers: host is mandatory; anything else already on the request
|
|
289
|
+
# is signed too (and must then be sent alongside the URL). Strip the headers
|
|
290
|
+
# that belong in the query string to avoid header/query value conflicts
|
|
291
|
+
# (which AWS rejects as InvalidRequest).
|
|
292
|
+
headers = request.headers.copy()
|
|
293
|
+
for h in (
|
|
294
|
+
"Authorization",
|
|
295
|
+
"X-Amz-Date",
|
|
296
|
+
"X-Amz-Content-SHA256",
|
|
297
|
+
"X-Amz-Security-Token",
|
|
298
|
+
):
|
|
299
|
+
if h in headers:
|
|
300
|
+
del headers[h]
|
|
301
|
+
if "host" not in headers and request.url.hostname:
|
|
302
|
+
headers["Host"] = get_host_header_value(request.url)
|
|
303
|
+
|
|
304
|
+
canonical_headers, signed_headers = _canonical_headers(headers)
|
|
305
|
+
|
|
306
|
+
# Signed query params (raw values). X-Amz-Signature is appended afterwards.
|
|
307
|
+
amz_params: list[tuple[str, str]] = [
|
|
308
|
+
("X-Amz-Algorithm", _SIGV4_ALGORITHM),
|
|
309
|
+
("X-Amz-Credential", f"{ctx['access_key_id']}/{credential_scope}"),
|
|
310
|
+
("X-Amz-Date", amz_date),
|
|
311
|
+
("X-Amz-Expires", str(expires_in)),
|
|
312
|
+
("X-Amz-SignedHeaders", signed_headers),
|
|
313
|
+
]
|
|
314
|
+
session_token = ctx.get("session_token")
|
|
315
|
+
if session_token:
|
|
316
|
+
# S3 and most services require the token inside the canonical query.
|
|
317
|
+
# (A few — e.g. iotdevicegateway — want it appended post-signature
|
|
318
|
+
# instead; handle those as a special case if you ever target them.)
|
|
319
|
+
amz_params.append(("X-Amz-Security-Token", session_token))
|
|
320
|
+
|
|
321
|
+
existing = list(URLSearchParams(request.url.search).entries())
|
|
322
|
+
canonical_query = _canonical_query_from_pairs(existing + amz_params)
|
|
323
|
+
|
|
324
|
+
canonical_request = (
|
|
325
|
+
f"{request.method.upper()}\n"
|
|
326
|
+
f"{_canonical_path(request.url.pathname, service=service)}\n"
|
|
327
|
+
f"{canonical_query}\n"
|
|
328
|
+
f"{canonical_headers}\n"
|
|
329
|
+
f"{signed_headers}\n"
|
|
330
|
+
f"UNSIGNED-PAYLOAD"
|
|
331
|
+
)
|
|
332
|
+
|
|
333
|
+
string_to_sign = (
|
|
334
|
+
f"{_SIGV4_ALGORITHM}\n"
|
|
335
|
+
f"{amz_date}\n"
|
|
336
|
+
f"{credential_scope}\n"
|
|
337
|
+
f"{hashlib.sha256(canonical_request.encode('utf-8')).hexdigest()}"
|
|
338
|
+
)
|
|
339
|
+
signing_key = _derive_signing_key(
|
|
340
|
+
ctx["secret_access_key"], date_stamp, region, service
|
|
341
|
+
)
|
|
342
|
+
signature = hmac.new(
|
|
343
|
+
signing_key, string_to_sign.encode("utf-8"), hashlib.sha256
|
|
344
|
+
).hexdigest()
|
|
345
|
+
|
|
346
|
+
# X-Amz-Signature is hex (no encoding needed) and is NOT part of the
|
|
347
|
+
# canonical query. The sorted canonical query doubles as the URL query.
|
|
348
|
+
final_query = f"{canonical_query}&X-Amz-Signature={signature}"
|
|
349
|
+
|
|
350
|
+
url = request.url
|
|
351
|
+
fragment = url.hash or ""
|
|
352
|
+
presigned_href = zapros.URL(
|
|
353
|
+
f"{url.protocol}//{url.host}{url.pathname}?{final_query}{fragment}"
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
if request.body is not None:
|
|
357
|
+
return Request(
|
|
358
|
+
presigned_href,
|
|
359
|
+
request.method,
|
|
360
|
+
headers,
|
|
361
|
+
body=request.body,
|
|
362
|
+
context=request.context,
|
|
363
|
+
)
|
|
364
|
+
return Request(presigned_href, request.method, headers, context=request.context)
|