All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.iam.DefaultIamAsyncClient Maven / Gradle / Ivy

/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.iam;

import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ScheduledExecutorService;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.awscore.retry.AwsRetryStrategy;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.AsyncClientHandler;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.retry.RetryMode;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.query.AwsQueryProtocolFactory;
import software.amazon.awssdk.retries.api.RetryStrategy;
import software.amazon.awssdk.services.iam.internal.IamServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.iam.model.AccountNotManagementOrDelegatedAdministratorException;
import software.amazon.awssdk.services.iam.model.AddClientIdToOpenIdConnectProviderRequest;
import software.amazon.awssdk.services.iam.model.AddClientIdToOpenIdConnectProviderResponse;
import software.amazon.awssdk.services.iam.model.AddRoleToInstanceProfileRequest;
import software.amazon.awssdk.services.iam.model.AddRoleToInstanceProfileResponse;
import software.amazon.awssdk.services.iam.model.AddUserToGroupRequest;
import software.amazon.awssdk.services.iam.model.AddUserToGroupResponse;
import software.amazon.awssdk.services.iam.model.AttachGroupPolicyRequest;
import software.amazon.awssdk.services.iam.model.AttachGroupPolicyResponse;
import software.amazon.awssdk.services.iam.model.AttachRolePolicyRequest;
import software.amazon.awssdk.services.iam.model.AttachRolePolicyResponse;
import software.amazon.awssdk.services.iam.model.AttachUserPolicyRequest;
import software.amazon.awssdk.services.iam.model.AttachUserPolicyResponse;
import software.amazon.awssdk.services.iam.model.CallerIsNotManagementAccountException;
import software.amazon.awssdk.services.iam.model.ChangePasswordRequest;
import software.amazon.awssdk.services.iam.model.ChangePasswordResponse;
import software.amazon.awssdk.services.iam.model.ConcurrentModificationException;
import software.amazon.awssdk.services.iam.model.CreateAccessKeyRequest;
import software.amazon.awssdk.services.iam.model.CreateAccessKeyResponse;
import software.amazon.awssdk.services.iam.model.CreateAccountAliasRequest;
import software.amazon.awssdk.services.iam.model.CreateAccountAliasResponse;
import software.amazon.awssdk.services.iam.model.CreateGroupRequest;
import software.amazon.awssdk.services.iam.model.CreateGroupResponse;
import software.amazon.awssdk.services.iam.model.CreateInstanceProfileRequest;
import software.amazon.awssdk.services.iam.model.CreateInstanceProfileResponse;
import software.amazon.awssdk.services.iam.model.CreateLoginProfileRequest;
import software.amazon.awssdk.services.iam.model.CreateLoginProfileResponse;
import software.amazon.awssdk.services.iam.model.CreateOpenIdConnectProviderRequest;
import software.amazon.awssdk.services.iam.model.CreateOpenIdConnectProviderResponse;
import software.amazon.awssdk.services.iam.model.CreatePolicyRequest;
import software.amazon.awssdk.services.iam.model.CreatePolicyResponse;
import software.amazon.awssdk.services.iam.model.CreatePolicyVersionRequest;
import software.amazon.awssdk.services.iam.model.CreatePolicyVersionResponse;
import software.amazon.awssdk.services.iam.model.CreateRoleRequest;
import software.amazon.awssdk.services.iam.model.CreateRoleResponse;
import software.amazon.awssdk.services.iam.model.CreateSamlProviderRequest;
import software.amazon.awssdk.services.iam.model.CreateSamlProviderResponse;
import software.amazon.awssdk.services.iam.model.CreateServiceLinkedRoleRequest;
import software.amazon.awssdk.services.iam.model.CreateServiceLinkedRoleResponse;
import software.amazon.awssdk.services.iam.model.CreateServiceSpecificCredentialRequest;
import software.amazon.awssdk.services.iam.model.CreateServiceSpecificCredentialResponse;
import software.amazon.awssdk.services.iam.model.CreateUserRequest;
import software.amazon.awssdk.services.iam.model.CreateUserResponse;
import software.amazon.awssdk.services.iam.model.CreateVirtualMfaDeviceRequest;
import software.amazon.awssdk.services.iam.model.CreateVirtualMfaDeviceResponse;
import software.amazon.awssdk.services.iam.model.CredentialReportExpiredException;
import software.amazon.awssdk.services.iam.model.CredentialReportNotPresentException;
import software.amazon.awssdk.services.iam.model.CredentialReportNotReadyException;
import software.amazon.awssdk.services.iam.model.DeactivateMfaDeviceRequest;
import software.amazon.awssdk.services.iam.model.DeactivateMfaDeviceResponse;
import software.amazon.awssdk.services.iam.model.DeleteAccessKeyRequest;
import software.amazon.awssdk.services.iam.model.DeleteAccessKeyResponse;
import software.amazon.awssdk.services.iam.model.DeleteAccountAliasRequest;
import software.amazon.awssdk.services.iam.model.DeleteAccountAliasResponse;
import software.amazon.awssdk.services.iam.model.DeleteAccountPasswordPolicyRequest;
import software.amazon.awssdk.services.iam.model.DeleteAccountPasswordPolicyResponse;
import software.amazon.awssdk.services.iam.model.DeleteConflictException;
import software.amazon.awssdk.services.iam.model.DeleteGroupPolicyRequest;
import software.amazon.awssdk.services.iam.model.DeleteGroupPolicyResponse;
import software.amazon.awssdk.services.iam.model.DeleteGroupRequest;
import software.amazon.awssdk.services.iam.model.DeleteGroupResponse;
import software.amazon.awssdk.services.iam.model.DeleteInstanceProfileRequest;
import software.amazon.awssdk.services.iam.model.DeleteInstanceProfileResponse;
import software.amazon.awssdk.services.iam.model.DeleteLoginProfileRequest;
import software.amazon.awssdk.services.iam.model.DeleteLoginProfileResponse;
import software.amazon.awssdk.services.iam.model.DeleteOpenIdConnectProviderRequest;
import software.amazon.awssdk.services.iam.model.DeleteOpenIdConnectProviderResponse;
import software.amazon.awssdk.services.iam.model.DeletePolicyRequest;
import software.amazon.awssdk.services.iam.model.DeletePolicyResponse;
import software.amazon.awssdk.services.iam.model.DeletePolicyVersionRequest;
import software.amazon.awssdk.services.iam.model.DeletePolicyVersionResponse;
import software.amazon.awssdk.services.iam.model.DeleteRolePermissionsBoundaryRequest;
import software.amazon.awssdk.services.iam.model.DeleteRolePermissionsBoundaryResponse;
import software.amazon.awssdk.services.iam.model.DeleteRolePolicyRequest;
import software.amazon.awssdk.services.iam.model.DeleteRolePolicyResponse;
import software.amazon.awssdk.services.iam.model.DeleteRoleRequest;
import software.amazon.awssdk.services.iam.model.DeleteRoleResponse;
import software.amazon.awssdk.services.iam.model.DeleteSamlProviderRequest;
import software.amazon.awssdk.services.iam.model.DeleteSamlProviderResponse;
import software.amazon.awssdk.services.iam.model.DeleteServerCertificateRequest;
import software.amazon.awssdk.services.iam.model.DeleteServerCertificateResponse;
import software.amazon.awssdk.services.iam.model.DeleteServiceLinkedRoleRequest;
import software.amazon.awssdk.services.iam.model.DeleteServiceLinkedRoleResponse;
import software.amazon.awssdk.services.iam.model.DeleteServiceSpecificCredentialRequest;
import software.amazon.awssdk.services.iam.model.DeleteServiceSpecificCredentialResponse;
import software.amazon.awssdk.services.iam.model.DeleteSigningCertificateRequest;
import software.amazon.awssdk.services.iam.model.DeleteSigningCertificateResponse;
import software.amazon.awssdk.services.iam.model.DeleteSshPublicKeyRequest;
import software.amazon.awssdk.services.iam.model.DeleteSshPublicKeyResponse;
import software.amazon.awssdk.services.iam.model.DeleteUserPermissionsBoundaryRequest;
import software.amazon.awssdk.services.iam.model.DeleteUserPermissionsBoundaryResponse;
import software.amazon.awssdk.services.iam.model.DeleteUserPolicyRequest;
import software.amazon.awssdk.services.iam.model.DeleteUserPolicyResponse;
import software.amazon.awssdk.services.iam.model.DeleteUserRequest;
import software.amazon.awssdk.services.iam.model.DeleteUserResponse;
import software.amazon.awssdk.services.iam.model.DeleteVirtualMfaDeviceRequest;
import software.amazon.awssdk.services.iam.model.DeleteVirtualMfaDeviceResponse;
import software.amazon.awssdk.services.iam.model.DetachGroupPolicyRequest;
import software.amazon.awssdk.services.iam.model.DetachGroupPolicyResponse;
import software.amazon.awssdk.services.iam.model.DetachRolePolicyRequest;
import software.amazon.awssdk.services.iam.model.DetachRolePolicyResponse;
import software.amazon.awssdk.services.iam.model.DetachUserPolicyRequest;
import software.amazon.awssdk.services.iam.model.DetachUserPolicyResponse;
import software.amazon.awssdk.services.iam.model.DisableOrganizationsRootCredentialsManagementRequest;
import software.amazon.awssdk.services.iam.model.DisableOrganizationsRootCredentialsManagementResponse;
import software.amazon.awssdk.services.iam.model.DisableOrganizationsRootSessionsRequest;
import software.amazon.awssdk.services.iam.model.DisableOrganizationsRootSessionsResponse;
import software.amazon.awssdk.services.iam.model.DuplicateCertificateException;
import software.amazon.awssdk.services.iam.model.DuplicateSshPublicKeyException;
import software.amazon.awssdk.services.iam.model.EnableMfaDeviceRequest;
import software.amazon.awssdk.services.iam.model.EnableMfaDeviceResponse;
import software.amazon.awssdk.services.iam.model.EnableOrganizationsRootCredentialsManagementRequest;
import software.amazon.awssdk.services.iam.model.EnableOrganizationsRootCredentialsManagementResponse;
import software.amazon.awssdk.services.iam.model.EnableOrganizationsRootSessionsRequest;
import software.amazon.awssdk.services.iam.model.EnableOrganizationsRootSessionsResponse;
import software.amazon.awssdk.services.iam.model.EntityAlreadyExistsException;
import software.amazon.awssdk.services.iam.model.EntityTemporarilyUnmodifiableException;
import software.amazon.awssdk.services.iam.model.GenerateCredentialReportRequest;
import software.amazon.awssdk.services.iam.model.GenerateCredentialReportResponse;
import software.amazon.awssdk.services.iam.model.GenerateOrganizationsAccessReportRequest;
import software.amazon.awssdk.services.iam.model.GenerateOrganizationsAccessReportResponse;
import software.amazon.awssdk.services.iam.model.GenerateServiceLastAccessedDetailsRequest;
import software.amazon.awssdk.services.iam.model.GenerateServiceLastAccessedDetailsResponse;
import software.amazon.awssdk.services.iam.model.GetAccessKeyLastUsedRequest;
import software.amazon.awssdk.services.iam.model.GetAccessKeyLastUsedResponse;
import software.amazon.awssdk.services.iam.model.GetAccountAuthorizationDetailsRequest;
import software.amazon.awssdk.services.iam.model.GetAccountAuthorizationDetailsResponse;
import software.amazon.awssdk.services.iam.model.GetAccountPasswordPolicyRequest;
import software.amazon.awssdk.services.iam.model.GetAccountPasswordPolicyResponse;
import software.amazon.awssdk.services.iam.model.GetAccountSummaryRequest;
import software.amazon.awssdk.services.iam.model.GetAccountSummaryResponse;
import software.amazon.awssdk.services.iam.model.GetContextKeysForCustomPolicyRequest;
import software.amazon.awssdk.services.iam.model.GetContextKeysForCustomPolicyResponse;
import software.amazon.awssdk.services.iam.model.GetContextKeysForPrincipalPolicyRequest;
import software.amazon.awssdk.services.iam.model.GetContextKeysForPrincipalPolicyResponse;
import software.amazon.awssdk.services.iam.model.GetCredentialReportRequest;
import software.amazon.awssdk.services.iam.model.GetCredentialReportResponse;
import software.amazon.awssdk.services.iam.model.GetGroupPolicyRequest;
import software.amazon.awssdk.services.iam.model.GetGroupPolicyResponse;
import software.amazon.awssdk.services.iam.model.GetGroupRequest;
import software.amazon.awssdk.services.iam.model.GetGroupResponse;
import software.amazon.awssdk.services.iam.model.GetInstanceProfileRequest;
import software.amazon.awssdk.services.iam.model.GetInstanceProfileResponse;
import software.amazon.awssdk.services.iam.model.GetLoginProfileRequest;
import software.amazon.awssdk.services.iam.model.GetLoginProfileResponse;
import software.amazon.awssdk.services.iam.model.GetMfaDeviceRequest;
import software.amazon.awssdk.services.iam.model.GetMfaDeviceResponse;
import software.amazon.awssdk.services.iam.model.GetOpenIdConnectProviderRequest;
import software.amazon.awssdk.services.iam.model.GetOpenIdConnectProviderResponse;
import software.amazon.awssdk.services.iam.model.GetOrganizationsAccessReportRequest;
import software.amazon.awssdk.services.iam.model.GetOrganizationsAccessReportResponse;
import software.amazon.awssdk.services.iam.model.GetPolicyRequest;
import software.amazon.awssdk.services.iam.model.GetPolicyResponse;
import software.amazon.awssdk.services.iam.model.GetPolicyVersionRequest;
import software.amazon.awssdk.services.iam.model.GetPolicyVersionResponse;
import software.amazon.awssdk.services.iam.model.GetRolePolicyRequest;
import software.amazon.awssdk.services.iam.model.GetRolePolicyResponse;
import software.amazon.awssdk.services.iam.model.GetRoleRequest;
import software.amazon.awssdk.services.iam.model.GetRoleResponse;
import software.amazon.awssdk.services.iam.model.GetSamlProviderRequest;
import software.amazon.awssdk.services.iam.model.GetSamlProviderResponse;
import software.amazon.awssdk.services.iam.model.GetServerCertificateRequest;
import software.amazon.awssdk.services.iam.model.GetServerCertificateResponse;
import software.amazon.awssdk.services.iam.model.GetServiceLastAccessedDetailsRequest;
import software.amazon.awssdk.services.iam.model.GetServiceLastAccessedDetailsResponse;
import software.amazon.awssdk.services.iam.model.GetServiceLastAccessedDetailsWithEntitiesRequest;
import software.amazon.awssdk.services.iam.model.GetServiceLastAccessedDetailsWithEntitiesResponse;
import software.amazon.awssdk.services.iam.model.GetServiceLinkedRoleDeletionStatusRequest;
import software.amazon.awssdk.services.iam.model.GetServiceLinkedRoleDeletionStatusResponse;
import software.amazon.awssdk.services.iam.model.GetSshPublicKeyRequest;
import software.amazon.awssdk.services.iam.model.GetSshPublicKeyResponse;
import software.amazon.awssdk.services.iam.model.GetUserPolicyRequest;
import software.amazon.awssdk.services.iam.model.GetUserPolicyResponse;
import software.amazon.awssdk.services.iam.model.GetUserRequest;
import software.amazon.awssdk.services.iam.model.GetUserResponse;
import software.amazon.awssdk.services.iam.model.IamException;
import software.amazon.awssdk.services.iam.model.InvalidAuthenticationCodeException;
import software.amazon.awssdk.services.iam.model.InvalidCertificateException;
import software.amazon.awssdk.services.iam.model.InvalidInputException;
import software.amazon.awssdk.services.iam.model.InvalidPublicKeyException;
import software.amazon.awssdk.services.iam.model.InvalidUserTypeException;
import software.amazon.awssdk.services.iam.model.KeyPairMismatchException;
import software.amazon.awssdk.services.iam.model.LimitExceededException;
import software.amazon.awssdk.services.iam.model.ListAccessKeysRequest;
import software.amazon.awssdk.services.iam.model.ListAccessKeysResponse;
import software.amazon.awssdk.services.iam.model.ListAccountAliasesRequest;
import software.amazon.awssdk.services.iam.model.ListAccountAliasesResponse;
import software.amazon.awssdk.services.iam.model.ListAttachedGroupPoliciesRequest;
import software.amazon.awssdk.services.iam.model.ListAttachedGroupPoliciesResponse;
import software.amazon.awssdk.services.iam.model.ListAttachedRolePoliciesRequest;
import software.amazon.awssdk.services.iam.model.ListAttachedRolePoliciesResponse;
import software.amazon.awssdk.services.iam.model.ListAttachedUserPoliciesRequest;
import software.amazon.awssdk.services.iam.model.ListAttachedUserPoliciesResponse;
import software.amazon.awssdk.services.iam.model.ListEntitiesForPolicyRequest;
import software.amazon.awssdk.services.iam.model.ListEntitiesForPolicyResponse;
import software.amazon.awssdk.services.iam.model.ListGroupPoliciesRequest;
import software.amazon.awssdk.services.iam.model.ListGroupPoliciesResponse;
import software.amazon.awssdk.services.iam.model.ListGroupsForUserRequest;
import software.amazon.awssdk.services.iam.model.ListGroupsForUserResponse;
import software.amazon.awssdk.services.iam.model.ListGroupsRequest;
import software.amazon.awssdk.services.iam.model.ListGroupsResponse;
import software.amazon.awssdk.services.iam.model.ListInstanceProfileTagsRequest;
import software.amazon.awssdk.services.iam.model.ListInstanceProfileTagsResponse;
import software.amazon.awssdk.services.iam.model.ListInstanceProfilesForRoleRequest;
import software.amazon.awssdk.services.iam.model.ListInstanceProfilesForRoleResponse;
import software.amazon.awssdk.services.iam.model.ListInstanceProfilesRequest;
import software.amazon.awssdk.services.iam.model.ListInstanceProfilesResponse;
import software.amazon.awssdk.services.iam.model.ListMfaDeviceTagsRequest;
import software.amazon.awssdk.services.iam.model.ListMfaDeviceTagsResponse;
import software.amazon.awssdk.services.iam.model.ListMfaDevicesRequest;
import software.amazon.awssdk.services.iam.model.ListMfaDevicesResponse;
import software.amazon.awssdk.services.iam.model.ListOpenIdConnectProviderTagsRequest;
import software.amazon.awssdk.services.iam.model.ListOpenIdConnectProviderTagsResponse;
import software.amazon.awssdk.services.iam.model.ListOpenIdConnectProvidersRequest;
import software.amazon.awssdk.services.iam.model.ListOpenIdConnectProvidersResponse;
import software.amazon.awssdk.services.iam.model.ListOrganizationsFeaturesRequest;
import software.amazon.awssdk.services.iam.model.ListOrganizationsFeaturesResponse;
import software.amazon.awssdk.services.iam.model.ListPoliciesGrantingServiceAccessRequest;
import software.amazon.awssdk.services.iam.model.ListPoliciesGrantingServiceAccessResponse;
import software.amazon.awssdk.services.iam.model.ListPoliciesRequest;
import software.amazon.awssdk.services.iam.model.ListPoliciesResponse;
import software.amazon.awssdk.services.iam.model.ListPolicyTagsRequest;
import software.amazon.awssdk.services.iam.model.ListPolicyTagsResponse;
import software.amazon.awssdk.services.iam.model.ListPolicyVersionsRequest;
import software.amazon.awssdk.services.iam.model.ListPolicyVersionsResponse;
import software.amazon.awssdk.services.iam.model.ListRolePoliciesRequest;
import software.amazon.awssdk.services.iam.model.ListRolePoliciesResponse;
import software.amazon.awssdk.services.iam.model.ListRoleTagsRequest;
import software.amazon.awssdk.services.iam.model.ListRoleTagsResponse;
import software.amazon.awssdk.services.iam.model.ListRolesRequest;
import software.amazon.awssdk.services.iam.model.ListRolesResponse;
import software.amazon.awssdk.services.iam.model.ListSamlProviderTagsRequest;
import software.amazon.awssdk.services.iam.model.ListSamlProviderTagsResponse;
import software.amazon.awssdk.services.iam.model.ListSamlProvidersRequest;
import software.amazon.awssdk.services.iam.model.ListSamlProvidersResponse;
import software.amazon.awssdk.services.iam.model.ListServerCertificateTagsRequest;
import software.amazon.awssdk.services.iam.model.ListServerCertificateTagsResponse;
import software.amazon.awssdk.services.iam.model.ListServerCertificatesRequest;
import software.amazon.awssdk.services.iam.model.ListServerCertificatesResponse;
import software.amazon.awssdk.services.iam.model.ListServiceSpecificCredentialsRequest;
import software.amazon.awssdk.services.iam.model.ListServiceSpecificCredentialsResponse;
import software.amazon.awssdk.services.iam.model.ListSigningCertificatesRequest;
import software.amazon.awssdk.services.iam.model.ListSigningCertificatesResponse;
import software.amazon.awssdk.services.iam.model.ListSshPublicKeysRequest;
import software.amazon.awssdk.services.iam.model.ListSshPublicKeysResponse;
import software.amazon.awssdk.services.iam.model.ListUserPoliciesRequest;
import software.amazon.awssdk.services.iam.model.ListUserPoliciesResponse;
import software.amazon.awssdk.services.iam.model.ListUserTagsRequest;
import software.amazon.awssdk.services.iam.model.ListUserTagsResponse;
import software.amazon.awssdk.services.iam.model.ListUsersRequest;
import software.amazon.awssdk.services.iam.model.ListUsersResponse;
import software.amazon.awssdk.services.iam.model.ListVirtualMfaDevicesRequest;
import software.amazon.awssdk.services.iam.model.ListVirtualMfaDevicesResponse;
import software.amazon.awssdk.services.iam.model.MalformedCertificateException;
import software.amazon.awssdk.services.iam.model.MalformedPolicyDocumentException;
import software.amazon.awssdk.services.iam.model.NoSuchEntityException;
import software.amazon.awssdk.services.iam.model.OpenIdIdpCommunicationErrorException;
import software.amazon.awssdk.services.iam.model.OrganizationNotFoundException;
import software.amazon.awssdk.services.iam.model.OrganizationNotInAllFeaturesModeException;
import software.amazon.awssdk.services.iam.model.PasswordPolicyViolationException;
import software.amazon.awssdk.services.iam.model.PolicyEvaluationException;
import software.amazon.awssdk.services.iam.model.PolicyNotAttachableException;
import software.amazon.awssdk.services.iam.model.PutGroupPolicyRequest;
import software.amazon.awssdk.services.iam.model.PutGroupPolicyResponse;
import software.amazon.awssdk.services.iam.model.PutRolePermissionsBoundaryRequest;
import software.amazon.awssdk.services.iam.model.PutRolePermissionsBoundaryResponse;
import software.amazon.awssdk.services.iam.model.PutRolePolicyRequest;
import software.amazon.awssdk.services.iam.model.PutRolePolicyResponse;
import software.amazon.awssdk.services.iam.model.PutUserPermissionsBoundaryRequest;
import software.amazon.awssdk.services.iam.model.PutUserPermissionsBoundaryResponse;
import software.amazon.awssdk.services.iam.model.PutUserPolicyRequest;
import software.amazon.awssdk.services.iam.model.PutUserPolicyResponse;
import software.amazon.awssdk.services.iam.model.RemoveClientIdFromOpenIdConnectProviderRequest;
import software.amazon.awssdk.services.iam.model.RemoveClientIdFromOpenIdConnectProviderResponse;
import software.amazon.awssdk.services.iam.model.RemoveRoleFromInstanceProfileRequest;
import software.amazon.awssdk.services.iam.model.RemoveRoleFromInstanceProfileResponse;
import software.amazon.awssdk.services.iam.model.RemoveUserFromGroupRequest;
import software.amazon.awssdk.services.iam.model.RemoveUserFromGroupResponse;
import software.amazon.awssdk.services.iam.model.ReportGenerationLimitExceededException;
import software.amazon.awssdk.services.iam.model.ResetServiceSpecificCredentialRequest;
import software.amazon.awssdk.services.iam.model.ResetServiceSpecificCredentialResponse;
import software.amazon.awssdk.services.iam.model.ResyncMfaDeviceRequest;
import software.amazon.awssdk.services.iam.model.ResyncMfaDeviceResponse;
import software.amazon.awssdk.services.iam.model.ServiceAccessNotEnabledException;
import software.amazon.awssdk.services.iam.model.ServiceFailureException;
import software.amazon.awssdk.services.iam.model.ServiceNotSupportedException;
import software.amazon.awssdk.services.iam.model.SetDefaultPolicyVersionRequest;
import software.amazon.awssdk.services.iam.model.SetDefaultPolicyVersionResponse;
import software.amazon.awssdk.services.iam.model.SetSecurityTokenServicePreferencesRequest;
import software.amazon.awssdk.services.iam.model.SetSecurityTokenServicePreferencesResponse;
import software.amazon.awssdk.services.iam.model.SimulateCustomPolicyRequest;
import software.amazon.awssdk.services.iam.model.SimulateCustomPolicyResponse;
import software.amazon.awssdk.services.iam.model.SimulatePrincipalPolicyRequest;
import software.amazon.awssdk.services.iam.model.SimulatePrincipalPolicyResponse;
import software.amazon.awssdk.services.iam.model.TagInstanceProfileRequest;
import software.amazon.awssdk.services.iam.model.TagInstanceProfileResponse;
import software.amazon.awssdk.services.iam.model.TagMfaDeviceRequest;
import software.amazon.awssdk.services.iam.model.TagMfaDeviceResponse;
import software.amazon.awssdk.services.iam.model.TagOpenIdConnectProviderRequest;
import software.amazon.awssdk.services.iam.model.TagOpenIdConnectProviderResponse;
import software.amazon.awssdk.services.iam.model.TagPolicyRequest;
import software.amazon.awssdk.services.iam.model.TagPolicyResponse;
import software.amazon.awssdk.services.iam.model.TagRoleRequest;
import software.amazon.awssdk.services.iam.model.TagRoleResponse;
import software.amazon.awssdk.services.iam.model.TagSamlProviderRequest;
import software.amazon.awssdk.services.iam.model.TagSamlProviderResponse;
import software.amazon.awssdk.services.iam.model.TagServerCertificateRequest;
import software.amazon.awssdk.services.iam.model.TagServerCertificateResponse;
import software.amazon.awssdk.services.iam.model.TagUserRequest;
import software.amazon.awssdk.services.iam.model.TagUserResponse;
import software.amazon.awssdk.services.iam.model.UnmodifiableEntityException;
import software.amazon.awssdk.services.iam.model.UnrecognizedPublicKeyEncodingException;
import software.amazon.awssdk.services.iam.model.UntagInstanceProfileRequest;
import software.amazon.awssdk.services.iam.model.UntagInstanceProfileResponse;
import software.amazon.awssdk.services.iam.model.UntagMfaDeviceRequest;
import software.amazon.awssdk.services.iam.model.UntagMfaDeviceResponse;
import software.amazon.awssdk.services.iam.model.UntagOpenIdConnectProviderRequest;
import software.amazon.awssdk.services.iam.model.UntagOpenIdConnectProviderResponse;
import software.amazon.awssdk.services.iam.model.UntagPolicyRequest;
import software.amazon.awssdk.services.iam.model.UntagPolicyResponse;
import software.amazon.awssdk.services.iam.model.UntagRoleRequest;
import software.amazon.awssdk.services.iam.model.UntagRoleResponse;
import software.amazon.awssdk.services.iam.model.UntagSamlProviderRequest;
import software.amazon.awssdk.services.iam.model.UntagSamlProviderResponse;
import software.amazon.awssdk.services.iam.model.UntagServerCertificateRequest;
import software.amazon.awssdk.services.iam.model.UntagServerCertificateResponse;
import software.amazon.awssdk.services.iam.model.UntagUserRequest;
import software.amazon.awssdk.services.iam.model.UntagUserResponse;
import software.amazon.awssdk.services.iam.model.UpdateAccessKeyRequest;
import software.amazon.awssdk.services.iam.model.UpdateAccessKeyResponse;
import software.amazon.awssdk.services.iam.model.UpdateAccountPasswordPolicyRequest;
import software.amazon.awssdk.services.iam.model.UpdateAccountPasswordPolicyResponse;
import software.amazon.awssdk.services.iam.model.UpdateAssumeRolePolicyRequest;
import software.amazon.awssdk.services.iam.model.UpdateAssumeRolePolicyResponse;
import software.amazon.awssdk.services.iam.model.UpdateGroupRequest;
import software.amazon.awssdk.services.iam.model.UpdateGroupResponse;
import software.amazon.awssdk.services.iam.model.UpdateLoginProfileRequest;
import software.amazon.awssdk.services.iam.model.UpdateLoginProfileResponse;
import software.amazon.awssdk.services.iam.model.UpdateOpenIdConnectProviderThumbprintRequest;
import software.amazon.awssdk.services.iam.model.UpdateOpenIdConnectProviderThumbprintResponse;
import software.amazon.awssdk.services.iam.model.UpdateRoleDescriptionRequest;
import software.amazon.awssdk.services.iam.model.UpdateRoleDescriptionResponse;
import software.amazon.awssdk.services.iam.model.UpdateRoleRequest;
import software.amazon.awssdk.services.iam.model.UpdateRoleResponse;
import software.amazon.awssdk.services.iam.model.UpdateSamlProviderRequest;
import software.amazon.awssdk.services.iam.model.UpdateSamlProviderResponse;
import software.amazon.awssdk.services.iam.model.UpdateServerCertificateRequest;
import software.amazon.awssdk.services.iam.model.UpdateServerCertificateResponse;
import software.amazon.awssdk.services.iam.model.UpdateServiceSpecificCredentialRequest;
import software.amazon.awssdk.services.iam.model.UpdateServiceSpecificCredentialResponse;
import software.amazon.awssdk.services.iam.model.UpdateSigningCertificateRequest;
import software.amazon.awssdk.services.iam.model.UpdateSigningCertificateResponse;
import software.amazon.awssdk.services.iam.model.UpdateSshPublicKeyRequest;
import software.amazon.awssdk.services.iam.model.UpdateSshPublicKeyResponse;
import software.amazon.awssdk.services.iam.model.UpdateUserRequest;
import software.amazon.awssdk.services.iam.model.UpdateUserResponse;
import software.amazon.awssdk.services.iam.model.UploadServerCertificateRequest;
import software.amazon.awssdk.services.iam.model.UploadServerCertificateResponse;
import software.amazon.awssdk.services.iam.model.UploadSigningCertificateRequest;
import software.amazon.awssdk.services.iam.model.UploadSigningCertificateResponse;
import software.amazon.awssdk.services.iam.model.UploadSshPublicKeyRequest;
import software.amazon.awssdk.services.iam.model.UploadSshPublicKeyResponse;
import software.amazon.awssdk.services.iam.transform.AddClientIdToOpenIdConnectProviderRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.AddRoleToInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.AddUserToGroupRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.AttachGroupPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.AttachRolePolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.AttachUserPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ChangePasswordRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreateAccessKeyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreateAccountAliasRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreateGroupRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreateInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreateLoginProfileRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreateOpenIdConnectProviderRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreatePolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreatePolicyVersionRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreateRoleRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreateSamlProviderRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreateServiceLinkedRoleRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreateServiceSpecificCredentialRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreateUserRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.CreateVirtualMfaDeviceRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeactivateMfaDeviceRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteAccessKeyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteAccountAliasRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteAccountPasswordPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteGroupPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteGroupRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteLoginProfileRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteOpenIdConnectProviderRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeletePolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeletePolicyVersionRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteRolePermissionsBoundaryRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteRolePolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteRoleRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteSamlProviderRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteServerCertificateRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteServiceLinkedRoleRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteServiceSpecificCredentialRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteSigningCertificateRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteSshPublicKeyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteUserPermissionsBoundaryRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteUserPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteUserRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DeleteVirtualMfaDeviceRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DetachGroupPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DetachRolePolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DetachUserPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DisableOrganizationsRootCredentialsManagementRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.DisableOrganizationsRootSessionsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.EnableMfaDeviceRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.EnableOrganizationsRootCredentialsManagementRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.EnableOrganizationsRootSessionsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GenerateCredentialReportRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GenerateOrganizationsAccessReportRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GenerateServiceLastAccessedDetailsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetAccessKeyLastUsedRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetAccountAuthorizationDetailsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetAccountPasswordPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetAccountSummaryRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetContextKeysForCustomPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetContextKeysForPrincipalPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetCredentialReportRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetGroupPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetGroupRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetLoginProfileRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetMfaDeviceRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetOpenIdConnectProviderRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetOrganizationsAccessReportRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetPolicyVersionRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetRolePolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetRoleRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetSamlProviderRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetServerCertificateRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetServiceLastAccessedDetailsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetServiceLastAccessedDetailsWithEntitiesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetServiceLinkedRoleDeletionStatusRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetSshPublicKeyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetUserPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.GetUserRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListAccessKeysRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListAccountAliasesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListAttachedGroupPoliciesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListAttachedRolePoliciesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListAttachedUserPoliciesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListEntitiesForPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListGroupPoliciesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListGroupsForUserRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListGroupsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListInstanceProfileTagsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListInstanceProfilesForRoleRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListInstanceProfilesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListMfaDeviceTagsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListMfaDevicesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListOpenIdConnectProviderTagsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListOpenIdConnectProvidersRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListOrganizationsFeaturesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListPoliciesGrantingServiceAccessRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListPoliciesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListPolicyTagsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListPolicyVersionsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListRolePoliciesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListRoleTagsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListRolesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListSamlProviderTagsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListSamlProvidersRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListServerCertificateTagsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListServerCertificatesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListServiceSpecificCredentialsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListSigningCertificatesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListSshPublicKeysRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListUserPoliciesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListUserTagsRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListUsersRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ListVirtualMfaDevicesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.PutGroupPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.PutRolePermissionsBoundaryRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.PutRolePolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.PutUserPermissionsBoundaryRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.PutUserPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.RemoveClientIdFromOpenIdConnectProviderRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.RemoveRoleFromInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.RemoveUserFromGroupRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ResetServiceSpecificCredentialRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.ResyncMfaDeviceRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.SetDefaultPolicyVersionRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.SetSecurityTokenServicePreferencesRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.SimulateCustomPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.SimulatePrincipalPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.TagInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.TagMfaDeviceRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.TagOpenIdConnectProviderRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.TagPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.TagRoleRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.TagSamlProviderRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.TagServerCertificateRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.TagUserRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UntagInstanceProfileRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UntagMfaDeviceRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UntagOpenIdConnectProviderRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UntagPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UntagRoleRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UntagSamlProviderRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UntagServerCertificateRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UntagUserRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateAccessKeyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateAccountPasswordPolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateAssumeRolePolicyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateGroupRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateLoginProfileRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateOpenIdConnectProviderThumbprintRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateRoleDescriptionRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateRoleRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateSamlProviderRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateServerCertificateRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateServiceSpecificCredentialRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateSigningCertificateRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateSshPublicKeyRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UpdateUserRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UploadServerCertificateRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UploadSigningCertificateRequestMarshaller;
import software.amazon.awssdk.services.iam.transform.UploadSshPublicKeyRequestMarshaller;
import software.amazon.awssdk.services.iam.waiters.IamAsyncWaiter;
import software.amazon.awssdk.utils.CompletableFutureUtils;

