lib/aws-sdk-iam/client.rb in aws-sdk-iam-1.34.0 vs lib/aws-sdk-iam/client.rb in aws-sdk-iam-1.35.0

- old
+ new

@@ -30,15 +30,15 @@ Aws::Plugins::GlobalConfiguration.add_identifier(:iam) module Aws::IAM # An API client for IAM. To construct a client, you need to configure a `:region` and `:credentials`. # - # client = Aws::IAM::Client.new( - # region: region_name, - # credentials: credentials, - # # ... - # ) + # client = Aws::IAM::Client.new( + # region: region_name, + # credentials: credentials, + # # ... + # ) # # For details on configuring region and credentials see # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html). # # See {#initialize} for a full list of supported configuration options. @@ -227,20 +227,24 @@ # used by the default backoff function. This option is only used in the # `legacy` retry mode. # # @option options [String] :retry_mode ("legacy") # Specifies which retry algorithm to use. Values are: - # * `legacy` - The pre-existing retry behavior. This is default value if - # no retry mode is provided. - # * `standard` - A standardized set of retry rules across the AWS SDKs. - # This includes support for retry quotas, which limit the number of - # unsuccessful retries a client can make. - # * `adaptive` - An experimental retry mode that includes all the - # functionality of `standard` mode along with automatic client side - # throttling. This is a provisional mode that may change behavior - # in the future. # + # * `legacy` - The pre-existing retry behavior. This is default value if + # no retry mode is provided. + # + # * `standard` - A standardized set of retry rules across the AWS SDKs. + # This includes support for retry quotas, which limit the number of + # unsuccessful retries a client can make. + # + # * `adaptive` - An experimental retry mode that includes all the + # functionality of `standard` mode along with automatic client side + # throttling. This is a provisional mode that may change behavior + # in the future. + # + # # @option options [String] :secret_access_key # # @option options [String] :session_token # # @option options [Boolean] :stub_responses (false) @@ -263,12 +267,11 @@ # seconds to wait when opening a HTTP session before raising a # `Timeout::Error`. # # @option options [Integer] :http_read_timeout (60) The default # number of seconds to wait for response data. This value can - # safely be set - # per-request on the session yielded by {#session_for}. + # safely be set per-request on the session. # # @option options [Float] :http_idle_timeout (5) The number of # seconds a connection is allowed to sit idle before it is # considered stale. Stale connections are closed and removed # from the pool before making a request. @@ -276,11 +279,11 @@ # @option options [Float] :http_continue_timeout (1) The number of # seconds to wait for a 100-continue response before sending the # request body. This option has no effect unless the request has # "Expect" header set to "100-continue". Defaults to `nil` which # disables this behaviour. This value can safely be set per - # request on the session yielded by {#session_for}. + # request on the session. # # @option options [Boolean] :http_wire_trace (false) When `true`, # HTTP debug output will be sent to the `:logger`. # # @option options [Boolean] :ssl_verify_peer (true) When `true`, @@ -3762,10 +3765,14 @@ # groups, roles, or policies to list every AWS service that the # resource could access using permissions policies. For each service, # the response includes information about the most recent access # attempt. # + # The `JobId` returned by `GenerateServiceLastAccessedDetail` must be + # used by the same role within a session, or by the same user when + # used to call `GetServiceLastAccessedDetail`. + # # * GetServiceLastAccessedDetailsWithEntities – Use this operation for # groups and policies to list information about the associated # entities (users or roles) that attempted to access a specific AWS # service. # @@ -3936,10 +3943,12 @@ # * {Types::GetAccountAuthorizationDetailsResponse#role_detail_list #role_detail_list} => Array<Types::RoleDetail> # * {Types::GetAccountAuthorizationDetailsResponse#policies #policies} => Array<Types::ManagedPolicyDetail> # * {Types::GetAccountAuthorizationDetailsResponse#is_truncated #is_truncated} => Boolean # * {Types::GetAccountAuthorizationDetailsResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.get_account_authorization_details({ # filter: ["User"], # accepts User, Role, Group, LocalManagedPolicy, AWSManagedPolicy # max_items: 1, @@ -4384,10 +4393,12 @@ # * {Types::GetGroupResponse#group #group} => Types::Group # * {Types::GetGroupResponse#users #users} => Array<Types::User> # * {Types::GetGroupResponse#is_truncated #is_truncated} => Boolean # * {Types::GetGroupResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.get_group({ # group_name: "groupNameType", # required # marker: "markerType", @@ -4584,10 +4595,15 @@ # resp.instance_profile.roles[0].tags[0].key #=> String # resp.instance_profile.roles[0].tags[0].value #=> String # resp.instance_profile.roles[0].role_last_used.last_used_date #=> Time # resp.instance_profile.roles[0].role_last_used.region #=> String # + # + # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage): + # + # * instance_profile_exists + # # @see http://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetInstanceProfile AWS API Documentation # # @overload get_instance_profile(params = {}) # @param [Hash] params ({}) def get_instance_profile(params = {}, options = {}) @@ -4897,10 +4913,15 @@ # resp.policy.is_attachable #=> Boolean # resp.policy.description #=> String # resp.policy.create_date #=> Time # resp.policy.update_date #=> Time # + # + # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage): + # + # * policy_exists + # # @see http://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetPolicy AWS API Documentation # # @overload get_policy(params = {}) # @param [Hash] params ({}) def get_policy(params = {}, options = {}) @@ -5069,10 +5090,15 @@ # resp.role.tags[0].key #=> String # resp.role.tags[0].value #=> String # resp.role.role_last_used.last_used_date #=> Time # resp.role.role_last_used.region #=> String # + # + # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage): + # + # * role_exists + # # @see http://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetRole AWS API Documentation # # @overload get_role(params = {}) # @param [Hash] params ({}) def get_role(params = {}, options = {}) @@ -5382,11 +5408,14 @@ # # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics # # @option params [required, String] :job_id # The ID of the request generated by the - # GenerateServiceLastAccessedDetails operation. + # GenerateServiceLastAccessedDetails operation. The `JobId` returned by + # `GenerateServiceLastAccessedDetail` must be used by the same role + # within a session, or by the same user when used to call + # `GetServiceLastAccessedDetail`. # # @option params [Integer] :max_items # Use this only when paginating results to indicate the maximum number # of items you want in the response. If additional items exist beyond # the maximum you specify, the `IsTruncated` response element is `true`. @@ -5728,10 +5757,15 @@ # resp.user.permissions_boundary.permissions_boundary_arn #=> String # resp.user.tags #=> Array # resp.user.tags[0].key #=> String # resp.user.tags[0].value #=> String # + # + # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage): + # + # * user_exists + # # @see http://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetUser AWS API Documentation # # @overload get_user(params = {}) # @param [Hash] params ({}) def get_user(params = {}, options = {}) @@ -5866,11 +5900,13 @@ # # * {Types::ListAccessKeysResponse#access_key_metadata #access_key_metadata} => Array<Types::AccessKeyMetadata> # * {Types::ListAccessKeysResponse#is_truncated #is_truncated} => Boolean # * {Types::ListAccessKeysResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. # + # # @example Example: To list the access key IDs for an IAM user # # # The following command lists the access keys IDs for the IAM user named Alice. # # resp = client.list_access_keys({ @@ -5951,11 +5987,13 @@ # # * {Types::ListAccountAliasesResponse#account_aliases #account_aliases} => Array<String> # * {Types::ListAccountAliasesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListAccountAliasesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. # + # # @example Example: To list account aliases # # # The following command lists the aliases for the current account. # # resp = client.list_account_aliases({ @@ -6059,10 +6097,12 @@ # # * {Types::ListAttachedGroupPoliciesResponse#attached_policies #attached_policies} => Array<Types::AttachedPolicy> # * {Types::ListAttachedGroupPoliciesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListAttachedGroupPoliciesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_attached_group_policies({ # group_name: "groupNameType", # required # path_prefix: "policyPathType", @@ -6155,10 +6195,12 @@ # # * {Types::ListAttachedRolePoliciesResponse#attached_policies #attached_policies} => Array<Types::AttachedPolicy> # * {Types::ListAttachedRolePoliciesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListAttachedRolePoliciesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_attached_role_policies({ # role_name: "roleNameType", # required # path_prefix: "policyPathType", @@ -6251,10 +6293,12 @@ # # * {Types::ListAttachedUserPoliciesResponse#attached_policies #attached_policies} => Array<Types::AttachedPolicy> # * {Types::ListAttachedUserPoliciesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListAttachedUserPoliciesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_attached_user_policies({ # user_name: "userNameType", # required # path_prefix: "policyPathType", @@ -6360,10 +6404,12 @@ # * {Types::ListEntitiesForPolicyResponse#policy_users #policy_users} => Array<Types::PolicyUser> # * {Types::ListEntitiesForPolicyResponse#policy_roles #policy_roles} => Array<Types::PolicyRole> # * {Types::ListEntitiesForPolicyResponse#is_truncated #is_truncated} => Boolean # * {Types::ListEntitiesForPolicyResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_entities_for_policy({ # policy_arn: "arnType", # required # entity_filter: "User", # accepts User, Role, Group, LocalManagedPolicy, AWSManagedPolicy @@ -6445,11 +6491,13 @@ # # * {Types::ListGroupPoliciesResponse#policy_names #policy_names} => Array<String> # * {Types::ListGroupPoliciesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListGroupPoliciesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. # + # # @example Example: To list the in-line policies for an IAM group # # # The following command lists the names of in-line policies that are embedded in the IAM group named Admins. # # resp = client.list_group_policies({ @@ -6531,11 +6579,13 @@ # # * {Types::ListGroupsResponse#groups #groups} => Array<Types::Group> # * {Types::ListGroupsResponse#is_truncated #is_truncated} => Boolean # * {Types::ListGroupsResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. # + # # @example Example: To list the IAM groups for the current account # # # The following command lists the IAM groups in the current account: # # resp = client.list_groups({ @@ -6634,11 +6684,13 @@ # # * {Types::ListGroupsForUserResponse#groups #groups} => Array<Types::Group> # * {Types::ListGroupsForUserResponse#is_truncated #is_truncated} => Boolean # * {Types::ListGroupsForUserResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. # + # # @example Example: To list the groups that an IAM user belongs to # # # The following command displays the groups that the IAM user named Bob belongs to. # # resp = client.list_groups_for_user({ @@ -6744,10 +6796,12 @@ # # * {Types::ListInstanceProfilesResponse#instance_profiles #instance_profiles} => Array<Types::InstanceProfile> # * {Types::ListInstanceProfilesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListInstanceProfilesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_instance_profiles({ # path_prefix: "pathPrefixType", # marker: "markerType", @@ -6835,10 +6889,12 @@ # # * {Types::ListInstanceProfilesForRoleResponse#instance_profiles #instance_profiles} => Array<Types::InstanceProfile> # * {Types::ListInstanceProfilesForRoleResponse#is_truncated #is_truncated} => Boolean # * {Types::ListInstanceProfilesForRoleResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_instance_profiles_for_role({ # role_name: "roleNameType", # required # marker: "markerType", @@ -6923,10 +6979,12 @@ # # * {Types::ListMFADevicesResponse#mfa_devices #mfa_devices} => Array<Types::MFADevice> # * {Types::ListMFADevicesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListMFADevicesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_mfa_devices({ # user_name: "existingUserNameType", # marker: "markerType", @@ -7056,10 +7114,12 @@ # # * {Types::ListPoliciesResponse#policies #policies} => Array<Types::Policy> # * {Types::ListPoliciesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListPoliciesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_policies({ # scope: "All", # accepts All, AWS, Local # only_attached: false, @@ -7291,10 +7351,12 @@ # # * {Types::ListPolicyVersionsResponse#versions #versions} => Array<Types::PolicyVersion> # * {Types::ListPolicyVersionsResponse#is_truncated #is_truncated} => Boolean # * {Types::ListPolicyVersionsResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_policy_versions({ # policy_arn: "arnType", # required # marker: "markerType", @@ -7369,10 +7431,12 @@ # # * {Types::ListRolePoliciesResponse#policy_names #policy_names} => Array<String> # * {Types::ListRolePoliciesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListRolePoliciesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_role_policies({ # role_name: "roleNameType", # required # marker: "markerType", @@ -7537,10 +7601,12 @@ # # * {Types::ListRolesResponse#roles #roles} => Array<Types::Role> # * {Types::ListRolesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListRolesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_roles({ # path_prefix: "pathPrefixType", # marker: "markerType", @@ -7660,10 +7726,12 @@ # # * {Types::ListSSHPublicKeysResponse#ssh_public_keys #ssh_public_keys} => Array<Types::SSHPublicKeyMetadata> # * {Types::ListSSHPublicKeysResponse#is_truncated #is_truncated} => Boolean # * {Types::ListSSHPublicKeysResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_ssh_public_keys({ # user_name: "userNameType", # marker: "markerType", @@ -7743,10 +7811,12 @@ # # * {Types::ListServerCertificatesResponse#server_certificate_metadata_list #server_certificate_metadata_list} => Array<Types::ServerCertificateMetadata> # * {Types::ListServerCertificatesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListServerCertificatesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_server_certificates({ # path_prefix: "pathPrefixType", # marker: "markerType", @@ -7883,11 +7953,13 @@ # # * {Types::ListSigningCertificatesResponse#certificates #certificates} => Array<Types::SigningCertificate> # * {Types::ListSigningCertificatesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListSigningCertificatesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. # + # # @example Example: To list the signing certificates for an IAM user # # # The following command lists the signing certificates for the IAM user named Bob. # # resp = client.list_signing_certificates({ @@ -7984,10 +8056,12 @@ # # * {Types::ListUserPoliciesResponse#policy_names #policy_names} => Array<String> # * {Types::ListUserPoliciesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListUserPoliciesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.list_user_policies({ # user_name: "existingUserNameType", # required # marker: "markerType", @@ -8148,11 +8222,13 @@ # # * {Types::ListUsersResponse#users #users} => Array<Types::User> # * {Types::ListUsersResponse#is_truncated #is_truncated} => Boolean # * {Types::ListUsersResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. # + # # @example Example: To list IAM users # # # The following command lists the IAM users in the current account. # # resp = client.list_users({ @@ -8248,11 +8324,13 @@ # # * {Types::ListVirtualMFADevicesResponse#virtual_mfa_devices #virtual_mfa_devices} => Array<Types::VirtualMFADevice> # * {Types::ListVirtualMFADevicesResponse#is_truncated #is_truncated} => Boolean # * {Types::ListVirtualMFADevicesResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. # + # # @example Example: To list virtual MFA devices # # # The following command lists the virtual MFA devices that have been configured for the current account. # # resp = client.list_virtual_mfa_devices({ @@ -9351,10 +9429,12 @@ # # * {Types::SimulatePolicyResponse#evaluation_results #evaluation_results} => Array<Types::EvaluationResult> # * {Types::SimulatePolicyResponse#is_truncated #is_truncated} => Boolean # * {Types::SimulatePolicyResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.simulate_custom_policy({ # policy_input_list: ["policyDocumentType"], # required # permissions_boundary_policy_input_list: ["policyDocumentType"], @@ -9676,10 +9756,12 @@ # # * {Types::SimulatePolicyResponse#evaluation_results #evaluation_results} => Array<Types::EvaluationResult> # * {Types::SimulatePolicyResponse#is_truncated #is_truncated} => Boolean # * {Types::SimulatePolicyResponse#marker #marker} => String # + # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}. + # # @example Request syntax with placeholder values # # resp = client.simulate_principal_policy({ # policy_source_arn: "arnType", # required # policy_input_list: ["policyDocumentType"], @@ -11449,11 +11531,11 @@ operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-iam' - context[:gem_version] = '1.34.0' + context[:gem_version] = '1.35.0' Seahorse::Client::Request.new(handlers, context) end # Polls an API operation until a resource enters a desired state. # @@ -11515,15 +11597,15 @@ # ## Valid Waiters # # The following table lists the valid waiter names, the operations they call, # and the default `:delay` and `:max_attempts` values. # - # | waiter_name | params | :delay | :max_attempts | - # | ----------------------- | ----------------------- | -------- | ------------- | - # | instance_profile_exists | {#get_instance_profile} | 1 | 40 | - # | policy_exists | {#get_policy} | 1 | 20 | - # | role_exists | {#get_role} | 1 | 20 | - # | user_exists | {#get_user} | 1 | 20 | + # | waiter_name | params | :delay | :max_attempts | + # | ----------------------- | ----------------------------- | -------- | ------------- | + # | instance_profile_exists | {Client#get_instance_profile} | 1 | 40 | + # | policy_exists | {Client#get_policy} | 1 | 20 | + # | role_exists | {Client#get_role} | 1 | 20 | + # | user_exists | {Client#get_user} | 1 | 20 | # # @raise [Errors::FailureStateError] Raised when the waiter terminates # because the waiter has entered a state that it will not transition # out of, preventing success. #