/**
 * Internal implementation of {@link IamAsyncClient}.
 *
 * @see IamAsyncClient#builder()
 */
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultIamAsyncClient implements IamAsyncClient {
    private static final Logger log = LoggerFactory.getLogger(DefaultIamAsyncClient.class);

    private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
            .serviceProtocol(AwsServiceProtocol.QUERY).build();

    private final AsyncClientHandler clientHandler;

    private final AwsQueryProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

    private final ScheduledExecutorService executorService;

    protected DefaultIamAsyncClient(SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration.toBuilder().option(SdkClientOption.SDK_CLIENT, this).build();
        this.protocolFactory = init();
        this.executorService = clientConfiguration.option(SdkClientOption.SCHEDULED_EXECUTOR_SERVICE);
    }

    /**
     * 

* Adds a new client ID (also known as audience) to the list of client IDs already registered for the specified IAM * OpenID Connect (OIDC) provider resource. *

*

* This operation is idempotent; it does not fail or return an error if you add an existing client ID to the * provider. *

* * @param addClientIdToOpenIdConnectProviderRequest * @return A Java Future containing the result of the AddClientIDToOpenIDConnectProvider operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.AddClientIDToOpenIDConnectProvider * @see AWS API Documentation */ @Override public CompletableFuture addClientIDToOpenIDConnectProvider( AddClientIdToOpenIdConnectProviderRequest addClientIdToOpenIdConnectProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(addClientIdToOpenIdConnectProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, addClientIdToOpenIdConnectProviderRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AddClientIDToOpenIDConnectProvider"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AddClientIdToOpenIdConnectProviderResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AddClientIDToOpenIDConnectProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new AddClientIdToOpenIdConnectProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(addClientIdToOpenIdConnectProviderRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds the specified IAM role to the specified instance profile. An instance profile can contain only one role, and * this quota cannot be increased. You can remove the existing role and then add a different role to an instance * profile. You must then wait for the change to appear across all of Amazon Web Services because of eventual consistency. To force the change, you must * * disassociate the instance profile and then associate the * instance profile, or you can stop your instance and then restart it. *

* *

* The caller of this operation must be granted the PassRole permission on the IAM role by a * permissions policy. *

*
*

* For more information about roles, see IAM roles in the IAM User Guide. * For more information about instance profiles, see Using * instance profiles in the IAM User Guide. *

* * @param addRoleToInstanceProfileRequest * @return A Java Future containing the result of the AddRoleToInstanceProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • UnmodifiableEntityException The request was rejected because service-linked roles are protected * Amazon Web Services resources. Only the service that depends on the service-linked role can modify or * delete the role on your behalf. The error message includes the name of the service that depends on this * service-linked role. You must request the change through that service.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.AddRoleToInstanceProfile * @see AWS * API Documentation */ @Override public CompletableFuture addRoleToInstanceProfile( AddRoleToInstanceProfileRequest addRoleToInstanceProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(addRoleToInstanceProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, addRoleToInstanceProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AddRoleToInstanceProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AddRoleToInstanceProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AddRoleToInstanceProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new AddRoleToInstanceProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(addRoleToInstanceProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds the specified user to the specified group. *

* * @param addUserToGroupRequest * @return A Java Future containing the result of the AddUserToGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.AddUserToGroup * @see AWS API * Documentation */ @Override public CompletableFuture addUserToGroup(AddUserToGroupRequest addUserToGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(addUserToGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, addUserToGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AddUserToGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AddUserToGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AddUserToGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new AddUserToGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(addUserToGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Attaches the specified managed policy to the specified IAM group. *

*

* You use this operation to attach a managed policy to a group. To embed an inline policy in a group, use PutGroupPolicy * . *

*

* As a best practice, you can validate your IAM policies. To learn more, see Validating IAM * policies in the IAM User Guide. *

*

* For more information about policies, see Managed policies and * inline policies in the IAM User Guide. *

* * @param attachGroupPolicyRequest * @return A Java Future containing the result of the AttachGroupPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • PolicyNotAttachableException The request failed because Amazon Web Services service role policies can * only be attached to the service-linked role for that service.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.AttachGroupPolicy * @see AWS API * Documentation */ @Override public CompletableFuture attachGroupPolicy(AttachGroupPolicyRequest attachGroupPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(attachGroupPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, attachGroupPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AttachGroupPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AttachGroupPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AttachGroupPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new AttachGroupPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(attachGroupPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Attaches the specified managed policy to the specified IAM role. When you attach a managed policy to a role, the * managed policy becomes part of the role's permission (access) policy. *

* *

* You cannot use a managed policy as the role's trust policy. The role's trust policy is created at the same time * as the role, using * CreateRole . You can update a role's trust policy using * UpdateAssumerolePolicy . *

*
*

* Use this operation to attach a managed policy to a role. To embed an inline policy in a role, use PutRolePolicy * . For more information about policies, see Managed policies and * inline policies in the IAM User Guide. *

*

* As a best practice, you can validate your IAM policies. To learn more, see Validating IAM * policies in the IAM User Guide. *

* * @param attachRolePolicyRequest * @return A Java Future containing the result of the AttachRolePolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • UnmodifiableEntityException The request was rejected because service-linked roles are protected * Amazon Web Services resources. Only the service that depends on the service-linked role can modify or * delete the role on your behalf. The error message includes the name of the service that depends on this * service-linked role. You must request the change through that service.
  • *
  • PolicyNotAttachableException The request failed because Amazon Web Services service role policies can * only be attached to the service-linked role for that service.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.AttachRolePolicy * @see AWS API * Documentation */ @Override public CompletableFuture attachRolePolicy(AttachRolePolicyRequest attachRolePolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(attachRolePolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, attachRolePolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AttachRolePolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AttachRolePolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AttachRolePolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new AttachRolePolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(attachRolePolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Attaches the specified managed policy to the specified user. *

*

* You use this operation to attach a managed policy to a user. To embed an inline policy in a user, use PutUserPolicy * . *

*

* As a best practice, you can validate your IAM policies. To learn more, see Validating IAM * policies in the IAM User Guide. *

*

* For more information about policies, see Managed policies and * inline policies in the IAM User Guide. *

* * @param attachUserPolicyRequest * @return A Java Future containing the result of the AttachUserPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • PolicyNotAttachableException The request failed because Amazon Web Services service role policies can * only be attached to the service-linked role for that service.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.AttachUserPolicy * @see AWS API * Documentation */ @Override public CompletableFuture attachUserPolicy(AttachUserPolicyRequest attachUserPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(attachUserPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, attachUserPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AttachUserPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AttachUserPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AttachUserPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new AttachUserPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(attachUserPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Changes the password of the IAM user who is calling this operation. This operation can be performed using the * CLI, the Amazon Web Services API, or the My Security Credentials page in the Amazon Web Services * Management Console. The Amazon Web Services account root user password is not affected by this operation. *

*

* Use UpdateLoginProfile to use the CLI, the Amazon Web Services API, or the Users page in the IAM * console to change the password for any IAM user. For more information about modifying passwords, see Managing passwords in the * IAM User Guide. *

* * @param changePasswordRequest * @return A Java Future containing the result of the ChangePassword operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidUserTypeException The request was rejected because the type of user for the transaction was * incorrect.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • EntityTemporarilyUnmodifiableException The request was rejected because it referenced an entity that * is temporarily unmodifiable, such as a user name that was deleted and then recreated. The error indicates * that the request is likely to succeed if you try again after waiting several minutes. The error message * describes the entity.
  • *
  • PasswordPolicyViolationException The request was rejected because the provided password did not meet * the requirements imposed by the account password policy.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ChangePassword * @see AWS API * Documentation */ @Override public CompletableFuture changePassword(ChangePasswordRequest changePasswordRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(changePasswordRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, changePasswordRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ChangePassword"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ChangePasswordResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ChangePassword").withProtocolMetadata(protocolMetadata) .withMarshaller(new ChangePasswordRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(changePasswordRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new Amazon Web Services secret access key and corresponding Amazon Web Services access key ID for the * specified user. The default status for new keys is Active. *

*

* If you do not specify a user name, IAM determines the user name implicitly based on the Amazon Web Services * access key ID signing the request. This operation works for access keys under the Amazon Web Services account. * Consequently, you can use this operation to manage Amazon Web Services account root user credentials. This is * true even if the Amazon Web Services account has no associated users. *

*

* For information about quotas on the number of keys you can create, see IAM and STS quotas in the * IAM User Guide. *

* *

* To ensure the security of your Amazon Web Services account, the secret access key is accessible only during key * and user creation. You must save the key (for example, in a text file) if you want to be able to access it again. * If a secret key is lost, you can delete the access keys for the associated user and then create new keys. *

*
* * @param createAccessKeyRequest * @return A Java Future containing the result of the CreateAccessKey operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreateAccessKey * @see AWS API * Documentation */ @Override public CompletableFuture createAccessKey(CreateAccessKeyRequest createAccessKeyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAccessKeyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createAccessKeyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAccessKey"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateAccessKeyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateAccessKey").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateAccessKeyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createAccessKeyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an alias for your Amazon Web Services account. For information about using an Amazon Web Services account * alias, see Creating, * deleting, and listing an Amazon Web Services account alias in the Amazon Web Services Sign-In User * Guide. *

* * @param createAccountAliasRequest * @return A Java Future containing the result of the CreateAccountAlias operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreateAccountAlias * @see AWS API * Documentation */ @Override public CompletableFuture createAccountAlias(CreateAccountAliasRequest createAccountAliasRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAccountAliasRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createAccountAliasRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAccountAlias"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateAccountAliasResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateAccountAlias").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateAccountAliasRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createAccountAliasRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new group. *

*

* For information about the number of groups you can create, see IAM and STS quotas in the * IAM User Guide. *

* * @param createGroupRequest * @return A Java Future containing the result of the CreateGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreateGroup * @see AWS API * Documentation */ @Override public CompletableFuture createGroup(CreateGroupRequest createGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new instance profile. For information about instance profiles, see Using roles for * applications on Amazon EC2 in the IAM User Guide, and Instance profiles in the Amazon EC2 User Guide. *

*

* For information about the number of instance profiles you can create, see IAM object quotas in the * IAM User Guide. *

* * @param createInstanceProfileRequest * @return A Java Future containing the result of the CreateInstanceProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreateInstanceProfile * @see AWS API * Documentation */ @Override public CompletableFuture createInstanceProfile( CreateInstanceProfileRequest createInstanceProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createInstanceProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createInstanceProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateInstanceProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateInstanceProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateInstanceProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateInstanceProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createInstanceProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a password for the specified IAM user. A password allows an IAM user to access Amazon Web Services * services through the Amazon Web Services Management Console. *

*

* You can use the CLI, the Amazon Web Services API, or the Users page in the IAM console to create a * password for any IAM user. Use ChangePassword to update your own existing password in the My Security * Credentials page in the Amazon Web Services Management Console. *

*

* For more information about managing passwords, see Managing passwords in the * IAM User Guide. *

* * @param createLoginProfileRequest * @return A Java Future containing the result of the CreateLoginProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • PasswordPolicyViolationException The request was rejected because the provided password did not meet * the requirements imposed by the account password policy.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreateLoginProfile * @see AWS API * Documentation */ @Override public CompletableFuture createLoginProfile(CreateLoginProfileRequest createLoginProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createLoginProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createLoginProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateLoginProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateLoginProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateLoginProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateLoginProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createLoginProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an IAM entity to describe an identity provider (IdP) that supports OpenID Connect (OIDC). *

*

* The OIDC provider that you create with this operation can be used as a principal in a role's trust policy. Such a * policy establishes a trust relationship between Amazon Web Services and the OIDC provider. *

*

* If you are using an OIDC identity provider from Google, Facebook, or Amazon Cognito, you don't need to create a * separate IAM identity provider. These OIDC identity providers are already built-in to Amazon Web Services and are * available for your use. Instead, you can move directly to creating new roles using your identity provider. To * learn more, see Creating a role for web * identity or OpenID connect federation in the IAM User Guide. *

*

* When you create the IAM OIDC provider, you specify the following: *

*
    *
  • *

    * The URL of the OIDC identity provider (IdP) to trust *

    *
  • *
  • *

    * A list of client IDs (also known as audiences) that identify the application or applications allowed to * authenticate using the OIDC provider *

    *
  • *
  • *

    * A list of tags that are attached to the specified IAM OIDC provider *

    *
  • *
  • *

    * A list of thumbprints of one or more server certificates that the IdP uses *

    *
  • *
*

* You get all of this information from the OIDC IdP you want to use to access Amazon Web Services. *

* *

* Amazon Web Services secures communication with OIDC identity providers (IdPs) using our library of trusted root * certificate authorities (CAs) to verify the JSON Web Key Set (JWKS) endpoint's TLS certificate. If your OIDC IdP * relies on a certificate that is not signed by one of these trusted CAs, only then we secure communication using * the thumbprints set in the IdP's configuration. *

*
*

* The trust for the OIDC provider is derived from the IAM provider that this operation creates. Therefore, it is * best to limit access to the CreateOpenIDConnectProvider operation to highly privileged users. *

*
* * @param createOpenIdConnectProviderRequest * @return A Java Future containing the result of the CreateOpenIDConnectProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • OpenIdIdpCommunicationErrorException The request failed because IAM cannot connect to the OpenID * Connect identity provider URL.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreateOpenIDConnectProvider * @see AWS API Documentation */ @Override public CompletableFuture createOpenIDConnectProvider( CreateOpenIdConnectProviderRequest createOpenIdConnectProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createOpenIdConnectProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createOpenIdConnectProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateOpenIDConnectProvider"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateOpenIdConnectProviderResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateOpenIDConnectProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateOpenIdConnectProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createOpenIdConnectProviderRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new managed policy for your Amazon Web Services account. *

*

* This operation creates a policy version with a version identifier of v1 and sets v1 as the policy's * default version. For more information about policy versions, see Versioning for managed * policies in the IAM User Guide. *

*

* As a best practice, you can validate your IAM policies. To learn more, see Validating IAM * policies in the IAM User Guide. *

*

* For more information about managed policies in general, see Managed policies and * inline policies in the IAM User Guide. *

* * @param createPolicyRequest * @return A Java Future containing the result of the CreatePolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • MalformedPolicyDocumentException The request was rejected because the policy document was malformed. * The error message describes the specific error.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreatePolicy * @see AWS API * Documentation */ @Override public CompletableFuture createPolicy(CreatePolicyRequest createPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreatePolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreatePolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreatePolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreatePolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new version of the specified managed policy. To update a managed policy, you create a new policy * version. A managed policy can have up to five versions. If the policy has five versions, you must delete an * existing version using DeletePolicyVersion before you create a new version. *

*

* Optionally, you can set the new version as the policy's default version. The default version is the version that * is in effect for the IAM users, groups, and roles to which the policy is attached. *

*

* For more information about managed policy versions, see Versioning for managed * policies in the IAM User Guide. *

* * @param createPolicyVersionRequest * @return A Java Future containing the result of the CreatePolicyVersion operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • MalformedPolicyDocumentException The request was rejected because the policy document was malformed. * The error message describes the specific error.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreatePolicyVersion * @see AWS API * Documentation */ @Override public CompletableFuture createPolicyVersion( CreatePolicyVersionRequest createPolicyVersionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createPolicyVersionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createPolicyVersionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreatePolicyVersion"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreatePolicyVersionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreatePolicyVersion").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreatePolicyVersionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createPolicyVersionRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new role for your Amazon Web Services account. *

*

* For more information about roles, see IAM roles in the IAM User Guide. * For information about quotas for role names and the number of roles you can create, see IAM and STS quotas in the * IAM User Guide. *

* * @param createRoleRequest * @return A Java Future containing the result of the CreateRole operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • MalformedPolicyDocumentException The request was rejected because the policy document was malformed. * The error message describes the specific error.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreateRole * @see AWS API * Documentation */ @Override public CompletableFuture createRole(CreateRoleRequest createRoleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createRoleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createRoleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateRole"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateRoleResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("CreateRole") .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateRoleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createRoleRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an IAM resource that describes an identity provider (IdP) that supports SAML 2.0. *

*

* The SAML provider resource that you create with this operation can be used as a principal in an IAM role's trust * policy. Such a policy can enable federated users who sign in using the SAML IdP to assume the role. You can * create an IAM role that supports Web-based single sign-on (SSO) to the Amazon Web Services Management Console or * one that supports API access to Amazon Web Services. *

*

* When you create the SAML provider resource, you upload a SAML metadata document that you get from your IdP. That * document includes the issuer's name, expiration information, and keys that can be used to validate the SAML * authentication response (assertions) that the IdP sends. You must generate the metadata document using the * identity management software that is used as your organization's IdP. *

* *

* This operation requires Signature Version 4. *

*
*

* For more information, see Enabling SAML * 2.0 federated users to access the Amazon Web Services Management Console and About SAML 2.0-based * federation in the IAM User Guide. *

* * @param createSamlProviderRequest * @return A Java Future containing the result of the CreateSAMLProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreateSAMLProvider * @see AWS API * Documentation */ @Override public CompletableFuture createSAMLProvider(CreateSamlProviderRequest createSamlProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createSamlProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createSamlProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSAMLProvider"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateSamlProviderResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateSAMLProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateSamlProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createSamlProviderRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an IAM role that is linked to a specific Amazon Web Services service. The service controls the attached * policies and when the role can be deleted. This helps ensure that the service is not broken by an unexpectedly * changed or deleted role, which could put your Amazon Web Services resources into an unknown state. Allowing the * service to control the role helps improve service stability and proper cleanup when a service and its role are no * longer needed. For more information, see Using service-linked * roles in the IAM User Guide. *

*

* To attach a policy to this service-linked role, you must make the request using the Amazon Web Services service * that depends on this role. *

* * @param createServiceLinkedRoleRequest * @return A Java Future containing the result of the CreateServiceLinkedRole operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreateServiceLinkedRole * @see AWS * API Documentation */ @Override public CompletableFuture createServiceLinkedRole( CreateServiceLinkedRoleRequest createServiceLinkedRoleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createServiceLinkedRoleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createServiceLinkedRoleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateServiceLinkedRole"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateServiceLinkedRoleResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateServiceLinkedRole").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateServiceLinkedRoleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createServiceLinkedRoleRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Generates a set of credentials consisting of a user name and password that can be used to access the service * specified in the request. These credentials are generated by IAM, and can be used only for the specified service. *

*

* You can have a maximum of two sets of service-specific credentials for each supported service per user. *

*

* You can create service-specific credentials for CodeCommit and Amazon Keyspaces (for Apache Cassandra). *

*

* You can reset the password to a new service-generated value by calling ResetServiceSpecificCredential. *

*

* For more information about service-specific credentials, see Using IAM with CodeCommit: * Git credentials, SSH keys, and Amazon Web Services access keys in the IAM User Guide. *

* * @param createServiceSpecificCredentialRequest * @return A Java Future containing the result of the CreateServiceSpecificCredential operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceNotSupportedException The specified service does not support service-specific credentials.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreateServiceSpecificCredential * @see AWS API Documentation */ @Override public CompletableFuture createServiceSpecificCredential( CreateServiceSpecificCredentialRequest createServiceSpecificCredentialRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createServiceSpecificCredentialRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createServiceSpecificCredentialRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateServiceSpecificCredential"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateServiceSpecificCredentialResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateServiceSpecificCredential").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateServiceSpecificCredentialRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createServiceSpecificCredentialRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new IAM user for your Amazon Web Services account. *

*

* For information about quotas for the number of IAM users you can create, see IAM and STS quotas in the * IAM User Guide. *

* * @param createUserRequest * @return A Java Future containing the result of the CreateUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreateUser * @see AWS API * Documentation */ @Override public CompletableFuture createUser(CreateUserRequest createUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateUser"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateUserResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("CreateUser") .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createUserRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new virtual MFA device for the Amazon Web Services account. After creating the virtual MFA, use * EnableMFADevice to attach the MFA device to an IAM user. For more information about creating and working * with virtual MFA devices, see Using a virtual MFA device in * the IAM User Guide. *

*

* For information about the maximum number of MFA devices you can create, see IAM and STS quotas in the * IAM User Guide. *

* *

* The seed information contained in the QR code and the Base32 string should be treated like any other secret * access information. In other words, protect the seed information as you would your Amazon Web Services access * keys or your passwords. After you provision your virtual device, you should ensure that the information is * destroyed following secure procedures. *

*
* * @param createVirtualMfaDeviceRequest * @return A Java Future containing the result of the CreateVirtualMFADevice operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.CreateVirtualMFADevice * @see AWS * API Documentation */ @Override public CompletableFuture createVirtualMFADevice( CreateVirtualMfaDeviceRequest createVirtualMfaDeviceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createVirtualMfaDeviceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createVirtualMfaDeviceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateVirtualMFADevice"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateVirtualMfaDeviceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateVirtualMFADevice").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateVirtualMfaDeviceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createVirtualMfaDeviceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deactivates the specified MFA device and removes it from association with the user name for which it was * originally enabled. *

*

* For more information about creating and working with virtual MFA devices, see Enabling a virtual multi-factor * authentication (MFA) device in the IAM User Guide. *

* * @param deactivateMfaDeviceRequest * @return A Java Future containing the result of the DeactivateMFADevice operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • EntityTemporarilyUnmodifiableException The request was rejected because it referenced an entity that * is temporarily unmodifiable, such as a user name that was deleted and then recreated. The error indicates * that the request is likely to succeed if you try again after waiting several minutes. The error message * describes the entity.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeactivateMFADevice * @see AWS API * Documentation */ @Override public CompletableFuture deactivateMFADevice( DeactivateMfaDeviceRequest deactivateMfaDeviceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deactivateMfaDeviceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deactivateMfaDeviceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeactivateMFADevice"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeactivateMfaDeviceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeactivateMFADevice").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeactivateMfaDeviceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deactivateMfaDeviceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the access key pair associated with the specified IAM user. *

*

* If you do not specify a user name, IAM determines the user name implicitly based on the Amazon Web Services * access key ID signing the request. This operation works for access keys under the Amazon Web Services account. * Consequently, you can use this operation to manage Amazon Web Services account root user credentials even if the * Amazon Web Services account has no associated users. *

* * @param deleteAccessKeyRequest * @return A Java Future containing the result of the DeleteAccessKey operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteAccessKey * @see AWS API * Documentation */ @Override public CompletableFuture deleteAccessKey(DeleteAccessKeyRequest deleteAccessKeyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAccessKeyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAccessKeyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAccessKey"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteAccessKeyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAccessKey").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAccessKeyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteAccessKeyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified Amazon Web Services account alias. For information about using an Amazon Web Services * account alias, see Creating, deleting, and * listing an Amazon Web Services account alias in the Amazon Web Services Sign-In User Guide. *

* * @param deleteAccountAliasRequest * @return A Java Future containing the result of the DeleteAccountAlias operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteAccountAlias * @see AWS API * Documentation */ @Override public CompletableFuture deleteAccountAlias(DeleteAccountAliasRequest deleteAccountAliasRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAccountAliasRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAccountAliasRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAccountAlias"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteAccountAliasResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAccountAlias").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAccountAliasRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteAccountAliasRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the password policy for the Amazon Web Services account. There are no parameters. *

* * @param deleteAccountPasswordPolicyRequest * @return A Java Future containing the result of the DeleteAccountPasswordPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteAccountPasswordPolicy * @see AWS API Documentation */ @Override public CompletableFuture deleteAccountPasswordPolicy( DeleteAccountPasswordPolicyRequest deleteAccountPasswordPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAccountPasswordPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAccountPasswordPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAccountPasswordPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteAccountPasswordPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAccountPasswordPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAccountPasswordPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteAccountPasswordPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified IAM group. The group must not contain any users or have any attached policies. *

* * @param deleteGroupRequest * @return A Java Future containing the result of the DeleteGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • DeleteConflictException The request was rejected because it attempted to delete a resource that has * attached subordinate entities. The error message describes these entities.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteGroup * @see AWS API * Documentation */ @Override public CompletableFuture deleteGroup(DeleteGroupRequest deleteGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified inline policy that is embedded in the specified IAM group. *

*

* A group can also have managed policies attached to it. To detach a managed policy from a group, use * DetachGroupPolicy. For more information about policies, refer to Managed policies and * inline policies in the IAM User Guide. *

* * @param deleteGroupPolicyRequest * @return A Java Future containing the result of the DeleteGroupPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteGroupPolicy * @see AWS API * Documentation */ @Override public CompletableFuture deleteGroupPolicy(DeleteGroupPolicyRequest deleteGroupPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteGroupPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteGroupPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteGroupPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteGroupPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteGroupPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteGroupPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteGroupPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified instance profile. The instance profile must not have an associated role. *

* *

* Make sure that you do not have any Amazon EC2 instances running with the instance profile you are about to * delete. Deleting a role or instance profile that is associated with a running instance will break any * applications running on the instance. *

*
*

* For more information about instance profiles, see Using * instance profiles in the IAM User Guide. *

* * @param deleteInstanceProfileRequest * @return A Java Future containing the result of the DeleteInstanceProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • DeleteConflictException The request was rejected because it attempted to delete a resource that has * attached subordinate entities. The error message describes these entities.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteInstanceProfile * @see AWS API * Documentation */ @Override public CompletableFuture deleteInstanceProfile( DeleteInstanceProfileRequest deleteInstanceProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteInstanceProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteInstanceProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteInstanceProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteInstanceProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteInstanceProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteInstanceProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteInstanceProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the password for the specified IAM user, For more information, see Managing * passwords for IAM users. *

*

* You can use the CLI, the Amazon Web Services API, or the Users page in the IAM console to delete a * password for any IAM user. You can use ChangePassword to update, but not delete, your own password in the * My Security Credentials page in the Amazon Web Services Management Console. *

* *

* Deleting a user's password does not prevent a user from accessing Amazon Web Services through the command line * interface or the API. To prevent all user access, you must also either make any access keys inactive or delete * them. For more information about making keys inactive or deleting them, see UpdateAccessKey and * DeleteAccessKey. *

*
* * @param deleteLoginProfileRequest * @return A Java Future containing the result of the DeleteLoginProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • EntityTemporarilyUnmodifiableException The request was rejected because it referenced an entity that * is temporarily unmodifiable, such as a user name that was deleted and then recreated. The error indicates * that the request is likely to succeed if you try again after waiting several minutes. The error message * describes the entity.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteLoginProfile * @see AWS API * Documentation */ @Override public CompletableFuture deleteLoginProfile(DeleteLoginProfileRequest deleteLoginProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteLoginProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteLoginProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteLoginProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteLoginProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteLoginProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteLoginProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteLoginProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes an OpenID Connect identity provider (IdP) resource object in IAM. *

*

* Deleting an IAM OIDC provider resource does not update any roles that reference the provider as a principal in * their trust policies. Any attempt to assume a role that references a deleted provider fails. *

*

* This operation is idempotent; it does not fail or return an error if you call the operation for a provider that * does not exist. *

* * @param deleteOpenIdConnectProviderRequest * @return A Java Future containing the result of the DeleteOpenIDConnectProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteOpenIDConnectProvider * @see AWS API Documentation */ @Override public CompletableFuture deleteOpenIDConnectProvider( DeleteOpenIdConnectProviderRequest deleteOpenIdConnectProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteOpenIdConnectProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteOpenIdConnectProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteOpenIDConnectProvider"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteOpenIdConnectProviderResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteOpenIDConnectProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteOpenIdConnectProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteOpenIdConnectProviderRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified managed policy. *

*

* Before you can delete a managed policy, you must first detach the policy from all users, groups, and roles that * it is attached to. In addition, you must delete all the policy's versions. The following steps describe the * process for deleting a managed policy: *

*
    *
  • *

    * Detach the policy from all users, groups, and roles that the policy is attached to, using * DetachUserPolicy, DetachGroupPolicy, or DetachRolePolicy. To list all the users, groups, and * roles that a policy is attached to, use ListEntitiesForPolicy. *

    *
  • *
  • *

    * Delete all versions of the policy using DeletePolicyVersion. To list the policy's versions, use * ListPolicyVersions. You cannot use DeletePolicyVersion to delete the version that is marked as the * default version. You delete the policy's default version in the next step of the process. *

    *
  • *
  • *

    * Delete the policy (this automatically deletes the policy's default version) using this operation. *

    *
  • *
*

* For information about managed policies, see Managed policies and * inline policies in the IAM User Guide. *

* * @param deletePolicyRequest * @return A Java Future containing the result of the DeletePolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • DeleteConflictException The request was rejected because it attempted to delete a resource that has * attached subordinate entities. The error message describes these entities.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeletePolicy * @see AWS API * Documentation */ @Override public CompletableFuture deletePolicy(DeletePolicyRequest deletePolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deletePolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deletePolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeletePolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeletePolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeletePolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deletePolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified version from the specified managed policy. *

*

* You cannot delete the default version from a policy using this operation. To delete the default version from a * policy, use DeletePolicy. To find out which version of a policy is marked as the default version, use * ListPolicyVersions. *

*

* For information about versions for managed policies, see Versioning for managed * policies in the IAM User Guide. *

* * @param deletePolicyVersionRequest * @return A Java Future containing the result of the DeletePolicyVersion operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • DeleteConflictException The request was rejected because it attempted to delete a resource that has * attached subordinate entities. The error message describes these entities.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeletePolicyVersion * @see AWS API * Documentation */ @Override public CompletableFuture deletePolicyVersion( DeletePolicyVersionRequest deletePolicyVersionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deletePolicyVersionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deletePolicyVersionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePolicyVersion"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeletePolicyVersionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeletePolicyVersion").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeletePolicyVersionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deletePolicyVersionRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified role. Unlike the Amazon Web Services Management Console, when you delete a role * programmatically, you must delete the items attached to the role manually, or the deletion fails. For more * information, see Deleting an IAM role. Before attempting to delete a role, remove the following attached items: *

* * *

* Make sure that you do not have any Amazon EC2 instances running with the role you are about to delete. Deleting a * role or instance profile that is associated with a running instance will break any applications running on the * instance. *

*
* * @param deleteRoleRequest * @return A Java Future containing the result of the DeleteRole operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • DeleteConflictException The request was rejected because it attempted to delete a resource that has * attached subordinate entities. The error message describes these entities.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • UnmodifiableEntityException The request was rejected because service-linked roles are protected * Amazon Web Services resources. Only the service that depends on the service-linked role can modify or * delete the role on your behalf. The error message includes the name of the service that depends on this * service-linked role. You must request the change through that service.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteRole * @see AWS API * Documentation */ @Override public CompletableFuture deleteRole(DeleteRoleRequest deleteRoleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRoleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRoleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRole"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteRoleResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("DeleteRole") .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteRoleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteRoleRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the permissions boundary for the specified IAM role. *

*

* You cannot set the boundary for a service-linked role. *

* *

* Deleting the permissions boundary for a role might increase its permissions. For example, it might allow anyone * who assumes the role to perform all the actions granted in its permissions policies. *

*
* * @param deleteRolePermissionsBoundaryRequest * @return A Java Future containing the result of the DeleteRolePermissionsBoundary operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • UnmodifiableEntityException The request was rejected because service-linked roles are protected * Amazon Web Services resources. Only the service that depends on the service-linked role can modify or * delete the role on your behalf. The error message includes the name of the service that depends on this * service-linked role. You must request the change through that service.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteRolePermissionsBoundary * @see AWS API Documentation */ @Override public CompletableFuture deleteRolePermissionsBoundary( DeleteRolePermissionsBoundaryRequest deleteRolePermissionsBoundaryRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRolePermissionsBoundaryRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRolePermissionsBoundaryRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRolePermissionsBoundary"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteRolePermissionsBoundaryResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteRolePermissionsBoundary").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteRolePermissionsBoundaryRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteRolePermissionsBoundaryRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified inline policy that is embedded in the specified IAM role. *

*

* A role can also have managed policies attached to it. To detach a managed policy from a role, use * DetachRolePolicy. For more information about policies, refer to Managed policies and * inline policies in the IAM User Guide. *

* * @param deleteRolePolicyRequest * @return A Java Future containing the result of the DeleteRolePolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • UnmodifiableEntityException The request was rejected because service-linked roles are protected * Amazon Web Services resources. Only the service that depends on the service-linked role can modify or * delete the role on your behalf. The error message includes the name of the service that depends on this * service-linked role. You must request the change through that service.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteRolePolicy * @see AWS API * Documentation */ @Override public CompletableFuture deleteRolePolicy(DeleteRolePolicyRequest deleteRolePolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRolePolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRolePolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRolePolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteRolePolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteRolePolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteRolePolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteRolePolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a SAML provider resource in IAM. *

*

* Deleting the provider resource from IAM does not update any roles that reference the SAML provider resource's ARN * as a principal in their trust policies. Any attempt to assume a role that references a non-existent provider * resource ARN fails. *

* *

* This operation requires Signature Version 4. *

*
* * @param deleteSamlProviderRequest * @return A Java Future containing the result of the DeleteSAMLProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteSAMLProvider * @see AWS API * Documentation */ @Override public CompletableFuture deleteSAMLProvider(DeleteSamlProviderRequest deleteSamlProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSamlProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSamlProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSAMLProvider"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteSamlProviderResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteSAMLProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteSamlProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteSamlProviderRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified SSH public key. *

*

* The SSH public key deleted by this operation is used only for authenticating the associated IAM user to an * CodeCommit repository. For more information about using SSH keys to authenticate to an CodeCommit repository, see * Set up * CodeCommit for SSH connections in the CodeCommit User Guide. *

* * @param deleteSshPublicKeyRequest * @return A Java Future containing the result of the DeleteSSHPublicKey operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteSSHPublicKey * @see AWS API * Documentation */ @Override public CompletableFuture deleteSSHPublicKey(DeleteSshPublicKeyRequest deleteSshPublicKeyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSshPublicKeyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSshPublicKeyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSSHPublicKey"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteSshPublicKeyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteSSHPublicKey").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteSshPublicKeyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteSshPublicKeyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified server certificate. *

*

* For more information about working with server certificates, see Working with server * certificates in the IAM User Guide. This topic also includes a list of Amazon Web Services services * that can use the server certificates that you manage with IAM. *

* *

* If you are using a server certificate with Elastic Load Balancing, deleting the certificate could have * implications for your application. If Elastic Load Balancing doesn't detect the deletion of bound certificates, * it may continue to use the certificates. This could cause Elastic Load Balancing to stop accepting traffic. We * recommend that you remove the reference to the certificate from Elastic Load Balancing before using this command * to delete the certificate. For more information, see DeleteLoadBalancerListeners in the Elastic Load Balancing API Reference. *

*
* * @param deleteServerCertificateRequest * @return A Java Future containing the result of the DeleteServerCertificate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • DeleteConflictException The request was rejected because it attempted to delete a resource that has * attached subordinate entities. The error message describes these entities.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteServerCertificate * @see AWS * API Documentation */ @Override public CompletableFuture deleteServerCertificate( DeleteServerCertificateRequest deleteServerCertificateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteServerCertificateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteServerCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteServerCertificate"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteServerCertificateResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteServerCertificate").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteServerCertificateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteServerCertificateRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Submits a service-linked role deletion request and returns a DeletionTaskId, which you can use to * check the status of the deletion. Before you call this operation, confirm that the role has no active sessions * and that any resources used by the role in the linked service are deleted. If you call this operation more than * once for the same service-linked role and an earlier deletion task is not complete, then the * DeletionTaskId of the earlier request is returned. *

*

* If you submit a deletion request for a service-linked role whose linked service is still accessing a resource, * then the deletion task fails. If it fails, the GetServiceLinkedRoleDeletionStatus operation returns the * reason for the failure, usually including the resources that must be deleted. To delete the service-linked role, * you must first remove those resources from the linked service and then submit the deletion request again. * Resources are specific to the service that is linked to the role. For more information about removing resources * from a service, see the Amazon Web Services documentation for your * service. *

*

* For more information about service-linked roles, see Roles terms and concepts: Amazon Web Services service-linked role in the IAM User Guide. *

* * @param deleteServiceLinkedRoleRequest * @return A Java Future containing the result of the DeleteServiceLinkedRole operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteServiceLinkedRole * @see AWS * API Documentation */ @Override public CompletableFuture deleteServiceLinkedRole( DeleteServiceLinkedRoleRequest deleteServiceLinkedRoleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteServiceLinkedRoleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteServiceLinkedRoleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteServiceLinkedRole"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteServiceLinkedRoleResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteServiceLinkedRole").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteServiceLinkedRoleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteServiceLinkedRoleRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified service-specific credential. *

* * @param deleteServiceSpecificCredentialRequest * @return A Java Future containing the result of the DeleteServiceSpecificCredential operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteServiceSpecificCredential * @see AWS API Documentation */ @Override public CompletableFuture deleteServiceSpecificCredential( DeleteServiceSpecificCredentialRequest deleteServiceSpecificCredentialRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteServiceSpecificCredentialRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteServiceSpecificCredentialRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteServiceSpecificCredential"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteServiceSpecificCredentialResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteServiceSpecificCredential").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteServiceSpecificCredentialRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteServiceSpecificCredentialRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a signing certificate associated with the specified IAM user. *

*

* If you do not specify a user name, IAM determines the user name implicitly based on the Amazon Web Services * access key ID signing the request. This operation works for access keys under the Amazon Web Services account. * Consequently, you can use this operation to manage Amazon Web Services account root user credentials even if the * Amazon Web Services account has no associated IAM users. *

* * @param deleteSigningCertificateRequest * @return A Java Future containing the result of the DeleteSigningCertificate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteSigningCertificate * @see AWS * API Documentation */ @Override public CompletableFuture deleteSigningCertificate( DeleteSigningCertificateRequest deleteSigningCertificateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSigningCertificateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSigningCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSigningCertificate"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteSigningCertificateResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteSigningCertificate").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteSigningCertificateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteSigningCertificateRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified IAM user. Unlike the Amazon Web Services Management Console, when you delete a user * programmatically, you must delete the items attached to the user manually, or the deletion fails. For more * information, see Deleting an * IAM user. Before attempting to delete a user, remove the following items: *

* * * @param deleteUserRequest * @return A Java Future containing the result of the DeleteUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • DeleteConflictException The request was rejected because it attempted to delete a resource that has * attached subordinate entities. The error message describes these entities.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteUser * @see AWS API * Documentation */ @Override public CompletableFuture deleteUser(DeleteUserRequest deleteUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteUser"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteUserResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("DeleteUser") .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteUserRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the permissions boundary for the specified IAM user. *

* *

* Deleting the permissions boundary for a user might increase its permissions by allowing the user to perform all * the actions granted in its permissions policies. *

*
* * @param deleteUserPermissionsBoundaryRequest * @return A Java Future containing the result of the DeleteUserPermissionsBoundary operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteUserPermissionsBoundary * @see AWS API Documentation */ @Override public CompletableFuture deleteUserPermissionsBoundary( DeleteUserPermissionsBoundaryRequest deleteUserPermissionsBoundaryRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteUserPermissionsBoundaryRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteUserPermissionsBoundaryRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteUserPermissionsBoundary"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteUserPermissionsBoundaryResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteUserPermissionsBoundary").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteUserPermissionsBoundaryRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteUserPermissionsBoundaryRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified inline policy that is embedded in the specified IAM user. *

*

* A user can also have managed policies attached to it. To detach a managed policy from a user, use * DetachUserPolicy. For more information about policies, refer to Managed policies and * inline policies in the IAM User Guide. *

* * @param deleteUserPolicyRequest * @return A Java Future containing the result of the DeleteUserPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteUserPolicy * @see AWS API * Documentation */ @Override public CompletableFuture deleteUserPolicy(DeleteUserPolicyRequest deleteUserPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteUserPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteUserPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteUserPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteUserPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteUserPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteUserPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteUserPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a virtual MFA device. *

* *

* You must deactivate a user's virtual MFA device before you can delete it. For information about deactivating MFA * devices, see DeactivateMFADevice. *

*
* * @param deleteVirtualMfaDeviceRequest * @return A Java Future containing the result of the DeleteVirtualMFADevice operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • DeleteConflictException The request was rejected because it attempted to delete a resource that has * attached subordinate entities. The error message describes these entities.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DeleteVirtualMFADevice * @see AWS * API Documentation */ @Override public CompletableFuture deleteVirtualMFADevice( DeleteVirtualMfaDeviceRequest deleteVirtualMfaDeviceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteVirtualMfaDeviceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteVirtualMfaDeviceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteVirtualMFADevice"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteVirtualMfaDeviceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteVirtualMFADevice").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteVirtualMfaDeviceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteVirtualMfaDeviceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified managed policy from the specified IAM group. *

*

* A group can also have inline policies embedded with it. To delete an inline policy, use DeleteGroupPolicy. * For information about policies, see Managed policies and * inline policies in the IAM User Guide. *

* * @param detachGroupPolicyRequest * @return A Java Future containing the result of the DetachGroupPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DetachGroupPolicy * @see AWS API * Documentation */ @Override public CompletableFuture detachGroupPolicy(DetachGroupPolicyRequest detachGroupPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(detachGroupPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, detachGroupPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DetachGroupPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DetachGroupPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DetachGroupPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new DetachGroupPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(detachGroupPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified managed policy from the specified role. *

*

* A role can also have inline policies embedded with it. To delete an inline policy, use DeleteRolePolicy. * For information about policies, see Managed policies and * inline policies in the IAM User Guide. *

* * @param detachRolePolicyRequest * @return A Java Future containing the result of the DetachRolePolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • UnmodifiableEntityException The request was rejected because service-linked roles are protected * Amazon Web Services resources. Only the service that depends on the service-linked role can modify or * delete the role on your behalf. The error message includes the name of the service that depends on this * service-linked role. You must request the change through that service.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DetachRolePolicy * @see AWS API * Documentation */ @Override public CompletableFuture detachRolePolicy(DetachRolePolicyRequest detachRolePolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(detachRolePolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, detachRolePolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DetachRolePolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DetachRolePolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DetachRolePolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new DetachRolePolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(detachRolePolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified managed policy from the specified user. *

*

* A user can also have inline policies embedded with it. To delete an inline policy, use DeleteUserPolicy. * For information about policies, see Managed policies and * inline policies in the IAM User Guide. *

* * @param detachUserPolicyRequest * @return A Java Future containing the result of the DetachUserPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DetachUserPolicy * @see AWS API * Documentation */ @Override public CompletableFuture detachUserPolicy(DetachUserPolicyRequest detachUserPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(detachUserPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, detachUserPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DetachUserPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DetachUserPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DetachUserPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new DetachUserPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(detachUserPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Disables the management of privileged root user credentials across member accounts in your organization. When you * disable this feature, the management account and the delegated admininstrator for IAM can no longer manage root * user credentials for member accounts in your organization. *

* * @param disableOrganizationsRootCredentialsManagementRequest * @return A Java Future containing the result of the DisableOrganizationsRootCredentialsManagement operation * returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceAccessNotEnabledException The request was rejected because trusted access is not enabled for * IAM in Organizations. For details, see IAM and Organizations in the Organizations User Guide.
  • *
  • AccountNotManagementOrDelegatedAdministratorException The request was rejected because the account * making the request is not the management account or delegated administrator account for centralized root access.
  • *
  • OrganizationNotFoundException The request was rejected because no organization is associated with * your account.
  • *
  • OrganizationNotInAllFeaturesModeException The request was rejected because your organization does not * have All features enabled. For more information, see Available feature sets in the Organizations User Guide.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DisableOrganizationsRootCredentialsManagement * @see AWS API Documentation */ @Override public CompletableFuture disableOrganizationsRootCredentialsManagement( DisableOrganizationsRootCredentialsManagementRequest disableOrganizationsRootCredentialsManagementRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( disableOrganizationsRootCredentialsManagementRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disableOrganizationsRootCredentialsManagementRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisableOrganizationsRootCredentialsManagement"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DisableOrganizationsRootCredentialsManagementResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisableOrganizationsRootCredentialsManagement") .withProtocolMetadata(protocolMetadata) .withMarshaller(new DisableOrganizationsRootCredentialsManagementRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disableOrganizationsRootCredentialsManagementRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Disables root user sessions for privileged tasks across member accounts in your organization. When you disable * this feature, the management account and the delegated admininstrator for IAM can no longer perform privileged * tasks on member accounts in your organization. *

* * @param disableOrganizationsRootSessionsRequest * @return A Java Future containing the result of the DisableOrganizationsRootSessions operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceAccessNotEnabledException The request was rejected because trusted access is not enabled for * IAM in Organizations. For details, see IAM and Organizations in the Organizations User Guide.
  • *
  • AccountNotManagementOrDelegatedAdministratorException The request was rejected because the account * making the request is not the management account or delegated administrator account for centralized root access.
  • *
  • OrganizationNotFoundException The request was rejected because no organization is associated with * your account.
  • *
  • OrganizationNotInAllFeaturesModeException The request was rejected because your organization does not * have All features enabled. For more information, see Available feature sets in the Organizations User Guide.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.DisableOrganizationsRootSessions * @see AWS API Documentation */ @Override public CompletableFuture disableOrganizationsRootSessions( DisableOrganizationsRootSessionsRequest disableOrganizationsRootSessionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disableOrganizationsRootSessionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disableOrganizationsRootSessionsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisableOrganizationsRootSessions"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DisableOrganizationsRootSessionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisableOrganizationsRootSessions").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisableOrganizationsRootSessionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disableOrganizationsRootSessionsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Enables the specified MFA device and associates it with the specified IAM user. When enabled, the MFA device is * required for every subsequent login by the IAM user associated with the device. *

* * @param enableMfaDeviceRequest * @return A Java Future containing the result of the EnableMFADevice operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • EntityTemporarilyUnmodifiableException The request was rejected because it referenced an entity that * is temporarily unmodifiable, such as a user name that was deleted and then recreated. The error indicates * that the request is likely to succeed if you try again after waiting several minutes. The error message * describes the entity.
  • *
  • InvalidAuthenticationCodeException The request was rejected because the authentication code was not * recognized. The error message describes the specific error.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.EnableMFADevice * @see AWS API * Documentation */ @Override public CompletableFuture enableMFADevice(EnableMfaDeviceRequest enableMfaDeviceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(enableMfaDeviceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, enableMfaDeviceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "EnableMFADevice"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(EnableMfaDeviceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("EnableMFADevice").withProtocolMetadata(protocolMetadata) .withMarshaller(new EnableMfaDeviceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(enableMfaDeviceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Enables the management of privileged root user credentials across member accounts in your organization. When you * enable root credentials management for centralized root access, the management account and the delegated admininstrator for IAM can manage root * user credentials for member accounts in your organization. *

*

* Before you enable centralized root access, you must have an account configured with the following settings: *

*
    *
  • *

    * You must manage your Amazon Web Services accounts in Organizations. *

    *
  • *
  • *

    * Enable trusted access for Identity and Access Management in Organizations. For details, see IAM and * Organizations in the Organizations User Guide. *

    *
  • *
* * @param enableOrganizationsRootCredentialsManagementRequest * @return A Java Future containing the result of the EnableOrganizationsRootCredentialsManagement operation * returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceAccessNotEnabledException The request was rejected because trusted access is not enabled for * IAM in Organizations. For details, see IAM and Organizations in the Organizations User Guide.
  • *
  • AccountNotManagementOrDelegatedAdministratorException The request was rejected because the account * making the request is not the management account or delegated administrator account for centralized root access.
  • *
  • OrganizationNotFoundException The request was rejected because no organization is associated with * your account.
  • *
  • OrganizationNotInAllFeaturesModeException The request was rejected because your organization does not * have All features enabled. For more information, see Available feature sets in the Organizations User Guide.
  • *
  • CallerIsNotManagementAccountException The request was rejected because the account making the request * is not the management account for the organization.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.EnableOrganizationsRootCredentialsManagement * @see AWS API Documentation */ @Override public CompletableFuture enableOrganizationsRootCredentialsManagement( EnableOrganizationsRootCredentialsManagementRequest enableOrganizationsRootCredentialsManagementRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( enableOrganizationsRootCredentialsManagementRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, enableOrganizationsRootCredentialsManagementRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "EnableOrganizationsRootCredentialsManagement"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(EnableOrganizationsRootCredentialsManagementResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("EnableOrganizationsRootCredentialsManagement") .withProtocolMetadata(protocolMetadata) .withMarshaller(new EnableOrganizationsRootCredentialsManagementRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(enableOrganizationsRootCredentialsManagementRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Allows the management account or delegated administrator to perform privileged tasks on member accounts in your * organization. For more information, see Centrally manage root access for member accounts in the Identity and Access Management User Guide. *

*

* Before you enable this feature, you must have an account configured with the following settings: *

*
    *
  • *

    * You must manage your Amazon Web Services accounts in Organizations. *

    *
  • *
  • *

    * Enable trusted access for Identity and Access Management in Organizations. For details, see IAM and * Organizations in the Organizations User Guide. *

    *
  • *
* * @param enableOrganizationsRootSessionsRequest * @return A Java Future containing the result of the EnableOrganizationsRootSessions operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceAccessNotEnabledException The request was rejected because trusted access is not enabled for * IAM in Organizations. For details, see IAM and Organizations in the Organizations User Guide.
  • *
  • AccountNotManagementOrDelegatedAdministratorException The request was rejected because the account * making the request is not the management account or delegated administrator account for centralized root access.
  • *
  • OrganizationNotFoundException The request was rejected because no organization is associated with * your account.
  • *
  • OrganizationNotInAllFeaturesModeException The request was rejected because your organization does not * have All features enabled. For more information, see Available feature sets in the Organizations User Guide.
  • *
  • CallerIsNotManagementAccountException The request was rejected because the account making the request * is not the management account for the organization.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.EnableOrganizationsRootSessions * @see AWS API Documentation */ @Override public CompletableFuture enableOrganizationsRootSessions( EnableOrganizationsRootSessionsRequest enableOrganizationsRootSessionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(enableOrganizationsRootSessionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, enableOrganizationsRootSessionsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "EnableOrganizationsRootSessions"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(EnableOrganizationsRootSessionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("EnableOrganizationsRootSessions").withProtocolMetadata(protocolMetadata) .withMarshaller(new EnableOrganizationsRootSessionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(enableOrganizationsRootSessionsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Generates a credential report for the Amazon Web Services account. For more information about the credential * report, see Getting credential * reports in the IAM User Guide. *

* * @param generateCredentialReportRequest * @return A Java Future containing the result of the GenerateCredentialReport operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GenerateCredentialReport * @see AWS * API Documentation */ @Override public CompletableFuture generateCredentialReport( GenerateCredentialReportRequest generateCredentialReportRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(generateCredentialReportRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, generateCredentialReportRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GenerateCredentialReport"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GenerateCredentialReportResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GenerateCredentialReport").withProtocolMetadata(protocolMetadata) .withMarshaller(new GenerateCredentialReportRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(generateCredentialReportRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Generates a report for service last accessed data for Organizations. You can generate a report for any entities * (organization root, organizational unit, or account) or policies in your organization. *

*

* To call this operation, you must be signed in using your Organizations management account credentials. You can * use your long-term IAM user or root user credentials, or temporary credentials from assuming an IAM role. SCPs * must be enabled for your organization root. You must have the required IAM and Organizations permissions. For * more information, see Refining permissions * using service last accessed data in the IAM User Guide. *

*

* You can generate a service last accessed data report for entities by specifying only the entity's path. This data * includes a list of services that are allowed by any service control policies (SCPs) that apply to the entity. *

*

* You can generate a service last accessed data report for a policy by specifying an entity's path and an optional * Organizations policy ID. This data includes a list of services that are allowed by the specified SCP. *

*

* For each service in both report types, the data includes the most recent account activity that the policy allows * to account principals in the entity or the entity's children. For important information about the data, reporting * period, permissions required, troubleshooting, and supported Regions see Reducing permissions * using service last accessed data in the IAM User Guide. *

* *

* The data includes all attempts to access Amazon Web Services, not just the successful ones. This includes all * attempts that were made using the Amazon Web Services Management Console, the Amazon Web Services API through any * of the SDKs, or any of the command line tools. An unexpected entry in the service last accessed data does not * mean that an account has been compromised, because the request might have been denied. Refer to your CloudTrail * logs as the authoritative source for information about all API calls and whether they were successful or denied * access. For more information, see Logging IAM events with * CloudTrail in the IAM User Guide. *

*
*

* This operation returns a JobId. Use this parameter in the * GetOrganizationsAccessReport operation to check the status of the report generation. To * check the status of this request, use the JobId parameter in the * GetOrganizationsAccessReport operation and test the JobStatus response * parameter. When the job is complete, you can retrieve the report. *

*

* To generate a service last accessed data report for entities, specify an entity path without specifying the * optional Organizations policy ID. The type of entity that you specify determines the data returned in the report. *

*
    *
  • *

    * Root – When you specify the organizations root as the entity, the resulting report lists all of the * services allowed by SCPs that are attached to your root. For each service, the report includes data for all * accounts in your organization except the management account, because the management account is not limited by * SCPs. *

    *
  • *
  • *

    * OU – When you specify an organizational unit (OU) as the entity, the resulting report lists all of the * services allowed by SCPs that are attached to the OU and its parents. For each service, the report includes data * for all accounts in the OU or its children. This data excludes the management account, because the management * account is not limited by SCPs. *

    *
  • *
  • *

    * management account – When you specify the management account, the resulting report lists all Amazon Web * Services services, because the management account is not limited by SCPs. For each service, the report includes * data for only the management account. *

    *
  • *
  • *

    * Account – When you specify another account as the entity, the resulting report lists all of the services * allowed by SCPs that are attached to the account and its parents. For each service, the report includes data for * only the specified account. *

    *
  • *
*

* To generate a service last accessed data report for policies, specify an entity path and the optional * Organizations policy ID. The type of entity that you specify determines the data returned for each service. *

*
    *
  • *

    * Root – When you specify the root entity and a policy ID, the resulting report lists all of the services * that are allowed by the specified SCP. For each service, the report includes data for all accounts in your * organization to which the SCP applies. This data excludes the management account, because the management account * is not limited by SCPs. If the SCP is not attached to any entities in the organization, then the report will * return a list of services with no data. *

    *
  • *
  • *

    * OU – When you specify an OU entity and a policy ID, the resulting report lists all of the services that * are allowed by the specified SCP. For each service, the report includes data for all accounts in the OU or its * children to which the SCP applies. This means that other accounts outside the OU that are affected by the SCP * might not be included in the data. This data excludes the management account, because the management account is * not limited by SCPs. If the SCP is not attached to the OU or one of its children, the report will return a list * of services with no data. *

    *
  • *
  • *

    * management account – When you specify the management account, the resulting report lists all Amazon Web * Services services, because the management account is not limited by SCPs. If you specify a policy ID in the CLI * or API, the policy is ignored. For each service, the report includes data for only the management account. *

    *
  • *
  • *

    * Account – When you specify another account entity and a policy ID, the resulting report lists all of the * services that are allowed by the specified SCP. For each service, the report includes data for only the specified * account. This means that other accounts in the organization that are affected by the SCP might not be included in * the data. If the SCP is not attached to the account, the report will return a list of services with no data. *

    *
  • *
* *

* Service last accessed data does not use other policy types when determining whether a principal could access a * service. These other policy types include identity-based policies, resource-based policies, access control lists, * IAM permissions boundaries, and STS assume role policies. It only applies SCP logic. For more about the * evaluation of policy types, see Evaluating policies in the IAM User Guide. *

*
*

* For more information about service last accessed data, see Reducing policy scope * by viewing user activity in the IAM User Guide. *

* * @param generateOrganizationsAccessReportRequest * @return A Java Future containing the result of the GenerateOrganizationsAccessReport operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ReportGenerationLimitExceededException The request failed because the maximum number of concurrent * requests for this account are already running.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GenerateOrganizationsAccessReport * @see AWS API Documentation */ @Override public CompletableFuture generateOrganizationsAccessReport( GenerateOrganizationsAccessReportRequest generateOrganizationsAccessReportRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(generateOrganizationsAccessReportRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, generateOrganizationsAccessReportRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GenerateOrganizationsAccessReport"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GenerateOrganizationsAccessReportResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GenerateOrganizationsAccessReport").withProtocolMetadata(protocolMetadata) .withMarshaller(new GenerateOrganizationsAccessReportRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(generateOrganizationsAccessReportRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Generates a report that includes details about when an IAM resource (user, group, role, or policy) was last used * in an attempt to access Amazon Web Services services. Recent activity usually appears within four hours. IAM * reports activity for at least the last 400 days, or less if your Region began supporting this feature within the * last year. For more information, see Regions where data is tracked. For more information about services and actions for which action last * accessed information is displayed, see IAM * action last accessed information services and actions. *

* *

* The service last accessed data includes all attempts to access an Amazon Web Services API, not just the * successful ones. This includes all attempts that were made using the Amazon Web Services Management Console, the * Amazon Web Services API through any of the SDKs, or any of the command line tools. An unexpected entry in the * service last accessed data does not mean that your account has been compromised, because the request might have * been denied. Refer to your CloudTrail logs as the authoritative source for information about all API calls and * whether they were successful or denied access. For more information, see Logging IAM events with * CloudTrail in the IAM User Guide. *

*
*

* The GenerateServiceLastAccessedDetails operation returns a JobId. Use this parameter in * the following operations to retrieve the following details from your report: *

*
    *
  • *

    * GetServiceLastAccessedDetails – Use this operation for users, groups, roles, or policies to list every * Amazon Web Services 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 Amazon Web Services service. *

    *
  • *
*

* To check the status of the GenerateServiceLastAccessedDetails request, use the JobId * parameter in the same operations and test the JobStatus response parameter. *

*

* For additional information about the permissions policies that allow an identity (user, group, or role) to access * specific services, use the ListPoliciesGrantingServiceAccess operation. *

* *

* Service last accessed data does not use other policy types when determining whether a resource could access a * service. These other policy types include resource-based policies, access control lists, Organizations policies, * IAM permissions boundaries, and STS assume role policies. It only applies permissions policy logic. For more * about the evaluation of policy types, see Evaluating policies in the IAM User Guide. *

*
*

* For more information about service and action last accessed data, see Reducing permissions * using service last accessed data in the IAM User Guide. *

* * @param generateServiceLastAccessedDetailsRequest * @return A Java Future containing the result of the GenerateServiceLastAccessedDetails operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GenerateServiceLastAccessedDetails * @see AWS API Documentation */ @Override public CompletableFuture generateServiceLastAccessedDetails( GenerateServiceLastAccessedDetailsRequest generateServiceLastAccessedDetailsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(generateServiceLastAccessedDetailsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, generateServiceLastAccessedDetailsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GenerateServiceLastAccessedDetails"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GenerateServiceLastAccessedDetailsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GenerateServiceLastAccessedDetails").withProtocolMetadata(protocolMetadata) .withMarshaller(new GenerateServiceLastAccessedDetailsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(generateServiceLastAccessedDetailsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about when the specified access key was last used. The information includes the date and * time of last use, along with the Amazon Web Services service and Region that were specified in the last request * made with that key. *

* * @param getAccessKeyLastUsedRequest * @return A Java Future containing the result of the GetAccessKeyLastUsed operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetAccessKeyLastUsed * @see AWS API * Documentation */ @Override public CompletableFuture getAccessKeyLastUsed( GetAccessKeyLastUsedRequest getAccessKeyLastUsedRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccessKeyLastUsedRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccessKeyLastUsedRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccessKeyLastUsed"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetAccessKeyLastUsedResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccessKeyLastUsed").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccessKeyLastUsedRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getAccessKeyLastUsedRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about all IAM users, groups, roles, and policies in your Amazon Web Services account, * including their relationships to one another. Use this operation to obtain a snapshot of the configuration of IAM * permissions (users, groups, roles, and policies) in your account. *

* *

* Policies returned by this operation are URL-encoded compliant with RFC 3986. You can use a URL decoding method to convert the policy * back to plain JSON text. For example, if you use Java, you can use the decode method of the * java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs provide similar * functionality. *

*
*

* You can optionally filter the results using the Filter parameter. You can paginate the results using * the MaxItems and Marker parameters. *

* * @param getAccountAuthorizationDetailsRequest * @return A Java Future containing the result of the GetAccountAuthorizationDetails operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetAccountAuthorizationDetails * @see AWS API Documentation */ @Override public CompletableFuture getAccountAuthorizationDetails( GetAccountAuthorizationDetailsRequest getAccountAuthorizationDetailsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccountAuthorizationDetailsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccountAuthorizationDetailsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccountAuthorizationDetails"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetAccountAuthorizationDetailsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccountAuthorizationDetails").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccountAuthorizationDetailsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getAccountAuthorizationDetailsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the password policy for the Amazon Web Services account. This tells you the complexity requirements and * mandatory rotation periods for the IAM user passwords in your account. For more information about using a * password policy, see Managing an IAM * password policy. *

* * @param getAccountPasswordPolicyRequest * @return A Java Future containing the result of the GetAccountPasswordPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetAccountPasswordPolicy * @see AWS * API Documentation */ @Override public CompletableFuture getAccountPasswordPolicy( GetAccountPasswordPolicyRequest getAccountPasswordPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccountPasswordPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccountPasswordPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccountPasswordPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetAccountPasswordPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccountPasswordPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccountPasswordPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getAccountPasswordPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about IAM entity usage and IAM quotas in the Amazon Web Services account. *

*

* For information about IAM quotas, see IAM and STS quotas in the * IAM User Guide. *

* * @param getAccountSummaryRequest * @return A Java Future containing the result of the GetAccountSummary operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetAccountSummary * @see AWS API * Documentation */ @Override public CompletableFuture getAccountSummary(GetAccountSummaryRequest getAccountSummaryRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccountSummaryRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccountSummaryRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccountSummary"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetAccountSummaryResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccountSummary").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccountSummaryRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getAccountSummaryRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Gets a list of all of the context keys referenced in the input policies. The policies are supplied as a list of * one or more strings. To get the context keys from policies associated with an IAM user, group, or role, use * GetContextKeysForPrincipalPolicy. *

*

* Context keys are variables maintained by Amazon Web Services and its services that provide details about the * context of an API query request. Context keys can be evaluated by testing against a value specified in an IAM * policy. Use GetContextKeysForCustomPolicy to understand what key names and values you must supply * when you call SimulateCustomPolicy. Note that all parameters are shown in unencoded form here for clarity * but must be URL encoded to be included as a part of a real HTML request. *

* * @param getContextKeysForCustomPolicyRequest * @return A Java Future containing the result of the GetContextKeysForCustomPolicy operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetContextKeysForCustomPolicy * @see AWS API Documentation */ @Override public CompletableFuture getContextKeysForCustomPolicy( GetContextKeysForCustomPolicyRequest getContextKeysForCustomPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getContextKeysForCustomPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getContextKeysForCustomPolicyRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetContextKeysForCustomPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetContextKeysForCustomPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetContextKeysForCustomPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetContextKeysForCustomPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getContextKeysForCustomPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Gets a list of all of the context keys referenced in all the IAM policies that are attached to the specified IAM * entity. The entity can be an IAM user, group, or role. If you specify a user, then the request also includes all * of the policies attached to groups that the user is a member of. *

*

* You can optionally include a list of one or more additional policies, specified as strings. If you want to * include only a list of policies by string, use GetContextKeysForCustomPolicy instead. *

*

* Note: This operation discloses information about the permissions granted to other users. If you do not * want users to see other user's permissions, then consider allowing them to use * GetContextKeysForCustomPolicy instead. *

*

* Context keys are variables maintained by Amazon Web Services and its services that provide details about the * context of an API query request. Context keys can be evaluated by testing against a value in an IAM policy. Use * GetContextKeysForPrincipalPolicy to understand what key names and values you must supply when you call * SimulatePrincipalPolicy. *

* * @param getContextKeysForPrincipalPolicyRequest * @return A Java Future containing the result of the GetContextKeysForPrincipalPolicy operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetContextKeysForPrincipalPolicy * @see AWS API Documentation */ @Override public CompletableFuture getContextKeysForPrincipalPolicy( GetContextKeysForPrincipalPolicyRequest getContextKeysForPrincipalPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getContextKeysForPrincipalPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getContextKeysForPrincipalPolicyRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetContextKeysForPrincipalPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetContextKeysForPrincipalPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetContextKeysForPrincipalPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetContextKeysForPrincipalPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getContextKeysForPrincipalPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves a credential report for the Amazon Web Services account. For more information about the credential * report, see Getting credential * reports in the IAM User Guide. *

* * @param getCredentialReportRequest * @return A Java Future containing the result of the GetCredentialReport operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • CredentialReportNotPresentException The request was rejected because the credential report does not * exist. To generate a credential report, use GenerateCredentialReport.
  • *
  • CredentialReportExpiredException The request was rejected because the most recent credential report * has expired. To generate a new credential report, use GenerateCredentialReport. For more * information about credential report expiration, see Getting credential * reports in the IAM User Guide.
  • *
  • CredentialReportNotReadyException The request was rejected because the credential report is still * being generated.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetCredentialReport * @see AWS API * Documentation */ @Override public CompletableFuture getCredentialReport( GetCredentialReportRequest getCredentialReportRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCredentialReportRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getCredentialReportRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCredentialReport"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetCredentialReportResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetCredentialReport").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetCredentialReportRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getCredentialReportRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of IAM users that are in the specified IAM group. You can paginate the results using the * MaxItems and Marker parameters. *

* * @param getGroupRequest * @return A Java Future containing the result of the GetGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetGroup * @see AWS API * Documentation */ @Override public CompletableFuture getGroup(GetGroupRequest getGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetGroup") .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetGroupRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withMetricCollector(apiCallMetricCollector).withInput(getGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the specified inline policy document that is embedded in the specified IAM group. *

* *

* Policies returned by this operation are URL-encoded compliant with RFC 3986. You can use a URL decoding method to convert the policy * back to plain JSON text. For example, if you use Java, you can use the decode method of the * java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs provide similar * functionality. *

*
*

* An IAM group can also have managed policies attached to it. To retrieve a managed policy document that is * attached to a group, use GetPolicy to determine the policy's default version, then use * GetPolicyVersion to retrieve the policy document. *

*

* For more information about policies, see Managed policies and * inline policies in the IAM User Guide. *

* * @param getGroupPolicyRequest * @return A Java Future containing the result of the GetGroupPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetGroupPolicy * @see AWS API * Documentation */ @Override public CompletableFuture getGroupPolicy(GetGroupPolicyRequest getGroupPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getGroupPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getGroupPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetGroupPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetGroupPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetGroupPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetGroupPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getGroupPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about the specified instance profile, including the instance profile's path, GUID, ARN, and * role. For more information about instance profiles, see Using * instance profiles in the IAM User Guide. *

* * @param getInstanceProfileRequest * @return A Java Future containing the result of the GetInstanceProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetInstanceProfile * @see AWS API * Documentation */ @Override public CompletableFuture getInstanceProfile(GetInstanceProfileRequest getInstanceProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getInstanceProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getInstanceProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetInstanceProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetInstanceProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetInstanceProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetInstanceProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getInstanceProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the user name for the specified IAM user. A login profile is created when you create a password for the * user to access the Amazon Web Services Management Console. If the user does not exist or does not have a * password, the operation returns a 404 (NoSuchEntity) error. *

*

* If you create an IAM user with access to the console, the CreateDate reflects the date you created * the initial password for the user. *

*

* If you create an IAM user with programmatic access, and then later add a password for the user to access the * Amazon Web Services Management Console, the CreateDate reflects the initial password creation date. * A user with programmatic access does not have a login profile unless you create a password for the user to access * the Amazon Web Services Management Console. *

* * @param getLoginProfileRequest * @return A Java Future containing the result of the GetLoginProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetLoginProfile * @see AWS API * Documentation */ @Override public CompletableFuture getLoginProfile(GetLoginProfileRequest getLoginProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getLoginProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getLoginProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetLoginProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetLoginProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetLoginProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetLoginProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getLoginProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about an MFA device for a specified user. *

* * @param getMfaDeviceRequest * @return A Java Future containing the result of the GetMFADevice operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetMFADevice * @see AWS API * Documentation */ @Override public CompletableFuture getMFADevice(GetMfaDeviceRequest getMfaDeviceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getMfaDeviceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getMfaDeviceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetMFADevice"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetMfaDeviceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetMFADevice").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetMfaDeviceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getMfaDeviceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the specified OpenID Connect (OIDC) provider resource object in IAM. *

* * @param getOpenIdConnectProviderRequest * @return A Java Future containing the result of the GetOpenIDConnectProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetOpenIDConnectProvider * @see AWS * API Documentation */ @Override public CompletableFuture getOpenIDConnectProvider( GetOpenIdConnectProviderRequest getOpenIdConnectProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getOpenIdConnectProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getOpenIdConnectProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetOpenIDConnectProvider"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetOpenIdConnectProviderResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetOpenIDConnectProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetOpenIdConnectProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getOpenIdConnectProviderRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the service last accessed data report for Organizations that was previously generated using the * GenerateOrganizationsAccessReport operation. This operation retrieves the status of your * report job and the report contents. *

*

* Depending on the parameters that you passed when you generated the report, the data returned could include * different information. For details, see GenerateOrganizationsAccessReport. *

*

* To call this operation, you must be signed in to the management account in your organization. SCPs must be * enabled for your organization root. You must have permissions to perform this operation. For more information, * see Refining * permissions using service last accessed data in the IAM User Guide. *

*

* For each service that principals in an account (root user, IAM users, or IAM roles) could access using SCPs, the * operation returns details about the most recent access attempt. If there was no attempt, the service is listed * without details about the most recent attempt to access the service. If the operation fails, it returns the * reason that it failed. *

*

* By default, the list is sorted by service namespace. *

* * @param getOrganizationsAccessReportRequest * @return A Java Future containing the result of the GetOrganizationsAccessReport operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetOrganizationsAccessReport * @see AWS API Documentation */ @Override public CompletableFuture getOrganizationsAccessReport( GetOrganizationsAccessReportRequest getOrganizationsAccessReportRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getOrganizationsAccessReportRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getOrganizationsAccessReportRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetOrganizationsAccessReport"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetOrganizationsAccessReportResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetOrganizationsAccessReport").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetOrganizationsAccessReportRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getOrganizationsAccessReportRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about the specified managed policy, including the policy's default version and the total * number of IAM users, groups, and roles to which the policy is attached. To retrieve the list of the specific * users, groups, and roles that the policy is attached to, use ListEntitiesForPolicy. This operation returns * metadata about the policy. To retrieve the actual policy document for a specific version of the policy, use * GetPolicyVersion. *

*

* This operation retrieves information about managed policies. To retrieve information about an inline policy that * is embedded with an IAM user, group, or role, use GetUserPolicy, GetGroupPolicy, or * GetRolePolicy. *

*

* For more information about policies, see Managed policies and * inline policies in the IAM User Guide. *

* * @param getPolicyRequest * @return A Java Future containing the result of the GetPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetPolicy * @see AWS API * Documentation */ @Override public CompletableFuture getPolicy(GetPolicyRequest getPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetPolicy") .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetPolicyRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withMetricCollector(apiCallMetricCollector).withInput(getPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about the specified version of the specified managed policy, including the policy document. *

* *

* Policies returned by this operation are URL-encoded compliant with RFC 3986. You can use a URL decoding method to convert the policy * back to plain JSON text. For example, if you use Java, you can use the decode method of the * java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs provide similar * functionality. *

*
*

* To list the available versions for a policy, use ListPolicyVersions. *

*

* This operation retrieves information about managed policies. To retrieve information about an inline policy that * is embedded in a user, group, or role, use GetUserPolicy, GetGroupPolicy, or GetRolePolicy. *

*

* For more information about the types of policies, see Managed policies and * inline policies in the IAM User Guide. *

*

* For more information about managed policy versions, see Versioning for managed * policies in the IAM User Guide. *

* * @param getPolicyVersionRequest * @return A Java Future containing the result of the GetPolicyVersion operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetPolicyVersion * @see AWS API * Documentation */ @Override public CompletableFuture getPolicyVersion(GetPolicyVersionRequest getPolicyVersionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getPolicyVersionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getPolicyVersionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetPolicyVersion"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetPolicyVersionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetPolicyVersion").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetPolicyVersionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getPolicyVersionRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about the specified role, including the role's path, GUID, ARN, and the role's trust policy * that grants permission to assume the role. For more information about roles, see IAM roles in the IAM User Guide. *

* *

* Policies returned by this operation are URL-encoded compliant with RFC 3986. You can use a URL decoding method to convert the policy * back to plain JSON text. For example, if you use Java, you can use the decode method of the * java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs provide similar * functionality. *

*
* * @param getRoleRequest * @return A Java Future containing the result of the GetRole operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetRole * @see AWS API * Documentation */ @Override public CompletableFuture getRole(GetRoleRequest getRoleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getRoleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getRoleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetRole"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetRoleResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetRole") .withProtocolMetadata(protocolMetadata).withMarshaller(new GetRoleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getRoleRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the specified inline policy document that is embedded with the specified IAM role. *

* *

* Policies returned by this operation are URL-encoded compliant with RFC 3986. You can use a URL decoding method to convert the policy * back to plain JSON text. For example, if you use Java, you can use the decode method of the * java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs provide similar * functionality. *

*
*

* An IAM role can also have managed policies attached to it. To retrieve a managed policy document that is attached * to a role, use GetPolicy to determine the policy's default version, then use GetPolicyVersion to * retrieve the policy document. *

*

* For more information about policies, see Managed policies and * inline policies in the IAM User Guide. *

*

* For more information about roles, see IAM roles in the IAM User Guide. *

* * @param getRolePolicyRequest * @return A Java Future containing the result of the GetRolePolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetRolePolicy * @see AWS API * Documentation */ @Override public CompletableFuture getRolePolicy(GetRolePolicyRequest getRolePolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getRolePolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getRolePolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetRolePolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetRolePolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetRolePolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetRolePolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getRolePolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns the SAML provider metadocument that was uploaded when the IAM SAML provider resource object was created * or updated. *

* *

* This operation requires Signature Version 4. *

*
* * @param getSamlProviderRequest * @return A Java Future containing the result of the GetSAMLProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetSAMLProvider * @see AWS API * Documentation */ @Override public CompletableFuture getSAMLProvider(GetSamlProviderRequest getSamlProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getSamlProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getSamlProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetSAMLProvider"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetSamlProviderResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetSAMLProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetSamlProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getSamlProviderRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the specified SSH public key, including metadata about the key. *

*

* The SSH public key retrieved by this operation is used only for authenticating the associated IAM user to an * CodeCommit repository. For more information about using SSH keys to authenticate to an CodeCommit repository, see * Set up * CodeCommit for SSH connections in the CodeCommit User Guide. *

* * @param getSshPublicKeyRequest * @return A Java Future containing the result of the GetSSHPublicKey operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • UnrecognizedPublicKeyEncodingException The request was rejected because the public key encoding * format is unsupported or unrecognized.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetSSHPublicKey * @see AWS API * Documentation */ @Override public CompletableFuture getSSHPublicKey(GetSshPublicKeyRequest getSshPublicKeyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getSshPublicKeyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getSshPublicKeyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetSSHPublicKey"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetSshPublicKeyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetSSHPublicKey").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetSshPublicKeyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getSshPublicKeyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about the specified server certificate stored in IAM. *

*

* For more information about working with server certificates, see Working with server * certificates in the IAM User Guide. This topic includes a list of Amazon Web Services services that * can use the server certificates that you manage with IAM. *

* * @param getServerCertificateRequest * @return A Java Future containing the result of the GetServerCertificate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetServerCertificate * @see AWS API * Documentation */ @Override public CompletableFuture getServerCertificate( GetServerCertificateRequest getServerCertificateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getServerCertificateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getServerCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetServerCertificate"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetServerCertificateResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetServerCertificate").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetServerCertificateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getServerCertificateRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves a service last accessed report that was created using the * GenerateServiceLastAccessedDetails operation. You can use the JobId parameter in * GetServiceLastAccessedDetails to retrieve the status of your report job. When the report is * complete, you can retrieve the generated report. The report includes a list of Amazon Web Services services that * the resource (user, group, role, or managed policy) can access. *

* *

* Service last accessed data does not use other policy types when determining whether a resource could access a * service. These other policy types include resource-based policies, access control lists, Organizations policies, * IAM permissions boundaries, and STS assume role policies. It only applies permissions policy logic. For more * about the evaluation of policy types, see Evaluating policies in the IAM User Guide. *

*
*

* For each service that the resource could access using permissions policies, the operation returns details about * the most recent access attempt. If there was no attempt, the service is listed without details about the most * recent attempt to access the service. If the operation fails, the GetServiceLastAccessedDetails * operation returns the reason that it failed. *

*

* The GetServiceLastAccessedDetails operation returns a list of services. This list includes the * number of entities that have attempted to access the service and the date and time of the last attempt. It also * returns the ARN of the following entity, depending on the resource ARN that you used to generate the report: *

*
    *
  • *

    * User – Returns the user ARN that you used to generate the report *

    *
  • *
  • *

    * Group – Returns the ARN of the group member (user) that last attempted to access the service *

    *
  • *
  • *

    * Role – Returns the role ARN that you used to generate the report *

    *
  • *
  • *

    * Policy – Returns the ARN of the user or role that last used the policy to attempt to access the service *

    *
  • *
*

* By default, the list is sorted by service namespace. *

*

* If you specified ACTION_LEVEL granularity when you generated the report, this operation returns * service and action last accessed data. This includes the most recent access attempt for each tracked action * within a service. Otherwise, this operation returns only service data. *

*

* For more information about service and action last accessed data, see Reducing permissions * using service last accessed data in the IAM User Guide. *

* * @param getServiceLastAccessedDetailsRequest * @return A Java Future containing the result of the GetServiceLastAccessedDetails operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetServiceLastAccessedDetails * @see AWS API Documentation */ @Override public CompletableFuture getServiceLastAccessedDetails( GetServiceLastAccessedDetailsRequest getServiceLastAccessedDetailsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getServiceLastAccessedDetailsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getServiceLastAccessedDetailsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetServiceLastAccessedDetails"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetServiceLastAccessedDetailsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetServiceLastAccessedDetails").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetServiceLastAccessedDetailsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getServiceLastAccessedDetailsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* After you generate a group or policy report using the GenerateServiceLastAccessedDetails operation, * you can use the JobId parameter in GetServiceLastAccessedDetailsWithEntities. This * operation retrieves the status of your report job and a list of entities that could have used group or policy * permissions to access the specified service. *

*
    *
  • *

    * Group – For a group report, this operation returns a list of users in the group that could have used the * group’s policies in an attempt to access the service. *

    *
  • *
  • *

    * Policy – For a policy report, this operation returns a list of entities (users or roles) that could have * used the policy in an attempt to access the service. *

    *
  • *
*

* You can also use this operation for user or role reports to retrieve details about those entities. *

*

* If the operation fails, the GetServiceLastAccessedDetailsWithEntities operation returns the reason * that it failed. *

*

* By default, the list of associated entities is sorted by date, with the most recent access listed first. *

* * @param getServiceLastAccessedDetailsWithEntitiesRequest * @return A Java Future containing the result of the GetServiceLastAccessedDetailsWithEntities operation returned * by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetServiceLastAccessedDetailsWithEntities * @see AWS API Documentation */ @Override public CompletableFuture getServiceLastAccessedDetailsWithEntities( GetServiceLastAccessedDetailsWithEntitiesRequest getServiceLastAccessedDetailsWithEntitiesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( getServiceLastAccessedDetailsWithEntitiesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getServiceLastAccessedDetailsWithEntitiesRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetServiceLastAccessedDetailsWithEntities"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetServiceLastAccessedDetailsWithEntitiesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetServiceLastAccessedDetailsWithEntities") .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetServiceLastAccessedDetailsWithEntitiesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getServiceLastAccessedDetailsWithEntitiesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the status of your service-linked role deletion. After you use DeleteServiceLinkedRole to submit * a service-linked role for deletion, you can use the DeletionTaskId parameter in * GetServiceLinkedRoleDeletionStatus to check the status of the deletion. If the deletion fails, this * operation returns the reason that it failed, if that information is returned by the service. *

* * @param getServiceLinkedRoleDeletionStatusRequest * @return A Java Future containing the result of the GetServiceLinkedRoleDeletionStatus operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetServiceLinkedRoleDeletionStatus * @see AWS API Documentation */ @Override public CompletableFuture getServiceLinkedRoleDeletionStatus( GetServiceLinkedRoleDeletionStatusRequest getServiceLinkedRoleDeletionStatusRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getServiceLinkedRoleDeletionStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getServiceLinkedRoleDeletionStatusRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetServiceLinkedRoleDeletionStatus"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetServiceLinkedRoleDeletionStatusResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetServiceLinkedRoleDeletionStatus").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetServiceLinkedRoleDeletionStatusRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getServiceLinkedRoleDeletionStatusRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves information about the specified IAM user, including the user's creation date, path, unique ID, and ARN. *

*

* If you do not specify a user name, IAM determines the user name implicitly based on the Amazon Web Services * access key ID used to sign the request to this operation. *

* * @param getUserRequest * @return A Java Future containing the result of the GetUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetUser * @see AWS API * Documentation */ @Override public CompletableFuture getUser(GetUserRequest getUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetUser"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetUserResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetUser") .withProtocolMetadata(protocolMetadata).withMarshaller(new GetUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getUserRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the specified inline policy document that is embedded in the specified IAM user. *

* *

* Policies returned by this operation are URL-encoded compliant with RFC 3986. You can use a URL decoding method to convert the policy * back to plain JSON text. For example, if you use Java, you can use the decode method of the * java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs provide similar * functionality. *

*
*

* An IAM user can also have managed policies attached to it. To retrieve a managed policy document that is attached * to a user, use GetPolicy to determine the policy's default version. Then use GetPolicyVersion to * retrieve the policy document. *

*

* For more information about policies, see Managed policies and * inline policies in the IAM User Guide. *

* * @param getUserPolicyRequest * @return A Java Future containing the result of the GetUserPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.GetUserPolicy * @see AWS API * Documentation */ @Override public CompletableFuture getUserPolicy(GetUserPolicyRequest getUserPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getUserPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getUserPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetUserPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetUserPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetUserPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetUserPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getUserPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the access key IDs associated with the specified IAM user. If there is none, the * operation returns an empty list. *

*

* Although each user is limited to a small number of keys, you can still paginate the results using the * MaxItems and Marker parameters. *

*

* If the UserName is not specified, the user name is determined implicitly based on the Amazon Web * Services access key ID used to sign the request. If a temporary access key is used, then UserName is * required. If a long-term key is assigned to the user, then UserName is not required. *

*

* This operation works for access keys under the Amazon Web Services account. If the Amazon Web Services account * has no associated users, the root user returns it's own access key IDs by running this command. *

* *

* To ensure the security of your Amazon Web Services account, the secret access key is accessible only during key * and user creation. *

*
* * @param listAccessKeysRequest * @return A Java Future containing the result of the ListAccessKeys operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListAccessKeys * @see AWS API * Documentation */ @Override public CompletableFuture listAccessKeys(ListAccessKeysRequest listAccessKeysRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAccessKeysRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAccessKeysRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAccessKeys"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListAccessKeysResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAccessKeys").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListAccessKeysRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listAccessKeysRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the account alias associated with the Amazon Web Services account (Note: you can have only one). For * information about using an Amazon Web Services account alias, see Creating, deleting, and * listing an Amazon Web Services account alias in the Amazon Web Services Sign-In User Guide. *

* * @param listAccountAliasesRequest * @return A Java Future containing the result of the ListAccountAliases operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListAccountAliases * @see AWS API * Documentation */ @Override public CompletableFuture listAccountAliases(ListAccountAliasesRequest listAccountAliasesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAccountAliasesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAccountAliasesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAccountAliases"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListAccountAliasesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAccountAliases").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListAccountAliasesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listAccountAliasesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all managed policies that are attached to the specified IAM group. *

*

* An IAM group can also have inline policies embedded with it. To list the inline policies for a group, use * ListGroupPolicies. For information about policies, see Managed policies and * inline policies in the IAM User Guide. *

*

* You can paginate the results using the MaxItems and Marker parameters. You can use the * PathPrefix parameter to limit the list of policies to only those matching the specified path prefix. * If there are no policies attached to the specified group (or none that match the specified path prefix), the * operation returns an empty list. *

* * @param listAttachedGroupPoliciesRequest * @return A Java Future containing the result of the ListAttachedGroupPolicies operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListAttachedGroupPolicies * @see AWS * API Documentation */ @Override public CompletableFuture listAttachedGroupPolicies( ListAttachedGroupPoliciesRequest listAttachedGroupPoliciesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAttachedGroupPoliciesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAttachedGroupPoliciesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAttachedGroupPolicies"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListAttachedGroupPoliciesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAttachedGroupPolicies").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListAttachedGroupPoliciesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listAttachedGroupPoliciesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all managed policies that are attached to the specified IAM role. *

*

* An IAM role can also have inline policies embedded with it. To list the inline policies for a role, use * ListRolePolicies. For information about policies, see Managed policies and * inline policies in the IAM User Guide. *

*

* You can paginate the results using the MaxItems and Marker parameters. You can use the * PathPrefix parameter to limit the list of policies to only those matching the specified path prefix. * If there are no policies attached to the specified role (or none that match the specified path prefix), the * operation returns an empty list. *

* * @param listAttachedRolePoliciesRequest * @return A Java Future containing the result of the ListAttachedRolePolicies operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListAttachedRolePolicies * @see AWS * API Documentation */ @Override public CompletableFuture listAttachedRolePolicies( ListAttachedRolePoliciesRequest listAttachedRolePoliciesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAttachedRolePoliciesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAttachedRolePoliciesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAttachedRolePolicies"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListAttachedRolePoliciesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAttachedRolePolicies").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListAttachedRolePoliciesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listAttachedRolePoliciesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all managed policies that are attached to the specified IAM user. *

*

* An IAM user can also have inline policies embedded with it. To list the inline policies for a user, use * ListUserPolicies. For information about policies, see Managed policies and * inline policies in the IAM User Guide. *

*

* You can paginate the results using the MaxItems and Marker parameters. You can use the * PathPrefix parameter to limit the list of policies to only those matching the specified path prefix. * If there are no policies attached to the specified group (or none that match the specified path prefix), the * operation returns an empty list. *

* * @param listAttachedUserPoliciesRequest * @return A Java Future containing the result of the ListAttachedUserPolicies operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListAttachedUserPolicies * @see AWS * API Documentation */ @Override public CompletableFuture listAttachedUserPolicies( ListAttachedUserPoliciesRequest listAttachedUserPoliciesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAttachedUserPoliciesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAttachedUserPoliciesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAttachedUserPolicies"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListAttachedUserPoliciesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAttachedUserPolicies").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListAttachedUserPoliciesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listAttachedUserPoliciesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all IAM users, groups, and roles that the specified managed policy is attached to. *

*

* You can use the optional EntityFilter parameter to limit the results to a particular type of entity * (users, groups, or roles). For example, to list only the roles that are attached to the specified policy, set * EntityFilter to Role. *

*

* You can paginate the results using the MaxItems and Marker parameters. *

* * @param listEntitiesForPolicyRequest * @return A Java Future containing the result of the ListEntitiesForPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListEntitiesForPolicy * @see AWS API * Documentation */ @Override public CompletableFuture listEntitiesForPolicy( ListEntitiesForPolicyRequest listEntitiesForPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listEntitiesForPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listEntitiesForPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListEntitiesForPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListEntitiesForPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListEntitiesForPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListEntitiesForPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listEntitiesForPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the names of the inline policies that are embedded in the specified IAM group. *

*

* An IAM group can also have managed policies attached to it. To list the managed policies that are attached to a * group, use ListAttachedGroupPolicies. For more information about policies, see Managed policies and * inline policies in the IAM User Guide. *

*

* You can paginate the results using the MaxItems and Marker parameters. If there are no * inline policies embedded with the specified group, the operation returns an empty list. *

* * @param listGroupPoliciesRequest * @return A Java Future containing the result of the ListGroupPolicies operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListGroupPolicies * @see AWS API * Documentation */ @Override public CompletableFuture listGroupPolicies(ListGroupPoliciesRequest listGroupPoliciesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listGroupPoliciesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listGroupPoliciesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListGroupPolicies"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListGroupPoliciesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListGroupPolicies").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListGroupPoliciesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listGroupPoliciesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the IAM groups that have the specified path prefix. *

*

* You can paginate the results using the MaxItems and Marker parameters. *

* * @param listGroupsRequest * @return A Java Future containing the result of the ListGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListGroups * @see AWS API * Documentation */ @Override public CompletableFuture listGroups(ListGroupsRequest listGroupsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listGroupsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listGroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListGroups"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListGroupsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListGroups") .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listGroupsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the IAM groups that the specified IAM user belongs to. *

*

* You can paginate the results using the MaxItems and Marker parameters. *

* * @param listGroupsForUserRequest * @return A Java Future containing the result of the ListGroupsForUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListGroupsForUser * @see AWS API * Documentation */ @Override public CompletableFuture listGroupsForUser(ListGroupsForUserRequest listGroupsForUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listGroupsForUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listGroupsForUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListGroupsForUser"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListGroupsForUserResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListGroupsForUser").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListGroupsForUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listGroupsForUserRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the tags that are attached to the specified IAM instance profile. The returned list of tags is sorted by * tag key. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* * @param listInstanceProfileTagsRequest * @return A Java Future containing the result of the ListInstanceProfileTags operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListInstanceProfileTags * @see AWS * API Documentation */ @Override public CompletableFuture listInstanceProfileTags( ListInstanceProfileTagsRequest listInstanceProfileTagsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listInstanceProfileTagsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listInstanceProfileTagsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListInstanceProfileTags"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListInstanceProfileTagsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListInstanceProfileTags").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListInstanceProfileTagsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listInstanceProfileTagsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the instance profiles that have the specified path prefix. If there are none, the operation returns an * empty list. For more information about instance profiles, see Using * instance profiles in the IAM User Guide. *

* *

* IAM resource-listing operations return a subset of the available attributes for the resource. For example, this * operation does not return tags, even though they are an attribute of the returned object. To view all of the * information for an instance profile, see GetInstanceProfile. *

*
*

* You can paginate the results using the MaxItems and Marker parameters. *

* * @param listInstanceProfilesRequest * @return A Java Future containing the result of the ListInstanceProfiles operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListInstanceProfiles * @see AWS API * Documentation */ @Override public CompletableFuture listInstanceProfiles( ListInstanceProfilesRequest listInstanceProfilesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listInstanceProfilesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listInstanceProfilesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListInstanceProfiles"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListInstanceProfilesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListInstanceProfiles").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListInstanceProfilesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listInstanceProfilesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the instance profiles that have the specified associated IAM role. If there are none, the operation returns * an empty list. For more information about instance profiles, go to Using * instance profiles in the IAM User Guide. *

*

* You can paginate the results using the MaxItems and Marker parameters. *

* * @param listInstanceProfilesForRoleRequest * @return A Java Future containing the result of the ListInstanceProfilesForRole operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListInstanceProfilesForRole * @see AWS API Documentation */ @Override public CompletableFuture listInstanceProfilesForRole( ListInstanceProfilesForRoleRequest listInstanceProfilesForRoleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listInstanceProfilesForRoleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listInstanceProfilesForRoleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListInstanceProfilesForRole"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListInstanceProfilesForRoleResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListInstanceProfilesForRole").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListInstanceProfilesForRoleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listInstanceProfilesForRoleRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the tags that are attached to the specified IAM virtual multi-factor authentication (MFA) device. The * returned list of tags is sorted by tag key. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* * @param listMfaDeviceTagsRequest * @return A Java Future containing the result of the ListMFADeviceTags operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListMFADeviceTags * @see AWS API * Documentation */ @Override public CompletableFuture listMFADeviceTags(ListMfaDeviceTagsRequest listMfaDeviceTagsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listMfaDeviceTagsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listMfaDeviceTagsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListMFADeviceTags"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListMfaDeviceTagsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListMFADeviceTags").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListMfaDeviceTagsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listMfaDeviceTagsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the MFA devices for an IAM user. If the request includes a IAM user name, then this operation lists all the * MFA devices associated with the specified user. If you do not specify a user name, IAM determines the user name * implicitly based on the Amazon Web Services access key ID signing the request for this operation. *

*

* You can paginate the results using the MaxItems and Marker parameters. *

* * @param listMfaDevicesRequest * @return A Java Future containing the result of the ListMFADevices operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListMFADevices * @see AWS API * Documentation */ @Override public CompletableFuture listMFADevices(ListMfaDevicesRequest listMfaDevicesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listMfaDevicesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listMfaDevicesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListMFADevices"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListMfaDevicesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListMFADevices").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListMfaDevicesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listMfaDevicesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the tags that are attached to the specified OpenID Connect (OIDC)-compatible identity provider. The * returned list of tags is sorted by tag key. For more information, see About web identity * federation. *

*

* For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* * @param listOpenIdConnectProviderTagsRequest * @return A Java Future containing the result of the ListOpenIDConnectProviderTags operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListOpenIDConnectProviderTags * @see AWS API Documentation */ @Override public CompletableFuture listOpenIDConnectProviderTags( ListOpenIdConnectProviderTagsRequest listOpenIdConnectProviderTagsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listOpenIdConnectProviderTagsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listOpenIdConnectProviderTagsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListOpenIDConnectProviderTags"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListOpenIdConnectProviderTagsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListOpenIDConnectProviderTags").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListOpenIdConnectProviderTagsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listOpenIdConnectProviderTagsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists information about the IAM OpenID Connect (OIDC) provider resource objects defined in the Amazon Web * Services account. *

* *

* IAM resource-listing operations return a subset of the available attributes for the resource. For example, this * operation does not return tags, even though they are an attribute of the returned object. To view all of the * information for an OIDC provider, see GetOpenIDConnectProvider. *

*
* * @param listOpenIdConnectProvidersRequest * @return A Java Future containing the result of the ListOpenIDConnectProviders operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListOpenIDConnectProviders * @see AWS API Documentation */ @Override public CompletableFuture listOpenIDConnectProviders( ListOpenIdConnectProvidersRequest listOpenIdConnectProvidersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listOpenIdConnectProvidersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listOpenIdConnectProvidersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListOpenIDConnectProviders"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListOpenIdConnectProvidersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListOpenIDConnectProviders").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListOpenIdConnectProvidersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listOpenIdConnectProvidersRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the centralized root access features enabled for your organization. For more information, see Centrally manage root access for member accounts. *

* * @param listOrganizationsFeaturesRequest * @return A Java Future containing the result of the ListOrganizationsFeatures operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceAccessNotEnabledException The request was rejected because trusted access is not enabled for * IAM in Organizations. For details, see IAM and Organizations in the Organizations User Guide.
  • *
  • AccountNotManagementOrDelegatedAdministratorException The request was rejected because the account * making the request is not the management account or delegated administrator account for centralized root access.
  • *
  • OrganizationNotFoundException The request was rejected because no organization is associated with * your account.
  • *
  • OrganizationNotInAllFeaturesModeException The request was rejected because your organization does not * have All features enabled. For more information, see Available feature sets in the Organizations User Guide.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListOrganizationsFeatures * @see AWS * API Documentation */ @Override public CompletableFuture listOrganizationsFeatures( ListOrganizationsFeaturesRequest listOrganizationsFeaturesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listOrganizationsFeaturesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listOrganizationsFeaturesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListOrganizationsFeatures"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListOrganizationsFeaturesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListOrganizationsFeatures").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListOrganizationsFeaturesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listOrganizationsFeaturesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all the managed policies that are available in your Amazon Web Services account, including your own * customer-defined managed policies and all Amazon Web Services managed policies. *

*

* You can filter the list of policies that is returned using the optional OnlyAttached, * Scope, and PathPrefix parameters. For example, to list only the customer managed * policies in your Amazon Web Services account, set Scope to Local. To list only Amazon * Web Services managed policies, set Scope to AWS. *

*

* You can paginate the results using the MaxItems and Marker parameters. *

*

* For more information about managed policies, see Managed policies and * inline policies in the IAM User Guide. *

* *

* IAM resource-listing operations return a subset of the available attributes for the resource. For example, this * operation does not return tags, even though they are an attribute of the returned object. To view all of the * information for a customer manged policy, see GetPolicy. *

*
* * @param listPoliciesRequest * @return A Java Future containing the result of the ListPolicies operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListPolicies * @see AWS API * Documentation */ @Override public CompletableFuture listPolicies(ListPoliciesRequest listPoliciesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listPoliciesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listPoliciesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPolicies"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListPoliciesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListPolicies").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListPoliciesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listPoliciesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves a list of policies that the IAM identity (user, group, or role) can use to access each specified * service. *

* *

* This operation does not use other policy types when determining whether a resource could access a service. These * other policy types include resource-based policies, access control lists, Organizations policies, IAM permissions * boundaries, and STS assume role policies. It only applies permissions policy logic. For more about the evaluation * of policy types, see Evaluating policies in the IAM User Guide. *

*
*

* The list of policies returned by the operation depends on the ARN of the identity that you provide. *

*
    *
  • *

    * User – The list of policies includes the managed and inline policies that are attached to the user * directly. The list also includes any additional managed and inline policies that are attached to the group to * which the user belongs. *

    *
  • *
  • *

    * Group – The list of policies includes only the managed and inline policies that are attached to the group * directly. Policies that are attached to the group’s user are not included. *

    *
  • *
  • *

    * Role – The list of policies includes only the managed and inline policies that are attached to the role. *

    *
  • *
*

* For each managed policy, this operation returns the ARN and policy name. For each inline policy, it returns the * policy name and the entity to which it is attached. Inline policies do not have an ARN. For more information * about these policy types, see Managed policies * and inline policies in the IAM User Guide. *

*

* Policies that are attached to users and roles as permissions boundaries are not returned. To view which managed * policy is currently used to set the permissions boundary for a user or role, use the GetUser or * GetRole operations. *

* * @param listPoliciesGrantingServiceAccessRequest * @return A Java Future containing the result of the ListPoliciesGrantingServiceAccess operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListPoliciesGrantingServiceAccess * @see AWS API Documentation */ @Override public CompletableFuture listPoliciesGrantingServiceAccess( ListPoliciesGrantingServiceAccessRequest listPoliciesGrantingServiceAccessRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listPoliciesGrantingServiceAccessRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listPoliciesGrantingServiceAccessRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPoliciesGrantingServiceAccess"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListPoliciesGrantingServiceAccessResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListPoliciesGrantingServiceAccess").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListPoliciesGrantingServiceAccessRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listPoliciesGrantingServiceAccessRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the tags that are attached to the specified IAM customer managed policy. The returned list of tags is * sorted by tag key. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* * @param listPolicyTagsRequest * @return A Java Future containing the result of the ListPolicyTags operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListPolicyTags * @see AWS API * Documentation */ @Override public CompletableFuture listPolicyTags(ListPolicyTagsRequest listPolicyTagsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listPolicyTagsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listPolicyTagsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPolicyTags"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListPolicyTagsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListPolicyTags").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListPolicyTagsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listPolicyTagsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists information about the versions of the specified managed policy, including the version that is currently set * as the policy's default version. *

*

* For more information about managed policies, see Managed policies and * inline policies in the IAM User Guide. *

* * @param listPolicyVersionsRequest * @return A Java Future containing the result of the ListPolicyVersions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListPolicyVersions * @see AWS API * Documentation */ @Override public CompletableFuture listPolicyVersions(ListPolicyVersionsRequest listPolicyVersionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listPolicyVersionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listPolicyVersionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPolicyVersions"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListPolicyVersionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListPolicyVersions").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListPolicyVersionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listPolicyVersionsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the names of the inline policies that are embedded in the specified IAM role. *

*

* An IAM role can also have managed policies attached to it. To list the managed policies that are attached to a * role, use ListAttachedRolePolicies. For more information about policies, see Managed policies and * inline policies in the IAM User Guide. *

*

* You can paginate the results using the MaxItems and Marker parameters. If there are no * inline policies embedded with the specified role, the operation returns an empty list. *

* * @param listRolePoliciesRequest * @return A Java Future containing the result of the ListRolePolicies operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListRolePolicies * @see AWS API * Documentation */ @Override public CompletableFuture listRolePolicies(ListRolePoliciesRequest listRolePoliciesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listRolePoliciesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listRolePoliciesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRolePolicies"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListRolePoliciesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListRolePolicies").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListRolePoliciesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listRolePoliciesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the tags that are attached to the specified role. The returned list of tags is sorted by tag key. For more * information about tagging, see Tagging * IAM resources in the IAM User Guide. *

* * @param listRoleTagsRequest * @return A Java Future containing the result of the ListRoleTags operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListRoleTags * @see AWS API * Documentation */ @Override public CompletableFuture listRoleTags(ListRoleTagsRequest listRoleTagsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listRoleTagsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listRoleTagsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRoleTags"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListRoleTagsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListRoleTags").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListRoleTagsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listRoleTagsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the IAM roles that have the specified path prefix. If there are none, the operation returns an empty list. * For more information about roles, see IAM roles in the IAM User Guide. *

* *

* IAM resource-listing operations return a subset of the available attributes for the resource. This operation does * not return the following attributes, even though they are an attribute of the returned object: *

*
    *
  • *

    * PermissionsBoundary *

    *
  • *
  • *

    * RoleLastUsed *

    *
  • *
  • *

    * Tags *

    *
  • *
*

* To view all of the information for a role, see GetRole. *

*
*

* You can paginate the results using the MaxItems and Marker parameters. *

* * @param listRolesRequest * @return A Java Future containing the result of the ListRoles operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListRoles * @see AWS API * Documentation */ @Override public CompletableFuture listRoles(ListRolesRequest listRolesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listRolesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listRolesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRoles"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListRolesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListRoles") .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListRolesRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withMetricCollector(apiCallMetricCollector).withInput(listRolesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the tags that are attached to the specified Security Assertion Markup Language (SAML) identity provider. * The returned list of tags is sorted by tag key. For more information, see About SAML 2.0-based * federation. *

*

* For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* * @param listSamlProviderTagsRequest * @return A Java Future containing the result of the ListSAMLProviderTags operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListSAMLProviderTags * @see AWS API * Documentation */ @Override public CompletableFuture listSAMLProviderTags( ListSamlProviderTagsRequest listSamlProviderTagsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSamlProviderTagsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSamlProviderTagsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSAMLProviderTags"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListSamlProviderTagsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSAMLProviderTags").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListSamlProviderTagsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listSamlProviderTagsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the SAML provider resource objects defined in IAM in the account. IAM resource-listing operations return a * subset of the available attributes for the resource. For example, this operation does not return tags, even * though they are an attribute of the returned object. To view all of the information for a SAML provider, see * GetSAMLProvider. *

* *

* This operation requires Signature Version 4. *

*
* * @param listSamlProvidersRequest * @return A Java Future containing the result of the ListSAMLProviders operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListSAMLProviders * @see AWS API * Documentation */ @Override public CompletableFuture listSAMLProviders(ListSamlProvidersRequest listSamlProvidersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSamlProvidersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSamlProvidersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSAMLProviders"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListSamlProvidersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSAMLProviders").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListSamlProvidersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listSamlProvidersRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the SSH public keys associated with the specified IAM user. If none exists, the * operation returns an empty list. *

*

* The SSH public keys returned by this operation are used only for authenticating the IAM user to an CodeCommit * repository. For more information about using SSH keys to authenticate to an CodeCommit repository, see Set up CodeCommit * for SSH connections in the CodeCommit User Guide. *

*

* Although each user is limited to a small number of keys, you can still paginate the results using the * MaxItems and Marker parameters. *

* * @param listSshPublicKeysRequest * @return A Java Future containing the result of the ListSSHPublicKeys operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListSSHPublicKeys * @see AWS API * Documentation */ @Override public CompletableFuture listSSHPublicKeys(ListSshPublicKeysRequest listSshPublicKeysRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSshPublicKeysRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSshPublicKeysRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSSHPublicKeys"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListSshPublicKeysResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSSHPublicKeys").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListSshPublicKeysRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listSshPublicKeysRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the tags that are attached to the specified IAM server certificate. The returned list of tags is sorted by * tag key. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* *

* For certificates in a Region supported by Certificate Manager (ACM), we recommend that you don't use IAM server * certificates. Instead, use ACM to provision, manage, and deploy your server certificates. For more information * about IAM server certificates, Working with server * certificates in the IAM User Guide. *

*
* * @param listServerCertificateTagsRequest * @return A Java Future containing the result of the ListServerCertificateTags operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListServerCertificateTags * @see AWS * API Documentation */ @Override public CompletableFuture listServerCertificateTags( ListServerCertificateTagsRequest listServerCertificateTagsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listServerCertificateTagsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listServerCertificateTagsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListServerCertificateTags"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListServerCertificateTagsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListServerCertificateTags").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListServerCertificateTagsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listServerCertificateTagsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the server certificates stored in IAM that have the specified path prefix. If none exist, the operation * returns an empty list. *

*

* You can paginate the results using the MaxItems and Marker parameters. *

*

* For more information about working with server certificates, see Working with server * certificates in the IAM User Guide. This topic also includes a list of Amazon Web Services services * that can use the server certificates that you manage with IAM. *

* *

* IAM resource-listing operations return a subset of the available attributes for the resource. For example, this * operation does not return tags, even though they are an attribute of the returned object. To view all of the * information for a servercertificate, see GetServerCertificate. *

*
* * @param listServerCertificatesRequest * @return A Java Future containing the result of the ListServerCertificates operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListServerCertificates * @see AWS * API Documentation */ @Override public CompletableFuture listServerCertificates( ListServerCertificatesRequest listServerCertificatesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listServerCertificatesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listServerCertificatesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListServerCertificates"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListServerCertificatesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListServerCertificates").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListServerCertificatesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listServerCertificatesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the service-specific credentials associated with the specified IAM user. If none * exists, the operation returns an empty list. The service-specific credentials returned by this operation are used * only for authenticating the IAM user to a specific service. For more information about using service-specific * credentials to authenticate to an Amazon Web Services service, see Set up service-specific * credentials in the CodeCommit User Guide. *

* * @param listServiceSpecificCredentialsRequest * @return A Java Future containing the result of the ListServiceSpecificCredentials operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceNotSupportedException The specified service does not support service-specific credentials.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListServiceSpecificCredentials * @see AWS API Documentation */ @Override public CompletableFuture listServiceSpecificCredentials( ListServiceSpecificCredentialsRequest listServiceSpecificCredentialsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listServiceSpecificCredentialsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listServiceSpecificCredentialsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListServiceSpecificCredentials"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListServiceSpecificCredentialsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListServiceSpecificCredentials").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListServiceSpecificCredentialsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listServiceSpecificCredentialsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the signing certificates associated with the specified IAM user. If none exists, the * operation returns an empty list. *

*

* Although each user is limited to a small number of signing certificates, you can still paginate the results using * the MaxItems and Marker parameters. *

*

* If the UserName field is not specified, the user name is determined implicitly based on the Amazon * Web Services access key ID used to sign the request for this operation. This operation works for access keys * under the Amazon Web Services account. Consequently, you can use this operation to manage Amazon Web Services * account root user credentials even if the Amazon Web Services account has no associated users. *

* * @param listSigningCertificatesRequest * @return A Java Future containing the result of the ListSigningCertificates operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListSigningCertificates * @see AWS * API Documentation */ @Override public CompletableFuture listSigningCertificates( ListSigningCertificatesRequest listSigningCertificatesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSigningCertificatesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSigningCertificatesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSigningCertificates"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListSigningCertificatesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSigningCertificates").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListSigningCertificatesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listSigningCertificatesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the names of the inline policies embedded in the specified IAM user. *

*

* An IAM user can also have managed policies attached to it. To list the managed policies that are attached to a * user, use ListAttachedUserPolicies. For more information about policies, see Managed policies and * inline policies in the IAM User Guide. *

*

* You can paginate the results using the MaxItems and Marker parameters. If there are no * inline policies embedded with the specified user, the operation returns an empty list. *

* * @param listUserPoliciesRequest * @return A Java Future containing the result of the ListUserPolicies operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListUserPolicies * @see AWS API * Documentation */ @Override public CompletableFuture listUserPolicies(ListUserPoliciesRequest listUserPoliciesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listUserPoliciesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listUserPoliciesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListUserPolicies"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListUserPoliciesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListUserPolicies").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListUserPoliciesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listUserPoliciesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the tags that are attached to the specified IAM user. The returned list of tags is sorted by tag key. For * more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* * @param listUserTagsRequest * @return A Java Future containing the result of the ListUserTags operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListUserTags * @see AWS API * Documentation */ @Override public CompletableFuture listUserTags(ListUserTagsRequest listUserTagsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listUserTagsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listUserTagsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListUserTags"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListUserTagsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListUserTags").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListUserTagsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listUserTagsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the IAM users that have the specified path prefix. If no path prefix is specified, the operation returns * all users in the Amazon Web Services account. If there are none, the operation returns an empty list. *

* *

* IAM resource-listing operations return a subset of the available attributes for the resource. This operation does * not return the following attributes, even though they are an attribute of the returned object: *

*
    *
  • *

    * PermissionsBoundary *

    *
  • *
  • *

    * Tags *

    *
  • *
*

* To view all of the information for a user, see GetUser. *

*
*

* You can paginate the results using the MaxItems and Marker parameters. *

* * @param listUsersRequest * @return A Java Future containing the result of the ListUsers operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListUsers * @see AWS API * Documentation */ @Override public CompletableFuture listUsers(ListUsersRequest listUsersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listUsersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listUsersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListUsers"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListUsersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListUsers") .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListUsersRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withMetricCollector(apiCallMetricCollector).withInput(listUsersRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the virtual MFA devices defined in the Amazon Web Services account by assignment status. If you do not * specify an assignment status, the operation returns a list of all virtual MFA devices. Assignment status can be * Assigned, Unassigned, or Any. *

* *

* IAM resource-listing operations return a subset of the available attributes for the resource. For example, this * operation does not return tags, even though they are an attribute of the returned object. To view tag information * for a virtual MFA device, see ListMFADeviceTags. *

*
*

* You can paginate the results using the MaxItems and Marker parameters. *

* * @param listVirtualMfaDevicesRequest * @return A Java Future containing the result of the ListVirtualMFADevices operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ListVirtualMFADevices * @see AWS API * Documentation */ @Override public CompletableFuture listVirtualMFADevices( ListVirtualMfaDevicesRequest listVirtualMfaDevicesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listVirtualMfaDevicesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listVirtualMfaDevicesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListVirtualMFADevices"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListVirtualMfaDevicesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListVirtualMFADevices").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListVirtualMfaDevicesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listVirtualMfaDevicesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds or updates an inline policy document that is embedded in the specified IAM group. *

*

* A user can also have managed policies attached to it. To attach a managed policy to a group, use * AttachGroupPolicy . To create a new managed policy, use CreatePolicy . * For information about policies, see Managed policies and * inline policies in the IAM User Guide. *

*

* For information about the maximum number of inline policies that you can embed in a group, see IAM and STS quotas in the * IAM User Guide. *

* *

* Because policy documents can be large, you should use POST rather than GET when calling * PutGroupPolicy. For general information about using the Query API with IAM, see Making query requests in the * IAM User Guide. *

*
* * @param putGroupPolicyRequest * @return A Java Future containing the result of the PutGroupPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • MalformedPolicyDocumentException The request was rejected because the policy document was malformed. * The error message describes the specific error.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.PutGroupPolicy * @see AWS API * Documentation */ @Override public CompletableFuture putGroupPolicy(PutGroupPolicyRequest putGroupPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putGroupPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putGroupPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutGroupPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(PutGroupPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutGroupPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new PutGroupPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(putGroupPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds or updates the policy that is specified as the IAM role's permissions boundary. You can use an Amazon Web * Services managed policy or a customer managed policy to set the boundary for a role. Use the boundary to control * the maximum permissions that the role can have. Setting a permissions boundary is an advanced feature that can * affect the permissions for the role. *

*

* You cannot set the boundary for a service-linked role. *

* *

* Policies used as permissions boundaries do not provide permissions. You must also attach a permissions policy to * the role. To learn how the effective permissions for a role are evaluated, see IAM JSON policy * evaluation logic in the IAM User Guide. *

*
* * @param putRolePermissionsBoundaryRequest * @return A Java Future containing the result of the PutRolePermissionsBoundary operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • UnmodifiableEntityException The request was rejected because service-linked roles are protected * Amazon Web Services resources. Only the service that depends on the service-linked role can modify or * delete the role on your behalf. The error message includes the name of the service that depends on this * service-linked role. You must request the change through that service.
  • *
  • PolicyNotAttachableException The request failed because Amazon Web Services service role policies can * only be attached to the service-linked role for that service.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.PutRolePermissionsBoundary * @see AWS API Documentation */ @Override public CompletableFuture putRolePermissionsBoundary( PutRolePermissionsBoundaryRequest putRolePermissionsBoundaryRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putRolePermissionsBoundaryRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putRolePermissionsBoundaryRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutRolePermissionsBoundary"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(PutRolePermissionsBoundaryResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutRolePermissionsBoundary").withProtocolMetadata(protocolMetadata) .withMarshaller(new PutRolePermissionsBoundaryRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(putRolePermissionsBoundaryRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds or updates an inline policy document that is embedded in the specified IAM role. *

*

* When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) * policy. The role's trust policy is created at the same time as the role, using CreateRole . You * can update a role's trust policy using * UpdateAssumeRolePolicy . For more information about roles, see IAM roles in the IAM User * Guide. *

*

* A role can also have a managed policy attached to it. To attach a managed policy to a role, use * AttachRolePolicy . To create a new managed policy, use CreatePolicy . * For information about policies, see Managed policies and * inline policies in the IAM User Guide. *

*

* For information about the maximum number of inline policies that you can embed with a role, see IAM and STS quotas in the * IAM User Guide. *

* *

* Because policy documents can be large, you should use POST rather than GET when calling * PutRolePolicy. For general information about using the Query API with IAM, see Making query requests in the * IAM User Guide. *

*
* * @param putRolePolicyRequest * @return A Java Future containing the result of the PutRolePolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • MalformedPolicyDocumentException The request was rejected because the policy document was malformed. * The error message describes the specific error.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • UnmodifiableEntityException The request was rejected because service-linked roles are protected * Amazon Web Services resources. Only the service that depends on the service-linked role can modify or * delete the role on your behalf. The error message includes the name of the service that depends on this * service-linked role. You must request the change through that service.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.PutRolePolicy * @see AWS API * Documentation */ @Override public CompletableFuture putRolePolicy(PutRolePolicyRequest putRolePolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putRolePolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putRolePolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutRolePolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(PutRolePolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutRolePolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new PutRolePolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(putRolePolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds or updates the policy that is specified as the IAM user's permissions boundary. You can use an Amazon Web * Services managed policy or a customer managed policy to set the boundary for a user. Use the boundary to control * the maximum permissions that the user can have. Setting a permissions boundary is an advanced feature that can * affect the permissions for the user. *

* *

* Policies that are used as permissions boundaries do not provide permissions. You must also attach a permissions * policy to the user. To learn how the effective permissions for a user are evaluated, see IAM JSON policy * evaluation logic in the IAM User Guide. *

*
* * @param putUserPermissionsBoundaryRequest * @return A Java Future containing the result of the PutUserPermissionsBoundary operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • PolicyNotAttachableException The request failed because Amazon Web Services service role policies can * only be attached to the service-linked role for that service.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.PutUserPermissionsBoundary * @see AWS API Documentation */ @Override public CompletableFuture putUserPermissionsBoundary( PutUserPermissionsBoundaryRequest putUserPermissionsBoundaryRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putUserPermissionsBoundaryRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putUserPermissionsBoundaryRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutUserPermissionsBoundary"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(PutUserPermissionsBoundaryResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutUserPermissionsBoundary").withProtocolMetadata(protocolMetadata) .withMarshaller(new PutUserPermissionsBoundaryRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(putUserPermissionsBoundaryRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds or updates an inline policy document that is embedded in the specified IAM user. *

*

* An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use * AttachUserPolicy . To create a new managed policy, use CreatePolicy . * For information about policies, see Managed policies and * inline policies in the IAM User Guide. *

*

* For information about the maximum number of inline policies that you can embed in a user, see IAM and STS quotas in the * IAM User Guide. *

* *

* Because policy documents can be large, you should use POST rather than GET when calling * PutUserPolicy. For general information about using the Query API with IAM, see Making query requests in the * IAM User Guide. *

*
* * @param putUserPolicyRequest * @return A Java Future containing the result of the PutUserPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • MalformedPolicyDocumentException The request was rejected because the policy document was malformed. * The error message describes the specific error.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.PutUserPolicy * @see AWS API * Documentation */ @Override public CompletableFuture putUserPolicy(PutUserPolicyRequest putUserPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putUserPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putUserPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutUserPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(PutUserPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutUserPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new PutUserPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(putUserPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified client ID (also known as audience) from the list of client IDs registered for the specified * IAM OpenID Connect (OIDC) provider resource object. *

*

* This operation is idempotent; it does not fail or return an error if you try to remove a client ID that does not * exist. *

* * @param removeClientIdFromOpenIdConnectProviderRequest * @return A Java Future containing the result of the RemoveClientIDFromOpenIDConnectProvider operation returned by * the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.RemoveClientIDFromOpenIDConnectProvider * @see AWS API Documentation */ @Override public CompletableFuture removeClientIDFromOpenIDConnectProvider( RemoveClientIdFromOpenIdConnectProviderRequest removeClientIdFromOpenIdConnectProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(removeClientIdFromOpenIdConnectProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, removeClientIdFromOpenIdConnectProviderRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RemoveClientIDFromOpenIDConnectProvider"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RemoveClientIdFromOpenIdConnectProviderResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveClientIDFromOpenIDConnectProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new RemoveClientIdFromOpenIdConnectProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(removeClientIdFromOpenIdConnectProviderRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified IAM role from the specified Amazon EC2 instance profile. *

* *

* Make sure that you do not have any Amazon EC2 instances running with the role you are about to remove from the * instance profile. Removing a role from an instance profile that is associated with a running instance might break * any applications running on the instance. *

*
*

* For more information about roles, see IAM roles in the IAM User Guide. * For more information about instance profiles, see Using * instance profiles in the IAM User Guide. *

* * @param removeRoleFromInstanceProfileRequest * @return A Java Future containing the result of the RemoveRoleFromInstanceProfile operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • UnmodifiableEntityException The request was rejected because service-linked roles are protected * Amazon Web Services resources. Only the service that depends on the service-linked role can modify or * delete the role on your behalf. The error message includes the name of the service that depends on this * service-linked role. You must request the change through that service.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.RemoveRoleFromInstanceProfile * @see AWS API Documentation */ @Override public CompletableFuture removeRoleFromInstanceProfile( RemoveRoleFromInstanceProfileRequest removeRoleFromInstanceProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(removeRoleFromInstanceProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, removeRoleFromInstanceProfileRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RemoveRoleFromInstanceProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RemoveRoleFromInstanceProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveRoleFromInstanceProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new RemoveRoleFromInstanceProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(removeRoleFromInstanceProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified user from the specified group. *

* * @param removeUserFromGroupRequest * @return A Java Future containing the result of the RemoveUserFromGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.RemoveUserFromGroup * @see AWS API * Documentation */ @Override public CompletableFuture removeUserFromGroup( RemoveUserFromGroupRequest removeUserFromGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(removeUserFromGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, removeUserFromGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RemoveUserFromGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RemoveUserFromGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveUserFromGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new RemoveUserFromGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(removeUserFromGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Resets the password for a service-specific credential. The new password is Amazon Web Services generated and * cryptographically strong. It cannot be configured by the user. Resetting the password immediately invalidates the * previous password associated with this user. *

* * @param resetServiceSpecificCredentialRequest * @return A Java Future containing the result of the ResetServiceSpecificCredential operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ResetServiceSpecificCredential * @see AWS API Documentation */ @Override public CompletableFuture resetServiceSpecificCredential( ResetServiceSpecificCredentialRequest resetServiceSpecificCredentialRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(resetServiceSpecificCredentialRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, resetServiceSpecificCredentialRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ResetServiceSpecificCredential"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ResetServiceSpecificCredentialResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ResetServiceSpecificCredential").withProtocolMetadata(protocolMetadata) .withMarshaller(new ResetServiceSpecificCredentialRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(resetServiceSpecificCredentialRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Synchronizes the specified MFA device with its IAM resource object on the Amazon Web Services servers. *

*

* For more information about creating and working with virtual MFA devices, see Using a virtual MFA device in * the IAM User Guide. *

* * @param resyncMfaDeviceRequest * @return A Java Future containing the result of the ResyncMFADevice operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidAuthenticationCodeException The request was rejected because the authentication code was not * recognized. The error message describes the specific error.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.ResyncMFADevice * @see AWS API * Documentation */ @Override public CompletableFuture resyncMFADevice(ResyncMfaDeviceRequest resyncMfaDeviceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(resyncMfaDeviceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, resyncMfaDeviceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ResyncMFADevice"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ResyncMfaDeviceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ResyncMFADevice").withProtocolMetadata(protocolMetadata) .withMarshaller(new ResyncMfaDeviceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(resyncMfaDeviceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Sets the specified version of the specified policy as the policy's default (operative) version. *

*

* This operation affects all users, groups, and roles that the policy is attached to. To list the users, groups, * and roles that the policy is attached to, use ListEntitiesForPolicy. *

*

* For information about managed policies, see Managed policies and * inline policies in the IAM User Guide. *

* * @param setDefaultPolicyVersionRequest * @return A Java Future containing the result of the SetDefaultPolicyVersion operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.SetDefaultPolicyVersion * @see AWS * API Documentation */ @Override public CompletableFuture setDefaultPolicyVersion( SetDefaultPolicyVersionRequest setDefaultPolicyVersionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(setDefaultPolicyVersionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, setDefaultPolicyVersionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetDefaultPolicyVersion"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(SetDefaultPolicyVersionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SetDefaultPolicyVersion").withProtocolMetadata(protocolMetadata) .withMarshaller(new SetDefaultPolicyVersionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(setDefaultPolicyVersionRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Sets the specified version of the global endpoint token as the token version used for the Amazon Web Services * account. *

*

* By default, Security Token Service (STS) is available as a global service, and all STS requests go to a single * endpoint at https://sts.amazonaws.com. Amazon Web Services recommends using Regional STS endpoints * to reduce latency, build in redundancy, and increase session token availability. For information about Regional * endpoints for STS, see Security Token Service * endpoints and quotas in the Amazon Web Services General Reference. *

*

* If you make an STS call to the global endpoint, the resulting session tokens might be valid in some Regions but * not others. It depends on the version that is set in this operation. Version 1 tokens are valid only in Amazon * Web Services Regions that are available by default. These tokens do not work in manually enabled Regions, such as * Asia Pacific (Hong Kong). Version 2 tokens are valid in all Regions. However, version 2 tokens are longer and * might affect systems where you temporarily store tokens. For information, see Activating and * deactivating STS in an Amazon Web Services Region in the IAM User Guide. *

*

* To view the current session token version, see the GlobalEndpointTokenVersion entry in the response * of the GetAccountSummary operation. *

* * @param setSecurityTokenServicePreferencesRequest * @return A Java Future containing the result of the SetSecurityTokenServicePreferences operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.SetSecurityTokenServicePreferences * @see AWS API Documentation */ @Override public CompletableFuture setSecurityTokenServicePreferences( SetSecurityTokenServicePreferencesRequest setSecurityTokenServicePreferencesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(setSecurityTokenServicePreferencesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, setSecurityTokenServicePreferencesRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetSecurityTokenServicePreferences"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(SetSecurityTokenServicePreferencesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SetSecurityTokenServicePreferences").withProtocolMetadata(protocolMetadata) .withMarshaller(new SetSecurityTokenServicePreferencesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(setSecurityTokenServicePreferencesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Simulate how a set of IAM policies and optionally a resource-based policy works with a list of API operations and * Amazon Web Services resources to determine the policies' effective permissions. The policies are provided as * strings. *

*

* The simulation does not perform the API operations; it only checks the authorization to determine if the * simulated policies allow or deny the operations. You can simulate resources that don't exist in your account. *

*

* If you want to simulate existing policies that are attached to an IAM user, group, or role, use * SimulatePrincipalPolicy instead. *

*

* Context keys are variables that are maintained by Amazon Web Services and its services and which provide details * about the context of an API query request. You can use the Condition element of an IAM policy to * evaluate context keys. To get the list of context keys that the policies require for correct simulation, use * GetContextKeysForCustomPolicy. *

*

* If the output is long, you can use MaxItems and Marker parameters to paginate the * results. *

* *

* The IAM policy simulator evaluates statements in the identity-based policy and the inputs that you provide during * simulation. The policy simulator results can differ from your live Amazon Web Services environment. We recommend * that you check your policies against your live Amazon Web Services environment after testing using the policy * simulator to confirm that you have the desired results. For more information about using the policy simulator, * see Testing IAM * policies with the IAM policy simulator in the IAM User Guide. *

*
* * @param simulateCustomPolicyRequest * @return A Java Future containing the result of the SimulateCustomPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • PolicyEvaluationException The request failed because a provided policy could not be successfully * evaluated. An additional detailed message indicates the source of the failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.SimulateCustomPolicy * @see AWS API * Documentation */ @Override public CompletableFuture simulateCustomPolicy( SimulateCustomPolicyRequest simulateCustomPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(simulateCustomPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, simulateCustomPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SimulateCustomPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(SimulateCustomPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SimulateCustomPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new SimulateCustomPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(simulateCustomPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Simulate how a set of IAM policies attached to an IAM entity works with a list of API operations and Amazon Web * Services resources to determine the policies' effective permissions. The entity can be an IAM user, group, or * role. If you specify a user, then the simulation also includes all of the policies that are attached to groups * that the user belongs to. You can simulate resources that don't exist in your account. *

*

* You can optionally include a list of one or more additional policies specified as strings to include in the * simulation. If you want to simulate only policies specified as strings, use SimulateCustomPolicy instead. *

*

* You can also optionally include one resource-based policy to be evaluated with each of the resources included in * the simulation for IAM users only. *

*

* The simulation does not perform the API operations; it only checks the authorization to determine if the * simulated policies allow or deny the operations. *

*

* Note: This operation discloses information about the permissions granted to other users. If you do not * want users to see other user's permissions, then consider allowing them to use SimulateCustomPolicy * instead. *

*

* Context keys are variables maintained by Amazon Web Services and its services that provide details about the * context of an API query request. You can use the Condition element of an IAM policy to evaluate * context keys. To get the list of context keys that the policies require for correct simulation, use * GetContextKeysForPrincipalPolicy. *

*

* If the output is long, you can use the MaxItems and Marker parameters to paginate the * results. *

* *

* The IAM policy simulator evaluates statements in the identity-based policy and the inputs that you provide during * simulation. The policy simulator results can differ from your live Amazon Web Services environment. We recommend * that you check your policies against your live Amazon Web Services environment after testing using the policy * simulator to confirm that you have the desired results. For more information about using the policy simulator, * see Testing IAM * policies with the IAM policy simulator in the IAM User Guide. *

*
* * @param simulatePrincipalPolicyRequest * @return A Java Future containing the result of the SimulatePrincipalPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • PolicyEvaluationException The request failed because a provided policy could not be successfully * evaluated. An additional detailed message indicates the source of the failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.SimulatePrincipalPolicy * @see AWS * API Documentation */ @Override public CompletableFuture simulatePrincipalPolicy( SimulatePrincipalPolicyRequest simulatePrincipalPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(simulatePrincipalPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, simulatePrincipalPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SimulatePrincipalPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(SimulatePrincipalPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SimulatePrincipalPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new SimulatePrincipalPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(simulatePrincipalPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds one or more tags to an IAM instance profile. If a tag with the same key name already exists, then that tag * is overwritten with the new value. *

*

* Each tag consists of a key name and an associated value. By assigning tags to your resources, you can do the * following: *

*
    *
  • *

    * Administrative grouping and discovery - Attach tags to resources to aid in organization and search. For * example, you could search for all resources with the key name Project and the value * MyImportantProject. Or search for all resources with the key name Cost Center and the value * 41200. *

    *
  • *
  • *

    * Access control - Include tags in IAM user-based and resource-based policies. You can use tags to restrict * access to only an IAM instance profile that has a specified tag attached. For examples of policies that show how * to use tags to control access, see Control access using IAM tags in the * IAM User Guide. *

    *
  • *
* *
    *
  • *

    * If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request * fails and the resource is not created. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

    *
  • *
  • *

    * Amazon Web Services always interprets the tag Value as a single string. If you need to store an * array, you can store comma-separated values in the string. However, you must interpret the value in your code. *

    *
  • *
*
* * @param tagInstanceProfileRequest * @return A Java Future containing the result of the TagInstanceProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.TagInstanceProfile * @see AWS API * Documentation */ @Override public CompletableFuture tagInstanceProfile(TagInstanceProfileRequest tagInstanceProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagInstanceProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagInstanceProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagInstanceProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(TagInstanceProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("TagInstanceProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new TagInstanceProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(tagInstanceProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds one or more tags to an IAM virtual multi-factor authentication (MFA) device. If a tag with the same key name * already exists, then that tag is overwritten with the new value. *

*

* A tag consists of a key name and an associated value. By assigning tags to your resources, you can do the * following: *

*
    *
  • *

    * Administrative grouping and discovery - Attach tags to resources to aid in organization and search. For * example, you could search for all resources with the key name Project and the value * MyImportantProject. Or search for all resources with the key name Cost Center and the value * 41200. *

    *
  • *
  • *

    * Access control - Include tags in IAM user-based and resource-based policies. You can use tags to restrict * access to only an IAM virtual MFA device that has a specified tag attached. For examples of policies that show * how to use tags to control access, see Control access using IAM tags in the * IAM User Guide. *

    *
  • *
* *
    *
  • *

    * If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request * fails and the resource is not created. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

    *
  • *
  • *

    * Amazon Web Services always interprets the tag Value as a single string. If you need to store an * array, you can store comma-separated values in the string. However, you must interpret the value in your code. *

    *
  • *
*
* * @param tagMfaDeviceRequest * @return A Java Future containing the result of the TagMFADevice operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.TagMFADevice * @see AWS API * Documentation */ @Override public CompletableFuture tagMFADevice(TagMfaDeviceRequest tagMfaDeviceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagMfaDeviceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagMfaDeviceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagMFADevice"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(TagMfaDeviceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("TagMFADevice").withProtocolMetadata(protocolMetadata) .withMarshaller(new TagMfaDeviceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(tagMfaDeviceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds one or more tags to an OpenID Connect (OIDC)-compatible identity provider. For more information about these * providers, see About web * identity federation. If a tag with the same key name already exists, then that tag is overwritten with the * new value. *

*

* A tag consists of a key name and an associated value. By assigning tags to your resources, you can do the * following: *

*
    *
  • *

    * Administrative grouping and discovery - Attach tags to resources to aid in organization and search. For * example, you could search for all resources with the key name Project and the value * MyImportantProject. Or search for all resources with the key name Cost Center and the value * 41200. *

    *
  • *
  • *

    * Access control - Include tags in IAM identity-based and resource-based policies. You can use tags to * restrict access to only an OIDC provider that has a specified tag attached. For examples of policies that show * how to use tags to control access, see Control access using IAM tags in the * IAM User Guide. *

    *
  • *
* *
    *
  • *

    * If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request * fails and the resource is not created. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

    *
  • *
  • *

    * Amazon Web Services always interprets the tag Value as a single string. If you need to store an * array, you can store comma-separated values in the string. However, you must interpret the value in your code. *

    *
  • *
*
* * @param tagOpenIdConnectProviderRequest * @return A Java Future containing the result of the TagOpenIDConnectProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.TagOpenIDConnectProvider * @see AWS * API Documentation */ @Override public CompletableFuture tagOpenIDConnectProvider( TagOpenIdConnectProviderRequest tagOpenIdConnectProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagOpenIdConnectProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagOpenIdConnectProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagOpenIDConnectProvider"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(TagOpenIdConnectProviderResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("TagOpenIDConnectProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new TagOpenIdConnectProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(tagOpenIdConnectProviderRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds one or more tags to an IAM customer managed policy. If a tag with the same key name already exists, then * that tag is overwritten with the new value. *

*

* A tag consists of a key name and an associated value. By assigning tags to your resources, you can do the * following: *

*
    *
  • *

    * Administrative grouping and discovery - Attach tags to resources to aid in organization and search. For * example, you could search for all resources with the key name Project and the value * MyImportantProject. Or search for all resources with the key name Cost Center and the value * 41200. *

    *
  • *
  • *

    * Access control - Include tags in IAM user-based and resource-based policies. You can use tags to restrict * access to only an IAM customer managed policy that has a specified tag attached. For examples of policies that * show how to use tags to control access, see Control access using IAM tags in the * IAM User Guide. *

    *
  • *
* *
    *
  • *

    * If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request * fails and the resource is not created. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

    *
  • *
  • *

    * Amazon Web Services always interprets the tag Value as a single string. If you need to store an * array, you can store comma-separated values in the string. However, you must interpret the value in your code. *

    *
  • *
*
* * @param tagPolicyRequest * @return A Java Future containing the result of the TagPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.TagPolicy * @see AWS API * Documentation */ @Override public CompletableFuture tagPolicy(TagPolicyRequest tagPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(TagPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("TagPolicy") .withProtocolMetadata(protocolMetadata) .withMarshaller(new TagPolicyRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withMetricCollector(apiCallMetricCollector).withInput(tagPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds one or more tags to an IAM role. The role can be a regular role or a service-linked role. If a tag with the * same key name already exists, then that tag is overwritten with the new value. *

*

* A tag consists of a key name and an associated value. By assigning tags to your resources, you can do the * following: *

*
    *
  • *

    * Administrative grouping and discovery - Attach tags to resources to aid in organization and search. For * example, you could search for all resources with the key name Project and the value * MyImportantProject. Or search for all resources with the key name Cost Center and the value * 41200. *

    *
  • *
  • *

    * Access control - Include tags in IAM user-based and resource-based policies. You can use tags to restrict * access to only an IAM role that has a specified tag attached. You can also restrict access to only those * resources that have a certain tag attached. For examples of policies that show how to use tags to control access, * see Control access using IAM tags * in the IAM User Guide. *

    *
  • *
  • *

    * Cost allocation - Use tags to help track which individuals and teams are using which Amazon Web Services * resources. *

    *
  • *
* *
    *
  • *

    * If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request * fails and the resource is not created. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

    *
  • *
  • *

    * Amazon Web Services always interprets the tag Value as a single string. If you need to store an * array, you can store comma-separated values in the string. However, you must interpret the value in your code. *

    *
  • *
*
*

* For more information about tagging, see Tagging IAM identities in the IAM * User Guide. *

* * @param tagRoleRequest * @return A Java Future containing the result of the TagRole operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.TagRole * @see AWS API * Documentation */ @Override public CompletableFuture tagRole(TagRoleRequest tagRoleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagRoleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagRoleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagRole"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(TagRoleResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("TagRole") .withProtocolMetadata(protocolMetadata).withMarshaller(new TagRoleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(tagRoleRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds one or more tags to a Security Assertion Markup Language (SAML) identity provider. For more information * about these providers, see About SAML 2.0-based * federation . If a tag with the same key name already exists, then that tag is overwritten with the new value. *

*

* A tag consists of a key name and an associated value. By assigning tags to your resources, you can do the * following: *

*
    *
  • *

    * Administrative grouping and discovery - Attach tags to resources to aid in organization and search. For * example, you could search for all resources with the key name Project and the value * MyImportantProject. Or search for all resources with the key name Cost Center and the value * 41200. *

    *
  • *
  • *

    * Access control - Include tags in IAM user-based and resource-based policies. You can use tags to restrict * access to only a SAML identity provider that has a specified tag attached. For examples of policies that show how * to use tags to control access, see Control access using IAM tags in the * IAM User Guide. *

    *
  • *
* *
    *
  • *

    * If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request * fails and the resource is not created. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

    *
  • *
  • *

    * Amazon Web Services always interprets the tag Value as a single string. If you need to store an * array, you can store comma-separated values in the string. However, you must interpret the value in your code. *

    *
  • *
*
* * @param tagSamlProviderRequest * @return A Java Future containing the result of the TagSAMLProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.TagSAMLProvider * @see AWS API * Documentation */ @Override public CompletableFuture tagSAMLProvider(TagSamlProviderRequest tagSamlProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagSamlProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagSamlProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagSAMLProvider"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(TagSamlProviderResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("TagSAMLProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new TagSamlProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(tagSamlProviderRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds one or more tags to an IAM server certificate. If a tag with the same key name already exists, then that tag * is overwritten with the new value. *

* *

* For certificates in a Region supported by Certificate Manager (ACM), we recommend that you don't use IAM server * certificates. Instead, use ACM to provision, manage, and deploy your server certificates. For more information * about IAM server certificates, Working with server * certificates in the IAM User Guide. *

*
*

* A tag consists of a key name and an associated value. By assigning tags to your resources, you can do the * following: *

*
    *
  • *

    * Administrative grouping and discovery - Attach tags to resources to aid in organization and search. For * example, you could search for all resources with the key name Project and the value * MyImportantProject. Or search for all resources with the key name Cost Center and the value * 41200. *

    *
  • *
  • *

    * Access control - Include tags in IAM user-based and resource-based policies. You can use tags to restrict * access to only a server certificate that has a specified tag attached. For examples of policies that show how to * use tags to control access, see Control access using IAM tags in the * IAM User Guide. *

    *
  • *
  • *

    * Cost allocation - Use tags to help track which individuals and teams are using which Amazon Web Services * resources. *

    *
  • *
* *
    *
  • *

    * If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request * fails and the resource is not created. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

    *
  • *
  • *

    * Amazon Web Services always interprets the tag Value as a single string. If you need to store an * array, you can store comma-separated values in the string. However, you must interpret the value in your code. *

    *
  • *
*
* * @param tagServerCertificateRequest * @return A Java Future containing the result of the TagServerCertificate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.TagServerCertificate * @see AWS API * Documentation */ @Override public CompletableFuture tagServerCertificate( TagServerCertificateRequest tagServerCertificateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagServerCertificateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagServerCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagServerCertificate"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(TagServerCertificateResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("TagServerCertificate").withProtocolMetadata(protocolMetadata) .withMarshaller(new TagServerCertificateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(tagServerCertificateRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds one or more tags to an IAM user. If a tag with the same key name already exists, then that tag is * overwritten with the new value. *

*

* A tag consists of a key name and an associated value. By assigning tags to your resources, you can do the * following: *

*
    *
  • *

    * Administrative grouping and discovery - Attach tags to resources to aid in organization and search. For * example, you could search for all resources with the key name Project and the value * MyImportantProject. Or search for all resources with the key name Cost Center and the value * 41200. *

    *
  • *
  • *

    * Access control - Include tags in IAM identity-based and resource-based policies. You can use tags to * restrict access to only an IAM requesting user that has a specified tag attached. You can also restrict access to * only those resources that have a certain tag attached. For examples of policies that show how to use tags to * control access, see Control access * using IAM tags in the IAM User Guide. *

    *
  • *
  • *

    * Cost allocation - Use tags to help track which individuals and teams are using which Amazon Web Services * resources. *

    *
  • *
* *
    *
  • *

    * If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request * fails and the resource is not created. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

    *
  • *
  • *

    * Amazon Web Services always interprets the tag Value as a single string. If you need to store an * array, you can store comma-separated values in the string. However, you must interpret the value in your code. *

    *
  • *
*
*

* For more information about tagging, see Tagging IAM identities in the IAM * User Guide. *

* * @param tagUserRequest * @return A Java Future containing the result of the TagUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.TagUser * @see AWS API * Documentation */ @Override public CompletableFuture tagUser(TagUserRequest tagUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagUser"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(TagUserResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("TagUser") .withProtocolMetadata(protocolMetadata).withMarshaller(new TagUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(tagUserRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified tags from the IAM instance profile. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* * @param untagInstanceProfileRequest * @return A Java Future containing the result of the UntagInstanceProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UntagInstanceProfile * @see AWS API * Documentation */ @Override public CompletableFuture untagInstanceProfile( UntagInstanceProfileRequest untagInstanceProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagInstanceProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagInstanceProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagInstanceProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UntagInstanceProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UntagInstanceProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new UntagInstanceProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(untagInstanceProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified tags from the IAM virtual multi-factor authentication (MFA) device. For more information * about tagging, see Tagging IAM * resources in the IAM User Guide. *

* * @param untagMfaDeviceRequest * @return A Java Future containing the result of the UntagMFADevice operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UntagMFADevice * @see AWS API * Documentation */ @Override public CompletableFuture untagMFADevice(UntagMfaDeviceRequest untagMfaDeviceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagMfaDeviceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagMfaDeviceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagMFADevice"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UntagMfaDeviceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UntagMFADevice").withProtocolMetadata(protocolMetadata) .withMarshaller(new UntagMfaDeviceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(untagMfaDeviceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified tags from the specified OpenID Connect (OIDC)-compatible identity provider in IAM. For more * information about OIDC providers, see About web identity * federation. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* * @param untagOpenIdConnectProviderRequest * @return A Java Future containing the result of the UntagOpenIDConnectProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UntagOpenIDConnectProvider * @see AWS API Documentation */ @Override public CompletableFuture untagOpenIDConnectProvider( UntagOpenIdConnectProviderRequest untagOpenIdConnectProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagOpenIdConnectProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagOpenIdConnectProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagOpenIDConnectProvider"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UntagOpenIdConnectProviderResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UntagOpenIDConnectProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new UntagOpenIdConnectProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(untagOpenIdConnectProviderRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified tags from the customer managed policy. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* * @param untagPolicyRequest * @return A Java Future containing the result of the UntagPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UntagPolicy * @see AWS API * Documentation */ @Override public CompletableFuture untagPolicy(UntagPolicyRequest untagPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UntagPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UntagPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new UntagPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(untagPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified tags from the role. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* * @param untagRoleRequest * @return A Java Future containing the result of the UntagRole operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UntagRole * @see AWS API * Documentation */ @Override public CompletableFuture untagRole(UntagRoleRequest untagRoleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagRoleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagRoleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagRole"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UntagRoleResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("UntagRole") .withProtocolMetadata(protocolMetadata) .withMarshaller(new UntagRoleRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withMetricCollector(apiCallMetricCollector).withInput(untagRoleRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified tags from the specified Security Assertion Markup Language (SAML) identity provider in IAM. * For more information about these providers, see About web identity * federation. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* * @param untagSamlProviderRequest * @return A Java Future containing the result of the UntagSAMLProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UntagSAMLProvider * @see AWS API * Documentation */ @Override public CompletableFuture untagSAMLProvider(UntagSamlProviderRequest untagSamlProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagSamlProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagSamlProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagSAMLProvider"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UntagSamlProviderResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UntagSAMLProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new UntagSamlProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(untagSamlProviderRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified tags from the IAM server certificate. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* *

* For certificates in a Region supported by Certificate Manager (ACM), we recommend that you don't use IAM server * certificates. Instead, use ACM to provision, manage, and deploy your server certificates. For more information * about IAM server certificates, Working with server * certificates in the IAM User Guide. *

*
* * @param untagServerCertificateRequest * @return A Java Future containing the result of the UntagServerCertificate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UntagServerCertificate * @see AWS * API Documentation */ @Override public CompletableFuture untagServerCertificate( UntagServerCertificateRequest untagServerCertificateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagServerCertificateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagServerCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagServerCertificate"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UntagServerCertificateResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UntagServerCertificate").withProtocolMetadata(protocolMetadata) .withMarshaller(new UntagServerCertificateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(untagServerCertificateRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the specified tags from the user. For more information about tagging, see Tagging IAM resources in the IAM User * Guide. *

* * @param untagUserRequest * @return A Java Future containing the result of the UntagUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UntagUser * @see AWS API * Documentation */ @Override public CompletableFuture untagUser(UntagUserRequest untagUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagUser"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UntagUserResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("UntagUser") .withProtocolMetadata(protocolMetadata) .withMarshaller(new UntagUserRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withMetricCollector(apiCallMetricCollector).withInput(untagUserRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Changes the status of the specified access key from Active to Inactive, or vice versa. This operation can be used * to disable a user's key as part of a key rotation workflow. *

*

* If the UserName is not specified, the user name is determined implicitly based on the Amazon Web * Services access key ID used to sign the request. If a temporary access key is used, then UserName is * required. If a long-term key is assigned to the user, then UserName is not required. This operation * works for access keys under the Amazon Web Services account. Consequently, you can use this operation to manage * Amazon Web Services account root user credentials even if the Amazon Web Services account has no associated * users. *

*

* For information about rotating keys, see Managing keys and * certificates in the IAM User Guide. *

* * @param updateAccessKeyRequest * @return A Java Future containing the result of the UpdateAccessKey operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateAccessKey * @see AWS API * Documentation */ @Override public CompletableFuture updateAccessKey(UpdateAccessKeyRequest updateAccessKeyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateAccessKeyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateAccessKeyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateAccessKey"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateAccessKeyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateAccessKey").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateAccessKeyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateAccessKeyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the password policy settings for the Amazon Web Services account. *

* *

* This operation does not support partial updates. No parameters are required, but if you do not specify a * parameter, that parameter's value reverts to its default value. See the Request Parameters section for * each parameter's default value. Also note that some parameters do not allow the default parameter to be * explicitly set. Instead, to invoke the default value, do not include that parameter when you invoke the * operation. *

*
*

* For more information about using a password policy, see Managing an IAM * password policy in the IAM User Guide. *

* * @param updateAccountPasswordPolicyRequest * @return A Java Future containing the result of the UpdateAccountPasswordPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • MalformedPolicyDocumentException The request was rejected because the policy document was malformed. * The error message describes the specific error.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateAccountPasswordPolicy * @see AWS API Documentation */ @Override public CompletableFuture updateAccountPasswordPolicy( UpdateAccountPasswordPolicyRequest updateAccountPasswordPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateAccountPasswordPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateAccountPasswordPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateAccountPasswordPolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateAccountPasswordPolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateAccountPasswordPolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateAccountPasswordPolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateAccountPasswordPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the policy that grants an IAM entity permission to assume a role. This is typically referred to as the * "role trust policy". For more information about roles, see Using roles to delegate permissions * and federate identities. *

* * @param updateAssumeRolePolicyRequest * @return A Java Future containing the result of the UpdateAssumeRolePolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • MalformedPolicyDocumentException The request was rejected because the policy document was malformed. * The error message describes the specific error.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • UnmodifiableEntityException The request was rejected because service-linked roles are protected * Amazon Web Services resources. Only the service that depends on the service-linked role can modify or * delete the role on your behalf. The error message includes the name of the service that depends on this * service-linked role. You must request the change through that service.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateAssumeRolePolicy * @see AWS * API Documentation */ @Override public CompletableFuture updateAssumeRolePolicy( UpdateAssumeRolePolicyRequest updateAssumeRolePolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateAssumeRolePolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateAssumeRolePolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateAssumeRolePolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateAssumeRolePolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateAssumeRolePolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateAssumeRolePolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateAssumeRolePolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the name and/or the path of the specified IAM group. *

* *

* You should understand the implications of changing a group's path or name. For more information, see Renaming users and * groups in the IAM User Guide. *

*
*

* The person making the request (the principal), must have permission to change the role group with the old name * and the new name. For example, to change the group named Managers to MGRs, the * principal must have a policy that allows them to update both groups. If the principal has permission to update * the Managers group, but not the MGRs group, then the update fails. For more information * about permissions, see Access * management. *

*
* * @param updateGroupRequest * @return A Java Future containing the result of the UpdateGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateGroup * @see AWS API * Documentation */ @Override public CompletableFuture updateGroup(UpdateGroupRequest updateGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Changes the password for the specified IAM user. You can use the CLI, the Amazon Web Services API, or the * Users page in the IAM console to change the password for any IAM user. Use ChangePassword to change * your own password in the My Security Credentials page in the Amazon Web Services Management Console. *

*

* For more information about modifying passwords, see Managing passwords in the * IAM User Guide. *

* * @param updateLoginProfileRequest * @return A Java Future containing the result of the UpdateLoginProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • EntityTemporarilyUnmodifiableException The request was rejected because it referenced an entity that * is temporarily unmodifiable, such as a user name that was deleted and then recreated. The error indicates * that the request is likely to succeed if you try again after waiting several minutes. The error message * describes the entity.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • PasswordPolicyViolationException The request was rejected because the provided password did not meet * the requirements imposed by the account password policy.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateLoginProfile * @see AWS API * Documentation */ @Override public CompletableFuture updateLoginProfile(UpdateLoginProfileRequest updateLoginProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateLoginProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateLoginProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateLoginProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateLoginProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateLoginProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateLoginProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateLoginProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Replaces the existing list of server certificate thumbprints associated with an OpenID Connect (OIDC) provider * resource object with a new list of thumbprints. *

*

* The list that you pass with this operation completely replaces the existing list of thumbprints. (The lists are * not merged.) *

*

* Typically, you need to update a thumbprint only when the identity provider certificate changes, which occurs * rarely. However, if the provider's certificate does change, any attempt to assume an IAM role that * specifies the OIDC provider as a principal fails until the certificate thumbprint is updated. *

* *

* Amazon Web Services secures communication with OIDC identity providers (IdPs) using our library of trusted root * certificate authorities (CAs) to verify the JSON Web Key Set (JWKS) endpoint's TLS certificate. If your OIDC IdP * relies on a certificate that is not signed by one of these trusted CAs, only then we secure communication using * the thumbprints set in the IdP's configuration. *

*
*

* Trust for the OIDC provider is derived from the provider certificate and is validated by the thumbprint. * Therefore, it is best to limit access to the UpdateOpenIDConnectProviderThumbprint operation to * highly privileged users. *

*
* * @param updateOpenIdConnectProviderThumbprintRequest * @return A Java Future containing the result of the UpdateOpenIDConnectProviderThumbprint operation returned by * the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateOpenIDConnectProviderThumbprint * @see AWS API Documentation */ @Override public CompletableFuture updateOpenIDConnectProviderThumbprint( UpdateOpenIdConnectProviderThumbprintRequest updateOpenIdConnectProviderThumbprintRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateOpenIdConnectProviderThumbprintRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateOpenIdConnectProviderThumbprintRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateOpenIDConnectProviderThumbprint"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateOpenIdConnectProviderThumbprintResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateOpenIDConnectProviderThumbprint").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateOpenIdConnectProviderThumbprintRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateOpenIdConnectProviderThumbprintRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the description or maximum session duration setting of a role. *

* * @param updateRoleRequest * @return A Java Future containing the result of the UpdateRole operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • UnmodifiableEntityException The request was rejected because service-linked roles are protected * Amazon Web Services resources. Only the service that depends on the service-linked role can modify or * delete the role on your behalf. The error message includes the name of the service that depends on this * service-linked role. You must request the change through that service.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateRole * @see AWS API * Documentation */ @Override public CompletableFuture updateRole(UpdateRoleRequest updateRoleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateRoleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateRoleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateRole"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateRoleResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("UpdateRole") .withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateRoleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateRoleRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Use UpdateRole instead. *

*

* Modifies only the description of a role. This operation performs the same function as the * Description parameter in the UpdateRole operation. *

* * @param updateRoleDescriptionRequest * @return A Java Future containing the result of the UpdateRoleDescription operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • UnmodifiableEntityException The request was rejected because service-linked roles are protected * Amazon Web Services resources. Only the service that depends on the service-linked role can modify or * delete the role on your behalf. The error message includes the name of the service that depends on this * service-linked role. You must request the change through that service.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateRoleDescription * @see AWS API * Documentation */ @Override public CompletableFuture updateRoleDescription( UpdateRoleDescriptionRequest updateRoleDescriptionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateRoleDescriptionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateRoleDescriptionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateRoleDescription"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateRoleDescriptionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateRoleDescription").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateRoleDescriptionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateRoleDescriptionRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the metadata document for an existing SAML provider resource object. *

* *

* This operation requires Signature Version 4. *

*
* * @param updateSamlProviderRequest * @return A Java Future containing the result of the UpdateSAMLProvider operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateSAMLProvider * @see AWS API * Documentation */ @Override public CompletableFuture updateSAMLProvider(UpdateSamlProviderRequest updateSamlProviderRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateSamlProviderRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateSamlProviderRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateSAMLProvider"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateSamlProviderResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateSAMLProvider").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateSamlProviderRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateSamlProviderRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Sets the status of an IAM user's SSH public key to active or inactive. SSH public keys that are inactive cannot * be used for authentication. This operation can be used to disable a user's SSH public key as part of a key * rotation work flow. *

*

* The SSH public key affected by this operation is used only for authenticating the associated IAM user to an * CodeCommit repository. For more information about using SSH keys to authenticate to an CodeCommit repository, see * Set up * CodeCommit for SSH connections in the CodeCommit User Guide. *

* * @param updateSshPublicKeyRequest * @return A Java Future containing the result of the UpdateSSHPublicKey operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateSSHPublicKey * @see AWS API * Documentation */ @Override public CompletableFuture updateSSHPublicKey(UpdateSshPublicKeyRequest updateSshPublicKeyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateSshPublicKeyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateSshPublicKeyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateSSHPublicKey"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateSshPublicKeyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateSSHPublicKey").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateSshPublicKeyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateSshPublicKeyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the name and/or the path of the specified server certificate stored in IAM. *

*

* For more information about working with server certificates, see Working with server * certificates in the IAM User Guide. This topic also includes a list of Amazon Web Services services * that can use the server certificates that you manage with IAM. *

* *

* You should understand the implications of changing a server certificate's path or name. For more information, see * Renaming a server certificate in the IAM User Guide. *

*
*

* The person making the request (the principal), must have permission to change the server certificate with the old * name and the new name. For example, to change the certificate named ProductionCert to * ProdCert, the principal must have a policy that allows them to update both certificates. If the * principal has permission to update the ProductionCert group, but not the ProdCert * certificate, then the update fails. For more information about permissions, see Access management in the IAM User * Guide. *

*
* * @param updateServerCertificateRequest * @return A Java Future containing the result of the UpdateServerCertificate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateServerCertificate * @see AWS * API Documentation */ @Override public CompletableFuture updateServerCertificate( UpdateServerCertificateRequest updateServerCertificateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateServerCertificateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateServerCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateServerCertificate"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateServerCertificateResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateServerCertificate").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateServerCertificateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateServerCertificateRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Sets the status of a service-specific credential to Active or Inactive. * Service-specific credentials that are inactive cannot be used for authentication to the service. This operation * can be used to disable a user's service-specific credential as part of a credential rotation work flow. *

* * @param updateServiceSpecificCredentialRequest * @return A Java Future containing the result of the UpdateServiceSpecificCredential operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateServiceSpecificCredential * @see AWS API Documentation */ @Override public CompletableFuture updateServiceSpecificCredential( UpdateServiceSpecificCredentialRequest updateServiceSpecificCredentialRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateServiceSpecificCredentialRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateServiceSpecificCredentialRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateServiceSpecificCredential"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateServiceSpecificCredentialResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateServiceSpecificCredential").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateServiceSpecificCredentialRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateServiceSpecificCredentialRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Changes the status of the specified user signing certificate from active to disabled, or vice versa. This * operation can be used to disable an IAM user's signing certificate as part of a certificate rotation work flow. *

*

* If the UserName field is not specified, the user name is determined implicitly based on the Amazon * Web Services access key ID used to sign the request. This operation works for access keys under the Amazon Web * Services account. Consequently, you can use this operation to manage Amazon Web Services account root user * credentials even if the Amazon Web Services account has no associated users. *

* * @param updateSigningCertificateRequest * @return A Java Future containing the result of the UpdateSigningCertificate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateSigningCertificate * @see AWS * API Documentation */ @Override public CompletableFuture updateSigningCertificate( UpdateSigningCertificateRequest updateSigningCertificateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateSigningCertificateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateSigningCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateSigningCertificate"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateSigningCertificateResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateSigningCertificate").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateSigningCertificateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateSigningCertificateRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the name and/or the path of the specified IAM user. *

* *

* You should understand the implications of changing an IAM user's path or name. For more information, see Renaming an IAM * user and Renaming an * IAM group in the IAM User Guide. *

*
*

* To change a user name, the requester must have appropriate permissions on both the source object and the target * object. For example, to change Bob to Robert, the entity making the request must have permission on Bob and * Robert, or must have permission on all (*). For more information about permissions, see Permissions and policies. *

*
* * @param updateUserRequest * @return A Java Future containing the result of the UpdateUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • EntityTemporarilyUnmodifiableException The request was rejected because it referenced an entity that * is temporarily unmodifiable, such as a user name that was deleted and then recreated. The error indicates * that the request is likely to succeed if you try again after waiting several minutes. The error message * describes the entity.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UpdateUser * @see AWS API * Documentation */ @Override public CompletableFuture updateUser(UpdateUserRequest updateUserRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateUserRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateUser"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdateUserResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("UpdateUser") .withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updateUserRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Uploads an SSH public key and associates it with the specified IAM user. *

*

* The SSH public key uploaded by this operation can be used only for authenticating the associated IAM user to an * CodeCommit repository. For more information about using SSH keys to authenticate to an CodeCommit repository, see * Set up * CodeCommit for SSH connections in the CodeCommit User Guide. *

* * @param uploadSshPublicKeyRequest * @return A Java Future containing the result of the UploadSSHPublicKey operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • InvalidPublicKeyException The request was rejected because the public key is malformed or otherwise * invalid.
  • *
  • DuplicateSshPublicKeyException The request was rejected because the SSH public key is already * associated with the specified IAM user.
  • *
  • UnrecognizedPublicKeyEncodingException The request was rejected because the public key encoding * format is unsupported or unrecognized.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UploadSSHPublicKey * @see AWS API * Documentation */ @Override public CompletableFuture uploadSSHPublicKey(UploadSshPublicKeyRequest uploadSshPublicKeyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(uploadSshPublicKeyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, uploadSshPublicKeyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UploadSSHPublicKey"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UploadSshPublicKeyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UploadSSHPublicKey").withProtocolMetadata(protocolMetadata) .withMarshaller(new UploadSshPublicKeyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(uploadSshPublicKeyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Uploads a server certificate entity for the Amazon Web Services account. The server certificate entity includes a * public key certificate, a private key, and an optional certificate chain, which should all be PEM-encoded. *

*

* We recommend that you use Certificate Manager to provision, * manage, and deploy your server certificates. With ACM you can request a certificate, deploy it to Amazon Web * Services resources, and let ACM handle certificate renewals for you. Certificates provided by ACM are free. For * more information about using ACM, see the Certificate * Manager User Guide. *

*

* For more information about working with server certificates, see Working with server * certificates in the IAM User Guide. This topic includes a list of Amazon Web Services services that * can use the server certificates that you manage with IAM. *

*

* For information about the number of server certificates you can upload, see IAM and STS quotas in the * IAM User Guide. *

* *

* Because the body of the public key certificate, private key, and the certificate chain can be large, you should * use POST rather than GET when calling UploadServerCertificate. For information about setting up * signatures and authorization through the API, see Signing Amazon Web Services * API requests in the Amazon Web Services General Reference. For general information about using the * Query API with IAM, see Calling the * API by making HTTP query requests in the IAM User Guide. *

*
* * @param uploadServerCertificateRequest * @return A Java Future containing the result of the UploadServerCertificate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • InvalidInputException The request was rejected because an invalid or out-of-range value was supplied * for an input parameter.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • MalformedCertificateException The request was rejected because the certificate was malformed or * expired. The error message describes the specific error.
  • *
  • KeyPairMismatchException The request was rejected because the public key certificate and the private * key do not match.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UploadServerCertificate * @see AWS * API Documentation */ @Override public CompletableFuture uploadServerCertificate( UploadServerCertificateRequest uploadServerCertificateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(uploadServerCertificateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, uploadServerCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UploadServerCertificate"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UploadServerCertificateResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UploadServerCertificate").withProtocolMetadata(protocolMetadata) .withMarshaller(new UploadServerCertificateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(uploadServerCertificateRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Uploads an X.509 signing certificate and associates it with the specified IAM user. Some Amazon Web Services * services require you to use certificates to validate requests that are signed with a corresponding private key. * When you upload the certificate, its default status is Active. *

*

* For information about when you would use an X.509 signing certificate, see Managing server * certificates in IAM in the IAM User Guide. *

*

* If the UserName is not specified, the IAM user name is determined implicitly based on the Amazon Web * Services access key ID used to sign the request. This operation works for access keys under the Amazon Web * Services account. Consequently, you can use this operation to manage Amazon Web Services account root user * credentials even if the Amazon Web Services account has no associated users. *

* *

* Because the body of an X.509 certificate can be large, you should use POST rather than GET when calling * UploadSigningCertificate. For information about setting up signatures and authorization through the * API, see Signing Amazon Web * Services API requests in the Amazon Web Services General Reference. For general information about * using the Query API with IAM, see Making query requests in the * IAM User Guide. *

*
* * @param uploadSigningCertificateRequest * @return A Java Future containing the result of the UploadSigningCertificate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • LimitExceededException The request was rejected because it attempted to create resources beyond the * current Amazon Web Services account limits. The error message describes the limit exceeded.
  • *
  • EntityAlreadyExistsException The request was rejected because it attempted to create a resource that * already exists.
  • *
  • MalformedCertificateException The request was rejected because the certificate was malformed or * expired. The error message describes the specific error.
  • *
  • InvalidCertificateException The request was rejected because the certificate is invalid.
  • *
  • DuplicateCertificateException The request was rejected because the same certificate is associated * with an IAM user in the account.
  • *
  • NoSuchEntityException The request was rejected because it referenced a resource entity that does not * exist. The error message describes the resource.
  • *
  • ConcurrentModificationException The request was rejected because multiple requests to change this * object were submitted simultaneously. Wait a few minutes and submit your request again.
  • *
  • ServiceFailureException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IamException Base class for all service exceptions. Unknown exceptions will be thrown as an instance * of this type.
  • *
* @sample IamAsyncClient.UploadSigningCertificate * @see AWS * API Documentation */ @Override public CompletableFuture uploadSigningCertificate( UploadSigningCertificateRequest uploadSigningCertificateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(uploadSigningCertificateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, uploadSigningCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IAM"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UploadSigningCertificate"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UploadSigningCertificateResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UploadSigningCertificate").withProtocolMetadata(protocolMetadata) .withMarshaller(new UploadSigningCertificateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(uploadSigningCertificateRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } @Override public IamAsyncWaiter waiter() { return IamAsyncWaiter.builder().client(this).scheduledExecutorService(executorService).build(); } @Override public final IamServiceClientConfiguration serviceClientConfiguration() { return new IamServiceClientConfigurationBuilder(this.clientConfiguration.toBuilder()).build(); } @Override public final String serviceName() { return SERVICE_NAME; } private AwsQueryProtocolFactory init() { return AwsQueryProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("ConcurrentModification") .exceptionBuilderSupplier(ConcurrentModificationException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("CallerIsNotManagementAccountException") .exceptionBuilderSupplier(CallerIsNotManagementAccountException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UnmodifiableEntity") .exceptionBuilderSupplier(UnmodifiableEntityException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("LimitExceeded") .exceptionBuilderSupplier(LimitExceededException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchEntity") .exceptionBuilderSupplier(NoSuchEntityException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EntityTemporarilyUnmodifiable") .exceptionBuilderSupplier(EntityTemporarilyUnmodifiableException::builder).httpStatusCode(409) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NotSupportedService") .exceptionBuilderSupplier(ServiceNotSupportedException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ServiceAccessNotEnabledException") .exceptionBuilderSupplier(ServiceAccessNotEnabledException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("OpenIdIdpCommunicationError") .exceptionBuilderSupplier(OpenIdIdpCommunicationErrorException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ReportInProgress") .exceptionBuilderSupplier(CredentialReportNotReadyException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("OrganizationNotInAllFeaturesModeException") .exceptionBuilderSupplier(OrganizationNotInAllFeaturesModeException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ServiceFailure") .exceptionBuilderSupplier(ServiceFailureException::builder).httpStatusCode(500).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidPublicKey") .exceptionBuilderSupplier(InvalidPublicKeyException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DuplicateSSHPublicKey") .exceptionBuilderSupplier(DuplicateSshPublicKeyException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("PolicyEvaluation") .exceptionBuilderSupplier(PolicyEvaluationException::builder).httpStatusCode(500).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidInput") .exceptionBuilderSupplier(InvalidInputException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("PolicyNotAttachable") .exceptionBuilderSupplier(PolicyNotAttachableException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("MalformedCertificate") .exceptionBuilderSupplier(MalformedCertificateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("MalformedPolicyDocument") .exceptionBuilderSupplier(MalformedPolicyDocumentException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DeleteConflict") .exceptionBuilderSupplier(DeleteConflictException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidCertificate") .exceptionBuilderSupplier(InvalidCertificateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("PasswordPolicyViolation") .exceptionBuilderSupplier(PasswordPolicyViolationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ReportExpired") .exceptionBuilderSupplier(CredentialReportExpiredException::builder).httpStatusCode(410).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidUserType") .exceptionBuilderSupplier(InvalidUserTypeException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AccountNotManagementOrDelegatedAdministratorException") .exceptionBuilderSupplier(AccountNotManagementOrDelegatedAdministratorException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("OrganizationNotFoundException") .exceptionBuilderSupplier(OrganizationNotFoundException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DuplicateCertificate") .exceptionBuilderSupplier(DuplicateCertificateException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("KeyPairMismatch") .exceptionBuilderSupplier(KeyPairMismatchException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EntityAlreadyExists") .exceptionBuilderSupplier(EntityAlreadyExistsException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidAuthenticationCode") .exceptionBuilderSupplier(InvalidAuthenticationCodeException::builder).httpStatusCode(403) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ReportNotPresent") .exceptionBuilderSupplier(CredentialReportNotPresentException::builder).httpStatusCode(410) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UnrecognizedPublicKeyEncoding") .exceptionBuilderSupplier(UnrecognizedPublicKeyEncodingException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ReportGenerationLimitExceeded") .exceptionBuilderSupplier(ReportGenerationLimitExceededException::builder).httpStatusCode(409) .build()).clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(IamException::builder).build(); } private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration, RequestOverrideConfiguration requestOverrideConfiguration) { List publishers = null; if (requestOverrideConfiguration != null) { publishers = requestOverrideConfiguration.metricPublishers(); } if (publishers == null || publishers.isEmpty()) { publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS); } if (publishers == null) { publishers = Collections.emptyList(); } return publishers; } private void updateRetryStrategyClientConfiguration(SdkClientConfiguration.Builder configuration) { ClientOverrideConfiguration.Builder builder = configuration.asOverrideConfigurationBuilder(); RetryMode retryMode = builder.retryMode(); if (retryMode != null) { configuration.option(SdkClientOption.RETRY_STRATEGY, AwsRetryStrategy.forRetryMode(retryMode)); } else { Consumer> configurator = builder.retryStrategyConfigurator(); if (configurator != null) { RetryStrategy.Builder defaultBuilder = AwsRetryStrategy.defaultRetryStrategy().toBuilder(); configurator.accept(defaultBuilder); configuration.option(SdkClientOption.RETRY_STRATEGY, defaultBuilder.build()); } else { RetryStrategy retryStrategy = builder.retryStrategy(); if (retryStrategy != null) { configuration.option(SdkClientOption.RETRY_STRATEGY, retryStrategy); } } } configuration.option(SdkClientOption.CONFIGURED_RETRY_MODE, null); configuration.option(SdkClientOption.CONFIGURED_RETRY_STRATEGY, null); configuration.option(SdkClientOption.CONFIGURED_RETRY_CONFIGURATOR, null); } private SdkClientConfiguration updateSdkClientConfiguration(SdkRequest request, SdkClientConfiguration clientConfiguration) { List plugins = request.overrideConfiguration().map(c -> c.plugins()).orElse(Collections.emptyList()); SdkClientConfiguration.Builder configuration = clientConfiguration.toBuilder(); if (plugins.isEmpty()) { return configuration.build(); } IamServiceClientConfigurationBuilder serviceConfigBuilder = new IamServiceClientConfigurationBuilder(configuration); for (SdkPlugin plugin : plugins) { plugin.configureClient(serviceConfigBuilder); } updateRetryStrategyClientConfiguration(configuration); return configuration.build(); } @Override public void close() { clientHandler.close(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy