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

software.amazon.awssdk.services.s3control.DefaultS3ControlAsyncClient 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.s3control;

import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
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.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.Response;
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.interceptor.SdkInternalExecutionAttribute;
import software.amazon.awssdk.core.interceptor.trait.HttpChecksumRequired;
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.xml.AwsXmlProtocolFactory;
import software.amazon.awssdk.protocols.xml.XmlOperationMetadata;
import software.amazon.awssdk.retries.api.RetryStrategy;
import software.amazon.awssdk.services.s3control.internal.S3ControlServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.s3control.model.AssociateAccessGrantsIdentityCenterRequest;
import software.amazon.awssdk.services.s3control.model.AssociateAccessGrantsIdentityCenterResponse;
import software.amazon.awssdk.services.s3control.model.BadRequestException;
import software.amazon.awssdk.services.s3control.model.BucketAlreadyExistsException;
import software.amazon.awssdk.services.s3control.model.BucketAlreadyOwnedByYouException;
import software.amazon.awssdk.services.s3control.model.CreateAccessGrantRequest;
import software.amazon.awssdk.services.s3control.model.CreateAccessGrantResponse;
import software.amazon.awssdk.services.s3control.model.CreateAccessGrantsInstanceRequest;
import software.amazon.awssdk.services.s3control.model.CreateAccessGrantsInstanceResponse;
import software.amazon.awssdk.services.s3control.model.CreateAccessGrantsLocationRequest;
import software.amazon.awssdk.services.s3control.model.CreateAccessGrantsLocationResponse;
import software.amazon.awssdk.services.s3control.model.CreateAccessPointForObjectLambdaRequest;
import software.amazon.awssdk.services.s3control.model.CreateAccessPointForObjectLambdaResponse;
import software.amazon.awssdk.services.s3control.model.CreateAccessPointRequest;
import software.amazon.awssdk.services.s3control.model.CreateAccessPointResponse;
import software.amazon.awssdk.services.s3control.model.CreateBucketRequest;
import software.amazon.awssdk.services.s3control.model.CreateBucketResponse;
import software.amazon.awssdk.services.s3control.model.CreateJobRequest;
import software.amazon.awssdk.services.s3control.model.CreateJobResponse;
import software.amazon.awssdk.services.s3control.model.CreateMultiRegionAccessPointRequest;
import software.amazon.awssdk.services.s3control.model.CreateMultiRegionAccessPointResponse;
import software.amazon.awssdk.services.s3control.model.CreateStorageLensGroupRequest;
import software.amazon.awssdk.services.s3control.model.CreateStorageLensGroupResponse;
import software.amazon.awssdk.services.s3control.model.DeleteAccessGrantRequest;
import software.amazon.awssdk.services.s3control.model.DeleteAccessGrantResponse;
import software.amazon.awssdk.services.s3control.model.DeleteAccessGrantsInstanceRequest;
import software.amazon.awssdk.services.s3control.model.DeleteAccessGrantsInstanceResourcePolicyRequest;
import software.amazon.awssdk.services.s3control.model.DeleteAccessGrantsInstanceResourcePolicyResponse;
import software.amazon.awssdk.services.s3control.model.DeleteAccessGrantsInstanceResponse;
import software.amazon.awssdk.services.s3control.model.DeleteAccessGrantsLocationRequest;
import software.amazon.awssdk.services.s3control.model.DeleteAccessGrantsLocationResponse;
import software.amazon.awssdk.services.s3control.model.DeleteAccessPointForObjectLambdaRequest;
import software.amazon.awssdk.services.s3control.model.DeleteAccessPointForObjectLambdaResponse;
import software.amazon.awssdk.services.s3control.model.DeleteAccessPointPolicyForObjectLambdaRequest;
import software.amazon.awssdk.services.s3control.model.DeleteAccessPointPolicyForObjectLambdaResponse;
import software.amazon.awssdk.services.s3control.model.DeleteAccessPointPolicyRequest;
import software.amazon.awssdk.services.s3control.model.DeleteAccessPointPolicyResponse;
import software.amazon.awssdk.services.s3control.model.DeleteAccessPointRequest;
import software.amazon.awssdk.services.s3control.model.DeleteAccessPointResponse;
import software.amazon.awssdk.services.s3control.model.DeleteBucketLifecycleConfigurationRequest;
import software.amazon.awssdk.services.s3control.model.DeleteBucketLifecycleConfigurationResponse;
import software.amazon.awssdk.services.s3control.model.DeleteBucketPolicyRequest;
import software.amazon.awssdk.services.s3control.model.DeleteBucketPolicyResponse;
import software.amazon.awssdk.services.s3control.model.DeleteBucketReplicationRequest;
import software.amazon.awssdk.services.s3control.model.DeleteBucketReplicationResponse;
import software.amazon.awssdk.services.s3control.model.DeleteBucketRequest;
import software.amazon.awssdk.services.s3control.model.DeleteBucketResponse;
import software.amazon.awssdk.services.s3control.model.DeleteBucketTaggingRequest;
import software.amazon.awssdk.services.s3control.model.DeleteBucketTaggingResponse;
import software.amazon.awssdk.services.s3control.model.DeleteJobTaggingRequest;
import software.amazon.awssdk.services.s3control.model.DeleteJobTaggingResponse;
import software.amazon.awssdk.services.s3control.model.DeleteMultiRegionAccessPointRequest;
import software.amazon.awssdk.services.s3control.model.DeleteMultiRegionAccessPointResponse;
import software.amazon.awssdk.services.s3control.model.DeletePublicAccessBlockRequest;
import software.amazon.awssdk.services.s3control.model.DeletePublicAccessBlockResponse;
import software.amazon.awssdk.services.s3control.model.DeleteStorageLensConfigurationRequest;
import software.amazon.awssdk.services.s3control.model.DeleteStorageLensConfigurationResponse;
import software.amazon.awssdk.services.s3control.model.DeleteStorageLensConfigurationTaggingRequest;
import software.amazon.awssdk.services.s3control.model.DeleteStorageLensConfigurationTaggingResponse;
import software.amazon.awssdk.services.s3control.model.DeleteStorageLensGroupRequest;
import software.amazon.awssdk.services.s3control.model.DeleteStorageLensGroupResponse;
import software.amazon.awssdk.services.s3control.model.DescribeJobRequest;
import software.amazon.awssdk.services.s3control.model.DescribeJobResponse;
import software.amazon.awssdk.services.s3control.model.DescribeMultiRegionAccessPointOperationRequest;
import software.amazon.awssdk.services.s3control.model.DescribeMultiRegionAccessPointOperationResponse;
import software.amazon.awssdk.services.s3control.model.DissociateAccessGrantsIdentityCenterRequest;
import software.amazon.awssdk.services.s3control.model.DissociateAccessGrantsIdentityCenterResponse;
import software.amazon.awssdk.services.s3control.model.GetAccessGrantRequest;
import software.amazon.awssdk.services.s3control.model.GetAccessGrantResponse;
import software.amazon.awssdk.services.s3control.model.GetAccessGrantsInstanceForPrefixRequest;
import software.amazon.awssdk.services.s3control.model.GetAccessGrantsInstanceForPrefixResponse;
import software.amazon.awssdk.services.s3control.model.GetAccessGrantsInstanceRequest;
import software.amazon.awssdk.services.s3control.model.GetAccessGrantsInstanceResourcePolicyRequest;
import software.amazon.awssdk.services.s3control.model.GetAccessGrantsInstanceResourcePolicyResponse;
import software.amazon.awssdk.services.s3control.model.GetAccessGrantsInstanceResponse;
import software.amazon.awssdk.services.s3control.model.GetAccessGrantsLocationRequest;
import software.amazon.awssdk.services.s3control.model.GetAccessGrantsLocationResponse;
import software.amazon.awssdk.services.s3control.model.GetAccessPointConfigurationForObjectLambdaRequest;
import software.amazon.awssdk.services.s3control.model.GetAccessPointConfigurationForObjectLambdaResponse;
import software.amazon.awssdk.services.s3control.model.GetAccessPointForObjectLambdaRequest;
import software.amazon.awssdk.services.s3control.model.GetAccessPointForObjectLambdaResponse;
import software.amazon.awssdk.services.s3control.model.GetAccessPointPolicyForObjectLambdaRequest;
import software.amazon.awssdk.services.s3control.model.GetAccessPointPolicyForObjectLambdaResponse;
import software.amazon.awssdk.services.s3control.model.GetAccessPointPolicyRequest;
import software.amazon.awssdk.services.s3control.model.GetAccessPointPolicyResponse;
import software.amazon.awssdk.services.s3control.model.GetAccessPointPolicyStatusForObjectLambdaRequest;
import software.amazon.awssdk.services.s3control.model.GetAccessPointPolicyStatusForObjectLambdaResponse;
import software.amazon.awssdk.services.s3control.model.GetAccessPointPolicyStatusRequest;
import software.amazon.awssdk.services.s3control.model.GetAccessPointPolicyStatusResponse;
import software.amazon.awssdk.services.s3control.model.GetAccessPointRequest;
import software.amazon.awssdk.services.s3control.model.GetAccessPointResponse;
import software.amazon.awssdk.services.s3control.model.GetBucketLifecycleConfigurationRequest;
import software.amazon.awssdk.services.s3control.model.GetBucketLifecycleConfigurationResponse;
import software.amazon.awssdk.services.s3control.model.GetBucketPolicyRequest;
import software.amazon.awssdk.services.s3control.model.GetBucketPolicyResponse;
import software.amazon.awssdk.services.s3control.model.GetBucketReplicationRequest;
import software.amazon.awssdk.services.s3control.model.GetBucketReplicationResponse;
import software.amazon.awssdk.services.s3control.model.GetBucketRequest;
import software.amazon.awssdk.services.s3control.model.GetBucketResponse;
import software.amazon.awssdk.services.s3control.model.GetBucketTaggingRequest;
import software.amazon.awssdk.services.s3control.model.GetBucketTaggingResponse;
import software.amazon.awssdk.services.s3control.model.GetBucketVersioningRequest;
import software.amazon.awssdk.services.s3control.model.GetBucketVersioningResponse;
import software.amazon.awssdk.services.s3control.model.GetDataAccessRequest;
import software.amazon.awssdk.services.s3control.model.GetDataAccessResponse;
import software.amazon.awssdk.services.s3control.model.GetJobTaggingRequest;
import software.amazon.awssdk.services.s3control.model.GetJobTaggingResponse;
import software.amazon.awssdk.services.s3control.model.GetMultiRegionAccessPointPolicyRequest;
import software.amazon.awssdk.services.s3control.model.GetMultiRegionAccessPointPolicyResponse;
import software.amazon.awssdk.services.s3control.model.GetMultiRegionAccessPointPolicyStatusRequest;
import software.amazon.awssdk.services.s3control.model.GetMultiRegionAccessPointPolicyStatusResponse;
import software.amazon.awssdk.services.s3control.model.GetMultiRegionAccessPointRequest;
import software.amazon.awssdk.services.s3control.model.GetMultiRegionAccessPointResponse;
import software.amazon.awssdk.services.s3control.model.GetMultiRegionAccessPointRoutesRequest;
import software.amazon.awssdk.services.s3control.model.GetMultiRegionAccessPointRoutesResponse;
import software.amazon.awssdk.services.s3control.model.GetPublicAccessBlockRequest;
import software.amazon.awssdk.services.s3control.model.GetPublicAccessBlockResponse;
import software.amazon.awssdk.services.s3control.model.GetStorageLensConfigurationRequest;
import software.amazon.awssdk.services.s3control.model.GetStorageLensConfigurationResponse;
import software.amazon.awssdk.services.s3control.model.GetStorageLensConfigurationTaggingRequest;
import software.amazon.awssdk.services.s3control.model.GetStorageLensConfigurationTaggingResponse;
import software.amazon.awssdk.services.s3control.model.GetStorageLensGroupRequest;
import software.amazon.awssdk.services.s3control.model.GetStorageLensGroupResponse;
import software.amazon.awssdk.services.s3control.model.IdempotencyException;
import software.amazon.awssdk.services.s3control.model.InternalServiceException;
import software.amazon.awssdk.services.s3control.model.InvalidNextTokenException;
import software.amazon.awssdk.services.s3control.model.InvalidRequestException;
import software.amazon.awssdk.services.s3control.model.JobStatusException;
import software.amazon.awssdk.services.s3control.model.ListAccessGrantsInstancesRequest;
import software.amazon.awssdk.services.s3control.model.ListAccessGrantsInstancesResponse;
import software.amazon.awssdk.services.s3control.model.ListAccessGrantsLocationsRequest;
import software.amazon.awssdk.services.s3control.model.ListAccessGrantsLocationsResponse;
import software.amazon.awssdk.services.s3control.model.ListAccessGrantsRequest;
import software.amazon.awssdk.services.s3control.model.ListAccessGrantsResponse;
import software.amazon.awssdk.services.s3control.model.ListAccessPointsForObjectLambdaRequest;
import software.amazon.awssdk.services.s3control.model.ListAccessPointsForObjectLambdaResponse;
import software.amazon.awssdk.services.s3control.model.ListAccessPointsRequest;
import software.amazon.awssdk.services.s3control.model.ListAccessPointsResponse;
import software.amazon.awssdk.services.s3control.model.ListJobsRequest;
import software.amazon.awssdk.services.s3control.model.ListJobsResponse;
import software.amazon.awssdk.services.s3control.model.ListMultiRegionAccessPointsRequest;
import software.amazon.awssdk.services.s3control.model.ListMultiRegionAccessPointsResponse;
import software.amazon.awssdk.services.s3control.model.ListRegionalBucketsRequest;
import software.amazon.awssdk.services.s3control.model.ListRegionalBucketsResponse;
import software.amazon.awssdk.services.s3control.model.ListStorageLensConfigurationsRequest;
import software.amazon.awssdk.services.s3control.model.ListStorageLensConfigurationsResponse;
import software.amazon.awssdk.services.s3control.model.ListStorageLensGroupsRequest;
import software.amazon.awssdk.services.s3control.model.ListStorageLensGroupsResponse;
import software.amazon.awssdk.services.s3control.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.s3control.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.s3control.model.NoSuchPublicAccessBlockConfigurationException;
import software.amazon.awssdk.services.s3control.model.NotFoundException;
import software.amazon.awssdk.services.s3control.model.PutAccessGrantsInstanceResourcePolicyRequest;
import software.amazon.awssdk.services.s3control.model.PutAccessGrantsInstanceResourcePolicyResponse;
import software.amazon.awssdk.services.s3control.model.PutAccessPointConfigurationForObjectLambdaRequest;
import software.amazon.awssdk.services.s3control.model.PutAccessPointConfigurationForObjectLambdaResponse;
import software.amazon.awssdk.services.s3control.model.PutAccessPointPolicyForObjectLambdaRequest;
import software.amazon.awssdk.services.s3control.model.PutAccessPointPolicyForObjectLambdaResponse;
import software.amazon.awssdk.services.s3control.model.PutAccessPointPolicyRequest;
import software.amazon.awssdk.services.s3control.model.PutAccessPointPolicyResponse;
import software.amazon.awssdk.services.s3control.model.PutBucketLifecycleConfigurationRequest;
import software.amazon.awssdk.services.s3control.model.PutBucketLifecycleConfigurationResponse;
import software.amazon.awssdk.services.s3control.model.PutBucketPolicyRequest;
import software.amazon.awssdk.services.s3control.model.PutBucketPolicyResponse;
import software.amazon.awssdk.services.s3control.model.PutBucketReplicationRequest;
import software.amazon.awssdk.services.s3control.model.PutBucketReplicationResponse;
import software.amazon.awssdk.services.s3control.model.PutBucketTaggingRequest;
import software.amazon.awssdk.services.s3control.model.PutBucketTaggingResponse;
import software.amazon.awssdk.services.s3control.model.PutBucketVersioningRequest;
import software.amazon.awssdk.services.s3control.model.PutBucketVersioningResponse;
import software.amazon.awssdk.services.s3control.model.PutJobTaggingRequest;
import software.amazon.awssdk.services.s3control.model.PutJobTaggingResponse;
import software.amazon.awssdk.services.s3control.model.PutMultiRegionAccessPointPolicyRequest;
import software.amazon.awssdk.services.s3control.model.PutMultiRegionAccessPointPolicyResponse;
import software.amazon.awssdk.services.s3control.model.PutPublicAccessBlockRequest;
import software.amazon.awssdk.services.s3control.model.PutPublicAccessBlockResponse;
import software.amazon.awssdk.services.s3control.model.PutStorageLensConfigurationRequest;
import software.amazon.awssdk.services.s3control.model.PutStorageLensConfigurationResponse;
import software.amazon.awssdk.services.s3control.model.PutStorageLensConfigurationTaggingRequest;
import software.amazon.awssdk.services.s3control.model.PutStorageLensConfigurationTaggingResponse;
import software.amazon.awssdk.services.s3control.model.S3ControlException;
import software.amazon.awssdk.services.s3control.model.SubmitMultiRegionAccessPointRoutesRequest;
import software.amazon.awssdk.services.s3control.model.SubmitMultiRegionAccessPointRoutesResponse;
import software.amazon.awssdk.services.s3control.model.TagResourceRequest;
import software.amazon.awssdk.services.s3control.model.TagResourceResponse;
import software.amazon.awssdk.services.s3control.model.TooManyRequestsException;
import software.amazon.awssdk.services.s3control.model.TooManyTagsException;
import software.amazon.awssdk.services.s3control.model.UntagResourceRequest;
import software.amazon.awssdk.services.s3control.model.UntagResourceResponse;
import software.amazon.awssdk.services.s3control.model.UpdateAccessGrantsLocationRequest;
import software.amazon.awssdk.services.s3control.model.UpdateAccessGrantsLocationResponse;
import software.amazon.awssdk.services.s3control.model.UpdateJobPriorityRequest;
import software.amazon.awssdk.services.s3control.model.UpdateJobPriorityResponse;
import software.amazon.awssdk.services.s3control.model.UpdateJobStatusRequest;
import software.amazon.awssdk.services.s3control.model.UpdateJobStatusResponse;
import software.amazon.awssdk.services.s3control.model.UpdateStorageLensGroupRequest;
import software.amazon.awssdk.services.s3control.model.UpdateStorageLensGroupResponse;
import software.amazon.awssdk.services.s3control.transform.AssociateAccessGrantsIdentityCenterRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.CreateAccessGrantRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.CreateAccessGrantsInstanceRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.CreateAccessGrantsLocationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.CreateAccessPointForObjectLambdaRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.CreateAccessPointRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.CreateBucketRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.CreateJobRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.CreateMultiRegionAccessPointRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.CreateStorageLensGroupRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteAccessGrantRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteAccessGrantsInstanceRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteAccessGrantsInstanceResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteAccessGrantsLocationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteAccessPointForObjectLambdaRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteAccessPointPolicyForObjectLambdaRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteAccessPointPolicyRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteAccessPointRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteBucketLifecycleConfigurationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteBucketPolicyRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteBucketReplicationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteBucketRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteBucketTaggingRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteJobTaggingRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteMultiRegionAccessPointRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeletePublicAccessBlockRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteStorageLensConfigurationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteStorageLensConfigurationTaggingRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DeleteStorageLensGroupRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DescribeJobRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DescribeMultiRegionAccessPointOperationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.DissociateAccessGrantsIdentityCenterRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetAccessGrantRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetAccessGrantsInstanceForPrefixRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetAccessGrantsInstanceRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetAccessGrantsInstanceResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetAccessGrantsLocationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetAccessPointConfigurationForObjectLambdaRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetAccessPointForObjectLambdaRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetAccessPointPolicyForObjectLambdaRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetAccessPointPolicyRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetAccessPointPolicyStatusForObjectLambdaRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetAccessPointPolicyStatusRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetAccessPointRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetBucketLifecycleConfigurationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetBucketPolicyRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetBucketReplicationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetBucketRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetBucketTaggingRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetBucketVersioningRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetDataAccessRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetJobTaggingRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetMultiRegionAccessPointPolicyRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetMultiRegionAccessPointPolicyStatusRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetMultiRegionAccessPointRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetMultiRegionAccessPointRoutesRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetPublicAccessBlockRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetStorageLensConfigurationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetStorageLensConfigurationTaggingRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.GetStorageLensGroupRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.ListAccessGrantsInstancesRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.ListAccessGrantsLocationsRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.ListAccessGrantsRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.ListAccessPointsForObjectLambdaRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.ListAccessPointsRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.ListJobsRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.ListMultiRegionAccessPointsRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.ListRegionalBucketsRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.ListStorageLensConfigurationsRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.ListStorageLensGroupsRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutAccessGrantsInstanceResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutAccessPointConfigurationForObjectLambdaRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutAccessPointPolicyForObjectLambdaRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutAccessPointPolicyRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutBucketLifecycleConfigurationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutBucketPolicyRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutBucketReplicationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutBucketTaggingRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutBucketVersioningRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutJobTaggingRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutMultiRegionAccessPointPolicyRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutPublicAccessBlockRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutStorageLensConfigurationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.PutStorageLensConfigurationTaggingRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.SubmitMultiRegionAccessPointRoutesRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.UpdateAccessGrantsLocationRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.UpdateJobPriorityRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.UpdateJobStatusRequestMarshaller;
import software.amazon.awssdk.services.s3control.transform.UpdateStorageLensGroupRequestMarshaller;
import software.amazon.awssdk.utils.CompletableFutureUtils;

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

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

    private final AsyncClientHandler clientHandler;

    private final AwsXmlProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

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

    /**
     * 

* Associate your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance. Use this * action if you want to create access grants for users or groups from your corporate identity directory. First, you * must add your corporate identity directory to Amazon Web Services IAM Identity Center. Then, you can associate * this IAM Identity Center instance with your S3 Access Grants instance. *

*
*
Permissions
*
*

* You must have the s3:AssociateAccessGrantsIdentityCenter permission to use this operation. *

*
*
Additional Permissions
*
*

* You must also have the following permissions: sso:CreateApplication, * sso:PutApplicationGrant, and sso:PutApplicationAuthenticationMethod. *

*
*
* * @param associateAccessGrantsIdentityCenterRequest * @return A Java Future containing the result of the AssociateAccessGrantsIdentityCenter 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.AssociateAccessGrantsIdentityCenter * @see AWS API Documentation */ @Override public CompletableFuture associateAccessGrantsIdentityCenter( AssociateAccessGrantsIdentityCenterRequest associateAccessGrantsIdentityCenterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateAccessGrantsIdentityCenterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateAccessGrantsIdentityCenterRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateAccessGrantsIdentityCenter"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(AssociateAccessGrantsIdentityCenterResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateAccessGrantsIdentityCenter") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateAccessGrantsIdentityCenterRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(associateAccessGrantsIdentityCenterRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an access grant that gives a grantee access to your S3 data. The grantee can be an IAM user or role or a * directory user, or group. Before you can create a grant, you must have an S3 Access Grants instance in the same * Region as the S3 data. You can create an S3 Access Grants instance using the CreateAccessGrantsInstance. You must also have registered at least one S3 data location in your S3 Access * Grants instance using CreateAccessGrantsLocation. *

*
*
Permissions
*
*

* You must have the s3:CreateAccessGrant permission to use this operation. *

*
*
Additional Permissions
*
*

* For any directory identity - sso:DescribeInstance and sso:DescribeApplication *

*

* For directory users - identitystore:DescribeUser *

*

* For directory groups - identitystore:DescribeGroup *

*
*
* * @param createAccessGrantRequest * @return A Java Future containing the result of the CreateAccessGrant 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.CreateAccessGrant * @see AWS * API Documentation */ @Override public CompletableFuture createAccessGrant(CreateAccessGrantRequest createAccessGrantRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAccessGrantRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createAccessGrantRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAccessGrant"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(CreateAccessGrantResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateAccessGrant") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateAccessGrantRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(createAccessGrantRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an S3 Access Grants instance, which serves as a logical grouping for access grants. You can create one S3 * Access Grants instance per Region per account. *

*
*
Permissions
*
*

* You must have the s3:CreateAccessGrantsInstance permission to use this operation. *

*
*
Additional Permissions
*
*

* To associate an IAM Identity Center instance with your S3 Access Grants instance, you must also have the * sso:DescribeInstance, sso:CreateApplication, sso:PutApplicationGrant, and * sso:PutApplicationAuthenticationMethod permissions. *

*
*
* * @param createAccessGrantsInstanceRequest * @return A Java Future containing the result of the CreateAccessGrantsInstance 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.CreateAccessGrantsInstance * @see AWS API Documentation */ @Override public CompletableFuture createAccessGrantsInstance( CreateAccessGrantsInstanceRequest createAccessGrantsInstanceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAccessGrantsInstanceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createAccessGrantsInstanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAccessGrantsInstance"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(CreateAccessGrantsInstanceResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateAccessGrantsInstance") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateAccessGrantsInstanceRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(createAccessGrantsInstanceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* The S3 data location that you would like to register in your S3 Access Grants instance. Your S3 data must be in * the same Region as your S3 Access Grants instance. The location can be one of the following: *

*
    *
  • *

    * The default S3 location s3:// *

    *
  • *
  • *

    * A bucket - S3://<bucket-name> *

    *
  • *
  • *

    * A bucket and prefix - S3://<bucket-name>/<prefix> *

    *
  • *
*

* When you register a location, you must include the IAM role that has permission to manage the S3 location that * you are registering. Give S3 Access Grants permission to assume this role using a policy. S3 * Access Grants assumes this role to manage access to the location and to vend temporary credentials to grantees or * client applications. *

*
*
Permissions
*
*

* You must have the s3:CreateAccessGrantsLocation permission to use this operation. *

*
*
Additional Permissions
*
*

* You must also have the following permission for the specified IAM role: iam:PassRole *

*
*
* * @param createAccessGrantsLocationRequest * @return A Java Future containing the result of the CreateAccessGrantsLocation 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.CreateAccessGrantsLocation * @see AWS API Documentation */ @Override public CompletableFuture createAccessGrantsLocation( CreateAccessGrantsLocationRequest createAccessGrantsLocationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAccessGrantsLocationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createAccessGrantsLocationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAccessGrantsLocation"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(CreateAccessGrantsLocationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateAccessGrantsLocation") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateAccessGrantsLocationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(createAccessGrantsLocationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Creates an access point and associates it with the specified bucket. For more information, see Managing Data Access with Amazon * S3 Access Points in the Amazon S3 User Guide. *

*

* *

* S3 on Outposts only supports VPC-style access points. *

*

* For more information, see * Accessing Amazon S3 on Outposts using virtual private cloud (VPC) only access points in the Amazon S3 User * Guide. *

* *

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

*

* The following actions are related to CreateAccessPoint: *

* * * @param createAccessPointRequest * @return A Java Future containing the result of the CreateAccessPoint 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.CreateAccessPoint * @see AWS * API Documentation */ @Override public CompletableFuture createAccessPoint(CreateAccessPointRequest createAccessPointRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAccessPointRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createAccessPointRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAccessPoint"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(CreateAccessPointResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateAccessPoint").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateAccessPointRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(createAccessPointRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Creates an Object Lambda Access Point. For more information, see Transforming objects with * Object Lambda Access Points in the Amazon S3 User Guide. *

*

* The following actions are related to CreateAccessPointForObjectLambda: *

* * * @param createAccessPointForObjectLambdaRequest * @return A Java Future containing the result of the CreateAccessPointForObjectLambda 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.CreateAccessPointForObjectLambda * @see AWS API Documentation */ @Override public CompletableFuture createAccessPointForObjectLambda( CreateAccessPointForObjectLambdaRequest createAccessPointForObjectLambdaRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAccessPointForObjectLambdaRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createAccessPointForObjectLambdaRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAccessPointForObjectLambda"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(CreateAccessPointForObjectLambdaResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateAccessPointForObjectLambda").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateAccessPointForObjectLambdaRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(createAccessPointForObjectLambdaRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This action creates an Amazon S3 on Outposts bucket. To create an S3 bucket, see Create Bucket in the Amazon * S3 API Reference. *

*
*

* Creates a new Outposts bucket. By creating the bucket, you become the bucket owner. To create an Outposts bucket, * you must have S3 on Outposts. For more information, see Using Amazon S3 on Outposts in * Amazon S3 User Guide. *

*

* Not every string is an acceptable bucket name. For information on bucket naming restrictions, see Working * with Amazon S3 Buckets. *

*

* S3 on Outposts buckets support: *

*
    *
  • *

    * Tags *

    *
  • *
  • *

    * LifecycleConfigurations for deleting expired objects *

    *
  • *
*

* For a complete list of restrictions and Amazon S3 feature limitations on S3 on Outposts, see Amazon S3 * on Outposts Restrictions and Limitations. *

*

* For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname * prefix and x-amz-outpost-id in your API request, see the Examples section. *

*

* The following actions are related to CreateBucket for Amazon S3 on Outposts: *

* * * @param createBucketRequest * @return A Java Future containing the result of the CreateBucket 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. *
    *
  • BucketAlreadyExistsException The requested Outposts bucket name is not available. The bucket * namespace is shared by all users of the Outposts in this Region. Select a different name and try again.
  • *
  • BucketAlreadyOwnedByYouException The Outposts bucket you tried to create already exists, and you own * it.
  • *
  • 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.CreateBucket * @see AWS API * Documentation */ @Override public CompletableFuture createBucket(CreateBucketRequest createBucketRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createBucketRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createBucketRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateBucket"); HttpResponseHandler> responseHandler = protocolFactory.createCombinedResponseHandler( CreateBucketResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateBucket") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateBucketRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(createBucketRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* This operation creates an S3 Batch Operations job. *

*

* You can use S3 Batch Operations to perform large-scale batch actions on Amazon S3 objects. Batch Operations can * run a single action on lists of Amazon S3 objects that you specify. For more information, see S3 Batch Operations in the * Amazon S3 User Guide. *

*
*
Permissions
*
*

* For information about permissions required to use the Batch Operations, see Granting * permissions for S3 Batch Operations in the Amazon S3 User Guide. *

*
*
*

*

* Related actions include: *

* * * @param createJobRequest * @return A Java Future containing the result of the CreateJob 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. *
    *
  • TooManyRequestsException
  • *
  • BadRequestException
  • *
  • IdempotencyException
  • *
  • InternalServiceException
  • *
  • 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.CreateJob * @see AWS API * Documentation */ @Override public CompletableFuture createJob(CreateJobRequest createJobRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createJobRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createJobRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateJob"); HttpResponseHandler> responseHandler = protocolFactory.createCombinedResponseHandler( CreateJobResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("CreateJob") .withRequestConfiguration(clientConfiguration).withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateJobRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(createJobRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Creates a Multi-Region Access Point and associates it with the specified buckets. For more information about * creating Multi-Region Access Points, see Creating * Multi-Region Access Points in the Amazon S3 User Guide. *

*

* This action will always be routed to the US West (Oregon) Region. For more information about the restrictions * around working with Multi-Region Access Points, see Multi-Region * Access Point restrictions and limitations in the Amazon S3 User Guide. *

*

* This request is asynchronous, meaning that you might receive a response before the command has completed. When * this request provides a response, it provides a token that you can use to monitor the status of the request with * DescribeMultiRegionAccessPointOperation. *

*

* The following actions are related to CreateMultiRegionAccessPoint: *

* * * @param createMultiRegionAccessPointRequest * @return A Java Future containing the result of the CreateMultiRegionAccessPoint 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.CreateMultiRegionAccessPoint * @see AWS API Documentation */ @Override public CompletableFuture createMultiRegionAccessPoint( CreateMultiRegionAccessPointRequest createMultiRegionAccessPointRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createMultiRegionAccessPointRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createMultiRegionAccessPointRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateMultiRegionAccessPoint"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(CreateMultiRegionAccessPointResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateMultiRegionAccessPoint") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateMultiRegionAccessPointRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(createMultiRegionAccessPointRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new S3 Storage Lens group and associates it with the specified Amazon Web Services account ID. An S3 * Storage Lens group is a custom grouping of objects based on prefix, suffix, object tags, object size, object age, * or a combination of these filters. For each Storage Lens group that you’ve created, you can also optionally add * Amazon Web Services resource tags. For more information about S3 Storage Lens groups, see Working with S3 * Storage Lens groups. *

*

* To use this operation, you must have the permission to perform the s3:CreateStorageLensGroup action. * If you’re trying to create a Storage Lens group with Amazon Web Services resource tags, you must also have * permission to perform the s3:TagResource action. For more information about the required Storage * Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. *

*

* For information about Storage Lens groups errors, see List of Amazon S3 * Storage Lens error codes. *

* * @param createStorageLensGroupRequest * @return A Java Future containing the result of the CreateStorageLensGroup 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.CreateStorageLensGroup * @see AWS API Documentation */ @Override public CompletableFuture createStorageLensGroup( CreateStorageLensGroupRequest createStorageLensGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createStorageLensGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createStorageLensGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateStorageLensGroup"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(CreateStorageLensGroupResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateStorageLensGroup").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateStorageLensGroupRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(createStorageLensGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the access grant from the S3 Access Grants instance. You cannot undo an access grant deletion and the * grantee will no longer have access to the S3 data. *

*
*
Permissions
*
*

* You must have the s3:DeleteAccessGrant permission to use this operation. *

*
*
* * @param deleteAccessGrantRequest * @return A Java Future containing the result of the DeleteAccessGrant 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteAccessGrant * @see AWS * API Documentation */ @Override public CompletableFuture deleteAccessGrant(DeleteAccessGrantRequest deleteAccessGrantRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAccessGrantRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAccessGrantRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAccessGrant"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteAccessGrantResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAccessGrant") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAccessGrantRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(deleteAccessGrantRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes your S3 Access Grants instance. You must first delete the access grants and locations before S3 Access * Grants can delete the instance. See DeleteAccessGrant * and * DeleteAccessGrantsLocation. If you have associated an IAM Identity Center instance with your S3 Access Grants * instance, you must first dissassociate the Identity Center instance from the S3 Access Grants instance before you * can delete the S3 Access Grants instance. See AssociateAccessGrantsIdentityCenter and DissociateAccessGrantsIdentityCenter. *

*
*
Permissions
*
*

* You must have the s3:DeleteAccessGrantsInstance permission to use this operation. *

*
*
* * @param deleteAccessGrantsInstanceRequest * @return A Java Future containing the result of the DeleteAccessGrantsInstance 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteAccessGrantsInstance * @see AWS API Documentation */ @Override public CompletableFuture deleteAccessGrantsInstance( DeleteAccessGrantsInstanceRequest deleteAccessGrantsInstanceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAccessGrantsInstanceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAccessGrantsInstanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAccessGrantsInstance"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteAccessGrantsInstanceResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAccessGrantsInstance") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAccessGrantsInstanceRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(deleteAccessGrantsInstanceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the resource policy of the S3 Access Grants instance. The resource policy is used to manage cross-account * access to your S3 Access Grants instance. By deleting the resource policy, you delete any cross-account * permissions to your S3 Access Grants instance. *

*
*
Permissions
*
*

* You must have the s3:DeleteAccessGrantsInstanceResourcePolicy permission to use this operation. *

*
*
* * @param deleteAccessGrantsInstanceResourcePolicyRequest * @return A Java Future containing the result of the DeleteAccessGrantsInstanceResourcePolicy 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteAccessGrantsInstanceResourcePolicy * @see AWS API Documentation */ @Override public CompletableFuture deleteAccessGrantsInstanceResourcePolicy( DeleteAccessGrantsInstanceResourcePolicyRequest deleteAccessGrantsInstanceResourcePolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( deleteAccessGrantsInstanceResourcePolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAccessGrantsInstanceResourcePolicyRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAccessGrantsInstanceResourcePolicy"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteAccessGrantsInstanceResourcePolicyResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAccessGrantsInstanceResourcePolicy") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAccessGrantsInstanceResourcePolicyRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(deleteAccessGrantsInstanceResourcePolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deregisters a location from your S3 Access Grants instance. You can only delete a location registration from an * S3 Access Grants instance if there are no grants associated with this location. See Delete a grant for * information on how to delete grants. You need to have at least one registered location in your S3 Access Grants * instance in order to create access grants. *

*
*
Permissions
*
*

* You must have the s3:DeleteAccessGrantsLocation permission to use this operation. *

*
*
* * @param deleteAccessGrantsLocationRequest * @return A Java Future containing the result of the DeleteAccessGrantsLocation 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteAccessGrantsLocation * @see AWS API Documentation */ @Override public CompletableFuture deleteAccessGrantsLocation( DeleteAccessGrantsLocationRequest deleteAccessGrantsLocationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAccessGrantsLocationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAccessGrantsLocationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAccessGrantsLocation"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteAccessGrantsLocationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAccessGrantsLocation") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAccessGrantsLocationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(deleteAccessGrantsLocationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Deletes the specified access point. *

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following actions are related to DeleteAccessPoint: *

* * * @param deleteAccessPointRequest * @return A Java Future containing the result of the DeleteAccessPoint 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteAccessPoint * @see AWS * API Documentation */ @Override public CompletableFuture deleteAccessPoint(DeleteAccessPointRequest deleteAccessPointRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAccessPointRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAccessPointRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAccessPoint"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteAccessPointResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAccessPoint").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAccessPointRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deleteAccessPointRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Deletes the specified Object Lambda Access Point. *

*

* The following actions are related to DeleteAccessPointForObjectLambda: *

* * * @param deleteAccessPointForObjectLambdaRequest * @return A Java Future containing the result of the DeleteAccessPointForObjectLambda 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteAccessPointForObjectLambda * @see AWS API Documentation */ @Override public CompletableFuture deleteAccessPointForObjectLambda( DeleteAccessPointForObjectLambdaRequest deleteAccessPointForObjectLambdaRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAccessPointForObjectLambdaRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAccessPointForObjectLambdaRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAccessPointForObjectLambda"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteAccessPointForObjectLambdaResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAccessPointForObjectLambda").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAccessPointForObjectLambdaRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deleteAccessPointForObjectLambdaRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Deletes the access point policy for the specified access point. *

*

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following actions are related to DeleteAccessPointPolicy: *

* * * @param deleteAccessPointPolicyRequest * @return A Java Future containing the result of the DeleteAccessPointPolicy 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteAccessPointPolicy * @see AWS API Documentation */ @Override public CompletableFuture deleteAccessPointPolicy( DeleteAccessPointPolicyRequest deleteAccessPointPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAccessPointPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAccessPointPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAccessPointPolicy"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteAccessPointPolicyResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAccessPointPolicy").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAccessPointPolicyRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deleteAccessPointPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Removes the resource policy for an Object Lambda Access Point. *

*

* The following actions are related to DeleteAccessPointPolicyForObjectLambda: *

* * * @param deleteAccessPointPolicyForObjectLambdaRequest * @return A Java Future containing the result of the DeleteAccessPointPolicyForObjectLambda 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteAccessPointPolicyForObjectLambda * @see AWS API Documentation */ @Override public CompletableFuture deleteAccessPointPolicyForObjectLambda( DeleteAccessPointPolicyForObjectLambdaRequest deleteAccessPointPolicyForObjectLambdaRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAccessPointPolicyForObjectLambdaRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAccessPointPolicyForObjectLambdaRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAccessPointPolicyForObjectLambda"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteAccessPointPolicyForObjectLambdaResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAccessPointPolicyForObjectLambda") .withRequestConfiguration(clientConfiguration).withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAccessPointPolicyForObjectLambdaRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deleteAccessPointPolicyForObjectLambdaRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This action deletes an Amazon S3 on Outposts bucket. To delete an S3 bucket, see DeleteBucket in the Amazon S3 * API Reference. *

*
*

* Deletes the Amazon S3 on Outposts bucket. All objects (including all object versions and delete markers) in the * bucket must be deleted before the bucket itself can be deleted. For more information, see Using Amazon S3 on Outposts in * Amazon S3 User Guide. *

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* Related Resources *

* * * @param deleteBucketRequest * @return A Java Future containing the result of the DeleteBucket 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteBucket * @see AWS API * Documentation */ @Override public CompletableFuture deleteBucket(DeleteBucketRequest deleteBucketRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteBucketRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteBucketRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBucket"); HttpResponseHandler> responseHandler = protocolFactory.createCombinedResponseHandler( DeleteBucketResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteBucket").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteBucketRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deleteBucketRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This action deletes an Amazon S3 on Outposts bucket's lifecycle configuration. To delete an S3 bucket's lifecycle * configuration, see DeleteBucketLifecycle * in the Amazon S3 API Reference. *

*
*

* Deletes the lifecycle configuration from the specified Outposts bucket. Amazon S3 on Outposts removes all the * lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your objects never expire, * and Amazon S3 on Outposts no longer automatically deletes any objects on the basis of rules contained in the * deleted lifecycle configuration. For more information, see Using Amazon S3 on Outposts in * Amazon S3 User Guide. *

*

* To use this operation, you must have permission to perform the s3-outposts:PutLifecycleConfiguration * action. By default, the bucket owner has this permission and the Outposts bucket owner can grant this permission * to others. *

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* For more information about object expiration, see Elements to Describe Lifecycle Actions. *

*

* Related actions include: *

* * * @param deleteBucketLifecycleConfigurationRequest * @return A Java Future containing the result of the DeleteBucketLifecycleConfiguration 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteBucketLifecycleConfiguration * @see AWS API Documentation */ @Override public CompletableFuture deleteBucketLifecycleConfiguration( DeleteBucketLifecycleConfigurationRequest deleteBucketLifecycleConfigurationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteBucketLifecycleConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteBucketLifecycleConfigurationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBucketLifecycleConfiguration"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteBucketLifecycleConfigurationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteBucketLifecycleConfiguration") .withRequestConfiguration(clientConfiguration).withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteBucketLifecycleConfigurationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deleteBucketLifecycleConfigurationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This action deletes an Amazon S3 on Outposts bucket policy. To delete an S3 bucket policy, see DeleteBucketPolicy in the * Amazon S3 API Reference. *

*
*

* This implementation of the DELETE action uses the policy subresource to delete the policy of a specified Amazon * S3 on Outposts bucket. If you are using an identity other than the root user of the Amazon Web Services account * that owns the bucket, the calling identity must have the s3-outposts:DeleteBucketPolicy permissions * on the specified Outposts bucket and belong to the bucket owner's account to use this action. For more * information, see Using Amazon * S3 on Outposts in Amazon S3 User Guide. *

*

* If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a 403 Access Denied * error. If you have the correct permissions, but you're not using an identity that belongs to the bucket owner's * account, Amazon S3 returns a 405 Method Not Allowed error. *

* *

* As a security precaution, the root user of the Amazon Web Services account that owns a bucket can always use this * action, even if the policy explicitly denies the root user the ability to perform this action. *

*
*

* For more information about bucket policies, see Using Bucket Policies and User * Policies. *

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following actions are related to DeleteBucketPolicy: *

* * * @param deleteBucketPolicyRequest * @return A Java Future containing the result of the DeleteBucketPolicy 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteBucketPolicy * @see AWS * API Documentation */ @Override public CompletableFuture deleteBucketPolicy(DeleteBucketPolicyRequest deleteBucketPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteBucketPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteBucketPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBucketPolicy"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteBucketPolicyResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteBucketPolicy").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteBucketPolicyRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deleteBucketPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation deletes an Amazon S3 on Outposts bucket's replication configuration. To delete an S3 bucket's * replication configuration, see DeleteBucketReplication in the Amazon S3 API Reference. *

*
*

* Deletes the replication configuration from the specified S3 on Outposts bucket. *

*

* To use this operation, you must have permissions to perform the * s3-outposts:PutReplicationConfiguration action. The Outposts bucket owner has this permission by * default and can grant it to others. For more information about permissions, see Setting up IAM with S3 on * Outposts and Managing access to S3 on * Outposts buckets in the Amazon S3 User Guide. *

* *

* It can take a while to propagate PUT or DELETE requests for a replication configuration * to all S3 on Outposts systems. Therefore, the replication configuration that's returned by a GET * request soon after a PUT or DELETE request might return a more recent result than * what's on the Outpost. If an Outpost is offline, the delay in updating the replication configuration on that * Outpost can be significant. *

*
*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* For information about S3 replication on Outposts configuration, see Replicating objects for * S3 on Outposts in the Amazon S3 User Guide. *

*

* The following operations are related to DeleteBucketReplication: *

* * * @param deleteBucketReplicationRequest * @return A Java Future containing the result of the DeleteBucketReplication 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteBucketReplication * @see AWS API Documentation */ @Override public CompletableFuture deleteBucketReplication( DeleteBucketReplicationRequest deleteBucketReplicationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteBucketReplicationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteBucketReplicationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBucketReplication"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteBucketReplicationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteBucketReplication").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteBucketReplicationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deleteBucketReplicationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This action deletes an Amazon S3 on Outposts bucket's tags. To delete an S3 bucket tags, see DeleteBucketTagging in * the Amazon S3 API Reference. *

*
*

* Deletes the tags from the Outposts bucket. For more information, see Using Amazon S3 on Outposts in * Amazon S3 User Guide. *

*

* To use this action, you must have permission to perform the PutBucketTagging action. By default, the * bucket owner has this permission and can grant this permission to others. *

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following actions are related to DeleteBucketTagging: *

* * * @param deleteBucketTaggingRequest * @return A Java Future containing the result of the DeleteBucketTagging 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteBucketTagging * @see AWS * API Documentation */ @Override public CompletableFuture deleteBucketTagging( DeleteBucketTaggingRequest deleteBucketTaggingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteBucketTaggingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteBucketTaggingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBucketTagging"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteBucketTaggingResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteBucketTagging").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteBucketTaggingRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deleteBucketTaggingRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the entire tag set from the specified S3 Batch Operations job. *

*
*
Permissions
*
*

* To use the DeleteJobTagging operation, you must have permission to perform the * s3:DeleteJobTagging action. For more information, see Controlling access and labeling jobs using tags in the Amazon S3 User Guide. *

*
*
*

* Related actions include: *

* * * @param deleteJobTaggingRequest * @return A Java Future containing the result of the DeleteJobTagging 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. *
    *
  • InternalServiceException
  • *
  • TooManyRequestsException
  • *
  • NotFoundException
  • *
  • 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteJobTagging * @see AWS * API Documentation */ @Override public CompletableFuture deleteJobTagging(DeleteJobTaggingRequest deleteJobTaggingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteJobTaggingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteJobTaggingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteJobTagging"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteJobTaggingResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteJobTagging").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteJobTaggingRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deleteJobTaggingRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Deletes a Multi-Region Access Point. This action does not delete the buckets associated with the Multi-Region * Access Point, only the Multi-Region Access Point itself. *

*

* This action will always be routed to the US West (Oregon) Region. For more information about the restrictions * around working with Multi-Region Access Points, see Multi-Region * Access Point restrictions and limitations in the Amazon S3 User Guide. *

*

* This request is asynchronous, meaning that you might receive a response before the command has completed. When * this request provides a response, it provides a token that you can use to monitor the status of the request with * DescribeMultiRegionAccessPointOperation. *

*

* The following actions are related to DeleteMultiRegionAccessPoint: *

* * * @param deleteMultiRegionAccessPointRequest * @return A Java Future containing the result of the DeleteMultiRegionAccessPoint 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteMultiRegionAccessPoint * @see AWS API Documentation */ @Override public CompletableFuture deleteMultiRegionAccessPoint( DeleteMultiRegionAccessPointRequest deleteMultiRegionAccessPointRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteMultiRegionAccessPointRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteMultiRegionAccessPointRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteMultiRegionAccessPoint"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteMultiRegionAccessPointResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteMultiRegionAccessPoint") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteMultiRegionAccessPointRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(deleteMultiRegionAccessPointRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Removes the PublicAccessBlock configuration for an Amazon Web Services account. For more * information, see Using Amazon S3 * block public access. *

*

* Related actions include: *

* * * @param deletePublicAccessBlockRequest * @return A Java Future containing the result of the DeletePublicAccessBlock 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeletePublicAccessBlock * @see AWS API Documentation */ @Override public CompletableFuture deletePublicAccessBlock( DeletePublicAccessBlockRequest deletePublicAccessBlockRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deletePublicAccessBlockRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deletePublicAccessBlockRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePublicAccessBlock"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeletePublicAccessBlockResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeletePublicAccessBlock").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeletePublicAccessBlockRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deletePublicAccessBlockRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Deletes the Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see Assessing your storage activity and * usage with Amazon S3 Storage Lens in the Amazon S3 User Guide. *

* *

* To use this action, you must have permission to perform the s3:DeleteStorageLensConfiguration * action. For more information, see Setting permissions to * use Amazon S3 Storage Lens in the Amazon S3 User Guide. *

*
* * @param deleteStorageLensConfigurationRequest * @return A Java Future containing the result of the DeleteStorageLensConfiguration 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteStorageLensConfiguration * @see AWS API Documentation */ @Override public CompletableFuture deleteStorageLensConfiguration( DeleteStorageLensConfigurationRequest deleteStorageLensConfigurationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteStorageLensConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteStorageLensConfigurationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteStorageLensConfiguration"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteStorageLensConfigurationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteStorageLensConfiguration").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteStorageLensConfigurationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deleteStorageLensConfigurationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Deletes the Amazon S3 Storage Lens configuration tags. For more information about S3 Storage Lens, see Assessing your storage activity and * usage with Amazon S3 Storage Lens in the Amazon S3 User Guide. *

* *

* To use this action, you must have permission to perform the s3:DeleteStorageLensConfigurationTagging * action. For more information, see Setting permissions to * use Amazon S3 Storage Lens in the Amazon S3 User Guide. *

*
* * @param deleteStorageLensConfigurationTaggingRequest * @return A Java Future containing the result of the DeleteStorageLensConfigurationTagging 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteStorageLensConfigurationTagging * @see AWS API Documentation */ @Override public CompletableFuture deleteStorageLensConfigurationTagging( DeleteStorageLensConfigurationTaggingRequest deleteStorageLensConfigurationTaggingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteStorageLensConfigurationTaggingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteStorageLensConfigurationTaggingRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteStorageLensConfigurationTagging"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteStorageLensConfigurationTaggingResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteStorageLensConfigurationTagging") .withRequestConfiguration(clientConfiguration).withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteStorageLensConfigurationTaggingRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deleteStorageLensConfigurationTaggingRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes an existing S3 Storage Lens group. *

*

* To use this operation, you must have the permission to perform the s3:DeleteStorageLensGroup action. * For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. *

*

* For information about Storage Lens groups errors, see List of Amazon S3 * Storage Lens error codes. *

* * @param deleteStorageLensGroupRequest * @return A Java Future containing the result of the DeleteStorageLensGroup 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DeleteStorageLensGroup * @see AWS API Documentation */ @Override public CompletableFuture deleteStorageLensGroup( DeleteStorageLensGroupRequest deleteStorageLensGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteStorageLensGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteStorageLensGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteStorageLensGroup"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DeleteStorageLensGroupResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteStorageLensGroup").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteStorageLensGroupRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(deleteStorageLensGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the configuration parameters and status for a Batch Operations job. For more information, see S3 Batch Operations in the * Amazon S3 User Guide. *

*
*
Permissions
*
*

* To use the DescribeJob operation, you must have permission to perform the * s3:DescribeJob action. *

*
*
*

* Related actions include: *

* * * @param describeJobRequest * @return A Java Future containing the result of the DescribeJob 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. *
    *
  • BadRequestException
  • *
  • TooManyRequestsException
  • *
  • NotFoundException
  • *
  • InternalServiceException
  • *
  • 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DescribeJob * @see AWS API * Documentation */ @Override public CompletableFuture describeJob(DescribeJobRequest describeJobRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeJobRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeJobRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeJob"); HttpResponseHandler> responseHandler = protocolFactory.createCombinedResponseHandler( DescribeJobResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeJob").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeJobRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(describeJobRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Retrieves the status of an asynchronous request to manage a Multi-Region Access Point. For more information about * managing Multi-Region Access Points and how asynchronous requests work, see Using Multi-Region Access * Points in the Amazon S3 User Guide. *

*

* The following actions are related to GetMultiRegionAccessPoint: *

* * * @param describeMultiRegionAccessPointOperationRequest * @return A Java Future containing the result of the DescribeMultiRegionAccessPointOperation 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DescribeMultiRegionAccessPointOperation * @see AWS API Documentation */ @Override public CompletableFuture describeMultiRegionAccessPointOperation( DescribeMultiRegionAccessPointOperationRequest describeMultiRegionAccessPointOperationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeMultiRegionAccessPointOperationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeMultiRegionAccessPointOperationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeMultiRegionAccessPointOperation"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DescribeMultiRegionAccessPointOperationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeMultiRegionAccessPointOperation") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeMultiRegionAccessPointOperationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(describeMultiRegionAccessPointOperationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Dissociates the Amazon Web Services IAM Identity Center instance from the S3 Access Grants instance. *

*
*
Permissions
*
*

* You must have the s3:DissociateAccessGrantsIdentityCenter permission to use this operation. *

*
*
Additional Permissions
*
*

* You must have the sso:DeleteApplication permission to use this operation. *

*
*
* * @param dissociateAccessGrantsIdentityCenterRequest * @return A Java Future containing the result of the DissociateAccessGrantsIdentityCenter 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.DissociateAccessGrantsIdentityCenter * @see AWS API Documentation */ @Override public CompletableFuture dissociateAccessGrantsIdentityCenter( DissociateAccessGrantsIdentityCenterRequest dissociateAccessGrantsIdentityCenterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(dissociateAccessGrantsIdentityCenterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, dissociateAccessGrantsIdentityCenterRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DissociateAccessGrantsIdentityCenter"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(DissociateAccessGrantsIdentityCenterResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DissociateAccessGrantsIdentityCenter") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new DissociateAccessGrantsIdentityCenterRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(dissociateAccessGrantsIdentityCenterRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Get the details of an access grant from your S3 Access Grants instance. *

*
*
Permissions
*
*

* You must have the s3:GetAccessGrant permission to use this operation. *

*
*
* * @param getAccessGrantRequest * @return A Java Future containing the result of the GetAccessGrant 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetAccessGrant * @see AWS API * Documentation */ @Override public CompletableFuture getAccessGrant(GetAccessGrantRequest getAccessGrantRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccessGrantRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccessGrantRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccessGrant"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetAccessGrantResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccessGrant") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccessGrantRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(getAccessGrantRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the S3 Access Grants instance for a Region in your account. *

*
*
Permissions
*
*

* You must have the s3:GetAccessGrantsInstance permission to use this operation. *

*
*
* * @param getAccessGrantsInstanceRequest * @return A Java Future containing the result of the GetAccessGrantsInstance 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetAccessGrantsInstance * @see AWS API Documentation */ @Override public CompletableFuture getAccessGrantsInstance( GetAccessGrantsInstanceRequest getAccessGrantsInstanceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccessGrantsInstanceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccessGrantsInstanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccessGrantsInstance"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetAccessGrantsInstanceResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccessGrantsInstance") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccessGrantsInstanceRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(getAccessGrantsInstanceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieve the S3 Access Grants instance that contains a particular prefix. *

*
*
Permissions
*
*

* You must have the s3:GetAccessGrantsInstanceForPrefix permission for the caller account to use this * operation. *

*
*
Additional Permissions
*
*

* The prefix owner account must grant you the following permissions to their S3 Access Grants instance: * s3:GetAccessGrantsInstanceForPrefix. *

*
*
* * @param getAccessGrantsInstanceForPrefixRequest * @return A Java Future containing the result of the GetAccessGrantsInstanceForPrefix 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetAccessGrantsInstanceForPrefix * @see AWS API Documentation */ @Override public CompletableFuture getAccessGrantsInstanceForPrefix( GetAccessGrantsInstanceForPrefixRequest getAccessGrantsInstanceForPrefixRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccessGrantsInstanceForPrefixRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccessGrantsInstanceForPrefixRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccessGrantsInstanceForPrefix"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetAccessGrantsInstanceForPrefixResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccessGrantsInstanceForPrefix") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccessGrantsInstanceForPrefixRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(getAccessGrantsInstanceForPrefixRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns the resource policy of the S3 Access Grants instance. *

*
*
Permissions
*
*

* You must have the s3:GetAccessGrantsInstanceResourcePolicy permission to use this operation. *

*
*
* * @param getAccessGrantsInstanceResourcePolicyRequest * @return A Java Future containing the result of the GetAccessGrantsInstanceResourcePolicy 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetAccessGrantsInstanceResourcePolicy * @see AWS API Documentation */ @Override public CompletableFuture getAccessGrantsInstanceResourcePolicy( GetAccessGrantsInstanceResourcePolicyRequest getAccessGrantsInstanceResourcePolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccessGrantsInstanceResourcePolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccessGrantsInstanceResourcePolicyRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccessGrantsInstanceResourcePolicy"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetAccessGrantsInstanceResourcePolicyResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccessGrantsInstanceResourcePolicy") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccessGrantsInstanceResourcePolicyRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(getAccessGrantsInstanceResourcePolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the details of a particular location registered in your S3 Access Grants instance. *

*
*
Permissions
*
*

* You must have the s3:GetAccessGrantsLocation permission to use this operation. *

*
*
* * @param getAccessGrantsLocationRequest * @return A Java Future containing the result of the GetAccessGrantsLocation 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetAccessGrantsLocation * @see AWS API Documentation */ @Override public CompletableFuture getAccessGrantsLocation( GetAccessGrantsLocationRequest getAccessGrantsLocationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccessGrantsLocationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccessGrantsLocationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccessGrantsLocation"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetAccessGrantsLocationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccessGrantsLocation") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccessGrantsLocationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(getAccessGrantsLocationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Returns configuration information about the specified access point. *

*

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following actions are related to GetAccessPoint: *

* * * @param getAccessPointRequest * @return A Java Future containing the result of the GetAccessPoint 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetAccessPoint * @see AWS API * Documentation */ @Override public CompletableFuture getAccessPoint(GetAccessPointRequest getAccessPointRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccessPointRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccessPointRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccessPoint"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetAccessPointResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccessPoint").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccessPointRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getAccessPointRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Returns configuration for an Object Lambda Access Point. *

*

* The following actions are related to GetAccessPointConfigurationForObjectLambda: *

* * * @param getAccessPointConfigurationForObjectLambdaRequest * @return A Java Future containing the result of the GetAccessPointConfigurationForObjectLambda 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetAccessPointConfigurationForObjectLambda * @see AWS API Documentation */ @Override public CompletableFuture getAccessPointConfigurationForObjectLambda( GetAccessPointConfigurationForObjectLambdaRequest getAccessPointConfigurationForObjectLambdaRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( getAccessPointConfigurationForObjectLambdaRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccessPointConfigurationForObjectLambdaRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccessPointConfigurationForObjectLambda"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetAccessPointConfigurationForObjectLambdaResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccessPointConfigurationForObjectLambda") .withRequestConfiguration(clientConfiguration).withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccessPointConfigurationForObjectLambdaRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getAccessPointConfigurationForObjectLambdaRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Returns configuration information about the specified Object Lambda Access Point *

*

* The following actions are related to GetAccessPointForObjectLambda: *

* * * @param getAccessPointForObjectLambdaRequest * @return A Java Future containing the result of the GetAccessPointForObjectLambda 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetAccessPointForObjectLambda * @see AWS API Documentation */ @Override public CompletableFuture getAccessPointForObjectLambda( GetAccessPointForObjectLambdaRequest getAccessPointForObjectLambdaRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccessPointForObjectLambdaRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccessPointForObjectLambdaRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccessPointForObjectLambda"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetAccessPointForObjectLambdaResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccessPointForObjectLambda").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccessPointForObjectLambdaRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getAccessPointForObjectLambdaRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Returns the access point policy associated with the specified access point. *

*

* The following actions are related to GetAccessPointPolicy: *

* * * @param getAccessPointPolicyRequest * @return A Java Future containing the result of the GetAccessPointPolicy 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetAccessPointPolicy * @see AWS API Documentation */ @Override public CompletableFuture getAccessPointPolicy( GetAccessPointPolicyRequest getAccessPointPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccessPointPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccessPointPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccessPointPolicy"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetAccessPointPolicyResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccessPointPolicy").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccessPointPolicyRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getAccessPointPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Returns the resource policy for an Object Lambda Access Point. *

*

* The following actions are related to GetAccessPointPolicyForObjectLambda: *

* * * @param getAccessPointPolicyForObjectLambdaRequest * @return A Java Future containing the result of the GetAccessPointPolicyForObjectLambda 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetAccessPointPolicyForObjectLambda * @see AWS API Documentation */ @Override public CompletableFuture getAccessPointPolicyForObjectLambda( GetAccessPointPolicyForObjectLambdaRequest getAccessPointPolicyForObjectLambdaRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccessPointPolicyForObjectLambdaRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccessPointPolicyForObjectLambdaRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccessPointPolicyForObjectLambda"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetAccessPointPolicyForObjectLambdaResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccessPointPolicyForObjectLambda") .withRequestConfiguration(clientConfiguration).withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccessPointPolicyForObjectLambdaRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getAccessPointPolicyForObjectLambdaRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Indicates whether the specified access point currently has a policy that allows public access. For more * information about public access through access points, see Managing Data Access with Amazon * S3 access points in the Amazon S3 User Guide. *

* * @param getAccessPointPolicyStatusRequest * @return A Java Future containing the result of the GetAccessPointPolicyStatus 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetAccessPointPolicyStatus * @see AWS API Documentation */ @Override public CompletableFuture getAccessPointPolicyStatus( GetAccessPointPolicyStatusRequest getAccessPointPolicyStatusRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccessPointPolicyStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccessPointPolicyStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccessPointPolicyStatus"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetAccessPointPolicyStatusResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccessPointPolicyStatus").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccessPointPolicyStatusRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getAccessPointPolicyStatusRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Returns the status of the resource policy associated with an Object Lambda Access Point. *

* * @param getAccessPointPolicyStatusForObjectLambdaRequest * @return A Java Future containing the result of the GetAccessPointPolicyStatusForObjectLambda 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetAccessPointPolicyStatusForObjectLambda * @see AWS API Documentation */ @Override public CompletableFuture getAccessPointPolicyStatusForObjectLambda( GetAccessPointPolicyStatusForObjectLambdaRequest getAccessPointPolicyStatusForObjectLambdaRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( getAccessPointPolicyStatusForObjectLambdaRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccessPointPolicyStatusForObjectLambdaRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccessPointPolicyStatusForObjectLambda"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetAccessPointPolicyStatusForObjectLambdaResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAccessPointPolicyStatusForObjectLambda") .withRequestConfiguration(clientConfiguration).withProtocolMetadata(protocolMetadata) .withMarshaller(new GetAccessPointPolicyStatusForObjectLambdaRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getAccessPointPolicyStatusForObjectLambdaRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Gets an Amazon S3 on Outposts bucket. For more information, see Using Amazon S3 on Outposts * in the Amazon S3 User Guide. *

*

* If you are using an identity other than the root user of the Amazon Web Services account that owns the Outposts * bucket, the calling identity must have the s3-outposts:GetBucket permissions on the specified * Outposts bucket and belong to the Outposts bucket owner's account in order to use this action. Only users from * Outposts bucket owner account with the right permissions can perform actions on an Outposts bucket. *

*

* If you don't have s3-outposts:GetBucket permissions or you're not using an identity that belongs to * the bucket owner's account, Amazon S3 returns a 403 Access Denied error. *

*

* The following actions are related to GetBucket for Amazon S3 on Outposts: *

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

* * * @param getBucketRequest * @return A Java Future containing the result of the GetBucket 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetBucket * @see AWS API * Documentation */ @Override public CompletableFuture getBucket(GetBucketRequest getBucketRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getBucketRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getBucketRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBucket"); HttpResponseHandler> responseHandler = protocolFactory.createCombinedResponseHandler( GetBucketResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetBucket") .withRequestConfiguration(clientConfiguration).withProtocolMetadata(protocolMetadata) .withMarshaller(new GetBucketRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getBucketRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This action gets an Amazon S3 on Outposts bucket's lifecycle configuration. To get an S3 bucket's lifecycle * configuration, see GetBucketLifecycleConfiguration in the Amazon S3 API Reference. *

*
*

* Returns the lifecycle configuration information set on the Outposts bucket. For more information, see Using Amazon S3 on Outposts * and for information about lifecycle configuration, see Object Lifecycle * Management in Amazon S3 User Guide. *

*

* To use this action, you must have permission to perform the s3-outposts:GetLifecycleConfiguration * action. The Outposts bucket owner has this permission, by default. The bucket owner can grant this permission to * others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions * to Your Amazon S3 Resources. *

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* GetBucketLifecycleConfiguration has the following special error: *

*
    *
  • *

    * Error code: NoSuchLifecycleConfiguration *

    *
      *
    • *

      * Description: The lifecycle configuration does not exist. *

      *
    • *
    • *

      * HTTP Status Code: 404 Not Found *

      *
    • *
    • *

      * SOAP Fault Code Prefix: Client *

      *
    • *
    *
  • *
*

* The following actions are related to GetBucketLifecycleConfiguration: *

* * * @param getBucketLifecycleConfigurationRequest * @return A Java Future containing the result of the GetBucketLifecycleConfiguration 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetBucketLifecycleConfiguration * @see AWS API Documentation */ @Override public CompletableFuture getBucketLifecycleConfiguration( GetBucketLifecycleConfigurationRequest getBucketLifecycleConfigurationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getBucketLifecycleConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getBucketLifecycleConfigurationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBucketLifecycleConfiguration"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetBucketLifecycleConfigurationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetBucketLifecycleConfiguration").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetBucketLifecycleConfigurationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getBucketLifecycleConfigurationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This action gets a bucket policy for an Amazon S3 on Outposts bucket. To get a policy for an S3 bucket, see GetBucketPolicy in the * Amazon S3 API Reference. *

*
*

* Returns the policy of a specified Outposts bucket. For more information, see Using Amazon S3 on Outposts in * the Amazon S3 User Guide. *

*

* If you are using an identity other than the root user of the Amazon Web Services account that owns the bucket, * the calling identity must have the GetBucketPolicy permissions on the specified bucket and belong to * the bucket owner's account in order to use this action. *

*

* Only users from Outposts bucket owner account with the right permissions can perform actions on an Outposts * bucket. If you don't have s3-outposts:GetBucketPolicy permissions or you're not using an identity * that belongs to the bucket owner's account, Amazon S3 returns a 403 Access Denied error. *

* *

* As a security precaution, the root user of the Amazon Web Services account that owns a bucket can always use this * action, even if the policy explicitly denies the root user the ability to perform this action. *

*
*

* For more information about bucket policies, see Using Bucket Policies and User * Policies. *

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following actions are related to GetBucketPolicy: *

* * * @param getBucketPolicyRequest * @return A Java Future containing the result of the GetBucketPolicy 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetBucketPolicy * @see AWS API * Documentation */ @Override public CompletableFuture getBucketPolicy(GetBucketPolicyRequest getBucketPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getBucketPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getBucketPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBucketPolicy"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetBucketPolicyResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetBucketPolicy").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetBucketPolicyRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getBucketPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation gets an Amazon S3 on Outposts bucket's replication configuration. To get an S3 bucket's * replication configuration, see GetBucketReplication in * the Amazon S3 API Reference. *

*
*

* Returns the replication configuration of an S3 on Outposts bucket. For more information about S3 on Outposts, see * Using Amazon S3 on Outposts * in the Amazon S3 User Guide. For information about S3 replication on Outposts configuration, see Replicating objects for * S3 on Outposts in the Amazon S3 User Guide. *

* *

* It can take a while to propagate PUT or DELETE requests for a replication configuration * to all S3 on Outposts systems. Therefore, the replication configuration that's returned by a GET * request soon after a PUT or DELETE request might return a more recent result than * what's on the Outpost. If an Outpost is offline, the delay in updating the replication configuration on that * Outpost can be significant. *

*
*

* This action requires permissions for the s3-outposts:GetReplicationConfiguration action. The * Outposts bucket owner has this permission by default and can grant it to others. For more information about * permissions, see Setting up * IAM with S3 on Outposts and Managing access to S3 on * Outposts bucket in the Amazon S3 User Guide. *

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* If you include the Filter element in a replication configuration, you must also include the * DeleteMarkerReplication, Status, and Priority elements. The response also * returns those elements. *

*

* For information about S3 on Outposts replication failure reasons, see Replication failure reasons in the Amazon S3 User Guide. *

*

* The following operations are related to GetBucketReplication: *

* * * @param getBucketReplicationRequest * @return A Java Future containing the result of the GetBucketReplication 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetBucketReplication * @see AWS API Documentation */ @Override public CompletableFuture getBucketReplication( GetBucketReplicationRequest getBucketReplicationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getBucketReplicationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getBucketReplicationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBucketReplication"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetBucketReplicationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetBucketReplication").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetBucketReplicationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getBucketReplicationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This action gets an Amazon S3 on Outposts bucket's tags. To get an S3 bucket tags, see GetBucketTagging in the * Amazon S3 API Reference. *

*
*

* Returns the tag set associated with the Outposts bucket. For more information, see Using Amazon S3 on Outposts in * the Amazon S3 User Guide. *

*

* To use this action, you must have permission to perform the GetBucketTagging action. By default, the * bucket owner has this permission and can grant this permission to others. *

*

* GetBucketTagging has the following special error: *

*
    *
  • *

    * Error code: NoSuchTagSetError *

    *
      *
    • *

      * Description: There is no tag set associated with the bucket. *

      *
    • *
    *
  • *
*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following actions are related to GetBucketTagging: *

* * * @param getBucketTaggingRequest * @return A Java Future containing the result of the GetBucketTagging 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetBucketTagging * @see AWS * API Documentation */ @Override public CompletableFuture getBucketTagging(GetBucketTaggingRequest getBucketTaggingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getBucketTaggingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getBucketTaggingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBucketTagging"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetBucketTaggingResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetBucketTagging").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetBucketTaggingRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getBucketTaggingRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation returns the versioning state for S3 on Outposts buckets only. To return the versioning state for * an S3 bucket, see GetBucketVersioning in * the Amazon S3 API Reference. *

*
*

* Returns the versioning state for an S3 on Outposts bucket. With S3 Versioning, you can save multiple distinct * copies of your objects and recover from unintended user actions and application failures. *

*

* If you've never set versioning on your bucket, it has no versioning state. In that case, the * GetBucketVersioning request does not return a versioning state value. *

*

* For more information about versioning, see Versioning in the Amazon S3 * User Guide. *

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following operations are related to GetBucketVersioning for S3 on Outposts. *

* * * @param getBucketVersioningRequest * @return A Java Future containing the result of the GetBucketVersioning 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetBucketVersioning * @see AWS * API Documentation */ @Override public CompletableFuture getBucketVersioning( GetBucketVersioningRequest getBucketVersioningRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getBucketVersioningRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getBucketVersioningRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBucketVersioning"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetBucketVersioningResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetBucketVersioning").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetBucketVersioningRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getBucketVersioningRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a temporary access credential from S3 Access Grants to the grantee or client application. The temporary credential is an * Amazon Web Services STS token that grants them access to the S3 data. *

*
*
Permissions
*
*

* You must have the s3:GetDataAccess permission to use this operation. *

*
*
Additional Permissions
*
*

* The IAM role that S3 Access Grants assumes must have the following permissions specified in the trust policy when * registering the location: sts:AssumeRole, for directory users or groups sts:SetContext, * and for IAM users or roles sts:SetSourceIdentity. *

*
*
* * @param getDataAccessRequest * @return A Java Future containing the result of the GetDataAccess 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetDataAccess * @see AWS API * Documentation */ @Override public CompletableFuture getDataAccess(GetDataAccessRequest getDataAccessRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getDataAccessRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getDataAccessRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetDataAccess"); HttpResponseHandler> responseHandler = protocolFactory.createCombinedResponseHandler( GetDataAccessResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetDataAccess") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetDataAccessRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(getDataAccessRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns the tags on an S3 Batch Operations job. *

*
*
Permissions
*
*

* To use the GetJobTagging operation, you must have permission to perform the * s3:GetJobTagging action. For more information, see Controlling access and labeling jobs using tags in the Amazon S3 User Guide. *

*
*
*

* Related actions include: *

* * * @param getJobTaggingRequest * @return A Java Future containing the result of the GetJobTagging 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. *
    *
  • InternalServiceException
  • *
  • TooManyRequestsException
  • *
  • NotFoundException
  • *
  • 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetJobTagging * @see AWS API * Documentation */ @Override public CompletableFuture getJobTagging(GetJobTaggingRequest getJobTaggingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getJobTaggingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getJobTaggingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetJobTagging"); HttpResponseHandler> responseHandler = protocolFactory.createCombinedResponseHandler( GetJobTaggingResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetJobTagging").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetJobTaggingRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getJobTaggingRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Returns configuration information about the specified Multi-Region Access Point. *

*

* This action will always be routed to the US West (Oregon) Region. For more information about the restrictions * around working with Multi-Region Access Points, see Multi-Region * Access Point restrictions and limitations in the Amazon S3 User Guide. *

*

* The following actions are related to GetMultiRegionAccessPoint: *

* * * @param getMultiRegionAccessPointRequest * @return A Java Future containing the result of the GetMultiRegionAccessPoint 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetMultiRegionAccessPoint * @see AWS API Documentation */ @Override public CompletableFuture getMultiRegionAccessPoint( GetMultiRegionAccessPointRequest getMultiRegionAccessPointRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getMultiRegionAccessPointRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getMultiRegionAccessPointRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetMultiRegionAccessPoint"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetMultiRegionAccessPointResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetMultiRegionAccessPoint") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetMultiRegionAccessPointRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(getMultiRegionAccessPointRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Returns the access control policy of the specified Multi-Region Access Point. *

*

* This action will always be routed to the US West (Oregon) Region. For more information about the restrictions * around working with Multi-Region Access Points, see Multi-Region * Access Point restrictions and limitations in the Amazon S3 User Guide. *

*

* The following actions are related to GetMultiRegionAccessPointPolicy: *

* * * @param getMultiRegionAccessPointPolicyRequest * @return A Java Future containing the result of the GetMultiRegionAccessPointPolicy 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetMultiRegionAccessPointPolicy * @see AWS API Documentation */ @Override public CompletableFuture getMultiRegionAccessPointPolicy( GetMultiRegionAccessPointPolicyRequest getMultiRegionAccessPointPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getMultiRegionAccessPointPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getMultiRegionAccessPointPolicyRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetMultiRegionAccessPointPolicy"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetMultiRegionAccessPointPolicyResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetMultiRegionAccessPointPolicy") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetMultiRegionAccessPointPolicyRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(getMultiRegionAccessPointPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Indicates whether the specified Multi-Region Access Point has an access control policy that allows public access. *

*

* This action will always be routed to the US West (Oregon) Region. For more information about the restrictions * around working with Multi-Region Access Points, see Multi-Region * Access Point restrictions and limitations in the Amazon S3 User Guide. *

*

* The following actions are related to GetMultiRegionAccessPointPolicyStatus: *

* * * @param getMultiRegionAccessPointPolicyStatusRequest * @return A Java Future containing the result of the GetMultiRegionAccessPointPolicyStatus 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetMultiRegionAccessPointPolicyStatus * @see AWS API Documentation */ @Override public CompletableFuture getMultiRegionAccessPointPolicyStatus( GetMultiRegionAccessPointPolicyStatusRequest getMultiRegionAccessPointPolicyStatusRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getMultiRegionAccessPointPolicyStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getMultiRegionAccessPointPolicyStatusRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetMultiRegionAccessPointPolicyStatus"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetMultiRegionAccessPointPolicyStatusResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetMultiRegionAccessPointPolicyStatus") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetMultiRegionAccessPointPolicyStatusRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(getMultiRegionAccessPointPolicyStatusRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Returns the routing configuration for a Multi-Region Access Point, indicating which Regions are active or * passive. *

*

* To obtain routing control changes and failover requests, use the Amazon S3 failover control infrastructure * endpoints in these five Amazon Web Services Regions: *

*
    *
  • *

    * us-east-1 *

    *
  • *
  • *

    * us-west-2 *

    *
  • *
  • *

    * ap-southeast-2 *

    *
  • *
  • *

    * ap-northeast-1 *

    *
  • *
  • *

    * eu-west-1 *

    *
  • *
* * @param getMultiRegionAccessPointRoutesRequest * @return A Java Future containing the result of the GetMultiRegionAccessPointRoutes 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetMultiRegionAccessPointRoutes * @see AWS API Documentation */ @Override public CompletableFuture getMultiRegionAccessPointRoutes( GetMultiRegionAccessPointRoutesRequest getMultiRegionAccessPointRoutesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getMultiRegionAccessPointRoutesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getMultiRegionAccessPointRoutesRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetMultiRegionAccessPointRoutes"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetMultiRegionAccessPointRoutesResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetMultiRegionAccessPointRoutes") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetMultiRegionAccessPointRoutesRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(getMultiRegionAccessPointRoutesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Retrieves the PublicAccessBlock configuration for an Amazon Web Services account. For more * information, see Using Amazon S3 * block public access. *

*

* Related actions include: *

* * * @param getPublicAccessBlockRequest * @return A Java Future containing the result of the GetPublicAccessBlock 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. *
    *
  • NoSuchPublicAccessBlockConfigurationException Amazon S3 throws this exception if you make a * GetPublicAccessBlock request against an account that doesn't have a * PublicAccessBlockConfiguration set.
  • *
  • 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetPublicAccessBlock * @see AWS API Documentation */ @Override public CompletableFuture getPublicAccessBlock( GetPublicAccessBlockRequest getPublicAccessBlockRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getPublicAccessBlockRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getPublicAccessBlockRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetPublicAccessBlock"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetPublicAccessBlockResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetPublicAccessBlock").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetPublicAccessBlockRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getPublicAccessBlockRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Gets the Amazon S3 Storage Lens configuration. For more information, see Assessing your storage activity and * usage with Amazon S3 Storage Lens in the Amazon S3 User Guide. For a complete list of S3 Storage Lens * metrics, see S3 Storage Lens * metrics glossary in the Amazon S3 User Guide. *

* *

* To use this action, you must have permission to perform the s3:GetStorageLensConfiguration action. * For more information, see Setting permissions to * use Amazon S3 Storage Lens in the Amazon S3 User Guide. *

*
* * @param getStorageLensConfigurationRequest * @return A Java Future containing the result of the GetStorageLensConfiguration 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetStorageLensConfiguration * @see AWS API Documentation */ @Override public CompletableFuture getStorageLensConfiguration( GetStorageLensConfigurationRequest getStorageLensConfigurationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getStorageLensConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getStorageLensConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetStorageLensConfiguration"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetStorageLensConfigurationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetStorageLensConfiguration").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetStorageLensConfigurationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getStorageLensConfigurationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Gets the tags of Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see Assessing your storage activity and * usage with Amazon S3 Storage Lens in the Amazon S3 User Guide. *

* *

* To use this action, you must have permission to perform the s3:GetStorageLensConfigurationTagging * action. For more information, see Setting permissions to * use Amazon S3 Storage Lens in the Amazon S3 User Guide. *

*
* * @param getStorageLensConfigurationTaggingRequest * @return A Java Future containing the result of the GetStorageLensConfigurationTagging 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetStorageLensConfigurationTagging * @see AWS API Documentation */ @Override public CompletableFuture getStorageLensConfigurationTagging( GetStorageLensConfigurationTaggingRequest getStorageLensConfigurationTaggingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getStorageLensConfigurationTaggingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getStorageLensConfigurationTaggingRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetStorageLensConfigurationTagging"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetStorageLensConfigurationTaggingResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetStorageLensConfigurationTagging") .withRequestConfiguration(clientConfiguration).withProtocolMetadata(protocolMetadata) .withMarshaller(new GetStorageLensConfigurationTaggingRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getStorageLensConfigurationTaggingRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the Storage Lens group configuration details. *

*

* To use this operation, you must have the permission to perform the s3:GetStorageLensGroup action. * For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. *

*

* For information about Storage Lens groups errors, see List of Amazon S3 * Storage Lens error codes. *

* * @param getStorageLensGroupRequest * @return A Java Future containing the result of the GetStorageLensGroup 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.GetStorageLensGroup * @see AWS * API Documentation */ @Override public CompletableFuture getStorageLensGroup( GetStorageLensGroupRequest getStorageLensGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getStorageLensGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getStorageLensGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetStorageLensGroup"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(GetStorageLensGroupResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetStorageLensGroup").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetStorageLensGroupRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getStorageLensGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns the list of access grants in your S3 Access Grants instance. *

*
*
Permissions
*
*

* You must have the s3:ListAccessGrants permission to use this operation. *

*
*
* * @param listAccessGrantsRequest * @return A Java Future containing the result of the ListAccessGrants 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.ListAccessGrants * @see AWS * API Documentation */ @Override public CompletableFuture listAccessGrants(ListAccessGrantsRequest listAccessGrantsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAccessGrantsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAccessGrantsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAccessGrants"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(ListAccessGrantsResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAccessGrants") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListAccessGrantsRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(listAccessGrantsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of S3 Access Grants instances. An S3 Access Grants instance serves as a logical grouping for your * individual access grants. You can only have one S3 Access Grants instance per Region per account. *

*
*
Permissions
*
*

* You must have the s3:ListAccessGrantsInstances permission to use this operation. *

*
*
* * @param listAccessGrantsInstancesRequest * @return A Java Future containing the result of the ListAccessGrantsInstances 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.ListAccessGrantsInstances * @see AWS API Documentation */ @Override public CompletableFuture listAccessGrantsInstances( ListAccessGrantsInstancesRequest listAccessGrantsInstancesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAccessGrantsInstancesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAccessGrantsInstancesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAccessGrantsInstances"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(ListAccessGrantsInstancesResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAccessGrantsInstances") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListAccessGrantsInstancesRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(listAccessGrantsInstancesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of the locations registered in your S3 Access Grants instance. *

*
*
Permissions
*
*

* You must have the s3:ListAccessGrantsLocations permission to use this operation. *

*
*
* * @param listAccessGrantsLocationsRequest * @return A Java Future containing the result of the ListAccessGrantsLocations 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.ListAccessGrantsLocations * @see AWS API Documentation */ @Override public CompletableFuture listAccessGrantsLocations( ListAccessGrantsLocationsRequest listAccessGrantsLocationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAccessGrantsLocationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAccessGrantsLocationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAccessGrantsLocations"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(ListAccessGrantsLocationsResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAccessGrantsLocations") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListAccessGrantsLocationsRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(listAccessGrantsLocationsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Returns a list of the access points that are owned by the current account that's associated with the specified * bucket. You can retrieve up to 1000 access points per call. If the specified bucket has more than 1,000 access * points (or the number specified in maxResults, whichever is less), the response will include a * continuation token that you can use to list the additional access points. *

*

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following actions are related to ListAccessPoints: *

* * * @param listAccessPointsRequest * @return A Java Future containing the result of the ListAccessPoints 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.ListAccessPoints * @see AWS * API Documentation */ @Override public CompletableFuture listAccessPoints(ListAccessPointsRequest listAccessPointsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAccessPointsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAccessPointsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAccessPoints"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(ListAccessPointsResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAccessPoints").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListAccessPointsRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(listAccessPointsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Returns some or all (up to 1,000) access points associated with the Object Lambda Access Point per call. If there * are more access points than what can be returned in one call, the response will include a continuation token that * you can use to list the additional access points. *

*

* The following actions are related to ListAccessPointsForObjectLambda: *

* * * @param listAccessPointsForObjectLambdaRequest * @return A Java Future containing the result of the ListAccessPointsForObjectLambda 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.ListAccessPointsForObjectLambda * @see AWS API Documentation */ @Override public CompletableFuture listAccessPointsForObjectLambda( ListAccessPointsForObjectLambdaRequest listAccessPointsForObjectLambdaRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAccessPointsForObjectLambdaRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAccessPointsForObjectLambdaRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAccessPointsForObjectLambda"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(ListAccessPointsForObjectLambdaResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAccessPointsForObjectLambda").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListAccessPointsForObjectLambdaRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(listAccessPointsForObjectLambdaRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists current S3 Batch Operations jobs as well as the jobs that have ended within the last 90 days for the Amazon * Web Services account making the request. For more information, see S3 Batch Operations in the * Amazon S3 User Guide. *

*
*
Permissions
*
*

* To use the ListJobs operation, you must have permission to perform the s3:ListJobs * action. *

*
*
*

* Related actions include: *

*

*

* * @param listJobsRequest * @return A Java Future containing the result of the ListJobs 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. *
    *
  • InvalidRequestException
  • InternalServiceException
  • InvalidNextTokenException
  • *
  • 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.
  • S3ControlException Base class for all * service exceptions. Unknown exceptions will be thrown as an instance of this type.
  • *
* @sample S3ControlAsyncClient.ListJobs * @see AWS API * Documentation */ @Override public CompletableFuture listJobs(ListJobsRequest listJobsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listJobsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listJobsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListJobs"); HttpResponseHandler> responseHandler = protocolFactory.createCombinedResponseHandler( ListJobsResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListJobs") .withRequestConfiguration(clientConfiguration).withProtocolMetadata(protocolMetadata) .withMarshaller(new ListJobsRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(listJobsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Returns a list of the Multi-Region Access Points currently associated with the specified Amazon Web Services * account. Each call can return up to 100 Multi-Region Access Points, the maximum number of Multi-Region Access * Points that can be associated with a single account. *

*

* This action will always be routed to the US West (Oregon) Region. For more information about the restrictions * around working with Multi-Region Access Points, see Multi-Region * Access Point restrictions and limitations in the Amazon S3 User Guide. *

*

* The following actions are related to ListMultiRegionAccessPoint: *

* * * @param listMultiRegionAccessPointsRequest * @return A Java Future containing the result of the ListMultiRegionAccessPoints 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.ListMultiRegionAccessPoints * @see AWS API Documentation */ @Override public CompletableFuture listMultiRegionAccessPoints( ListMultiRegionAccessPointsRequest listMultiRegionAccessPointsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listMultiRegionAccessPointsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listMultiRegionAccessPointsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListMultiRegionAccessPoints"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(ListMultiRegionAccessPointsResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListMultiRegionAccessPoints") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListMultiRegionAccessPointsRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(listMultiRegionAccessPointsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Returns a list of all Outposts buckets in an Outpost that are owned by the authenticated sender of the request. * For more information, see Using * Amazon S3 on Outposts in the Amazon S3 User Guide. *

*

* For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname * prefix and x-amz-outpost-id in your request, see the Examples section. *

* * @param listRegionalBucketsRequest * @return A Java Future containing the result of the ListRegionalBuckets 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.ListRegionalBuckets * @see AWS * API Documentation */ @Override public CompletableFuture listRegionalBuckets( ListRegionalBucketsRequest listRegionalBucketsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listRegionalBucketsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listRegionalBucketsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRegionalBuckets"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(ListRegionalBucketsResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListRegionalBuckets").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListRegionalBucketsRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(listRegionalBucketsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Gets a list of Amazon S3 Storage Lens configurations. For more information about S3 Storage Lens, see Assessing your storage activity and * usage with Amazon S3 Storage Lens in the Amazon S3 User Guide. *

* *

* To use this action, you must have permission to perform the s3:ListStorageLensConfigurations action. * For more information, see Setting permissions to * use Amazon S3 Storage Lens in the Amazon S3 User Guide. *

*
* * @param listStorageLensConfigurationsRequest * @return A Java Future containing the result of the ListStorageLensConfigurations 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.ListStorageLensConfigurations * @see AWS API Documentation */ @Override public CompletableFuture listStorageLensConfigurations( ListStorageLensConfigurationsRequest listStorageLensConfigurationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listStorageLensConfigurationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listStorageLensConfigurationsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListStorageLensConfigurations"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(ListStorageLensConfigurationsResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListStorageLensConfigurations").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListStorageLensConfigurationsRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(listStorageLensConfigurationsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all the Storage Lens groups in the specified home Region. *

*

* To use this operation, you must have the permission to perform the s3:ListStorageLensGroups action. * For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. *

*

* For information about Storage Lens groups errors, see List of Amazon S3 * Storage Lens error codes. *

* * @param listStorageLensGroupsRequest * @return A Java Future containing the result of the ListStorageLensGroups 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.ListStorageLensGroups * @see AWS API Documentation */ @Override public CompletableFuture listStorageLensGroups( ListStorageLensGroupsRequest listStorageLensGroupsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listStorageLensGroupsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listStorageLensGroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListStorageLensGroups"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(ListStorageLensGroupsResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListStorageLensGroups").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListStorageLensGroupsRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(listStorageLensGroupsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* This operation allows you to list all the Amazon Web Services resource tags for a specified resource. Each tag is * a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and * filter resources. *

*
*
Permissions
*
*

* You must have the s3:ListTagsForResource permission to use this operation. *

*
*
* *

* This operation is only supported for S3 Storage Lens groups * and for S3 Access * Grants. The tagged resource can be an S3 Storage Lens group or S3 Access Grants instance, registered * location, or grant. *

*
*

* For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. *

*

* For information about S3 Tagging errors, see List of Amazon * S3 Tagging error codes. *

* * @param listTagsForResourceRequest * @return A Java Future containing the result of the ListTagsForResource 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.ListTagsForResource * @see AWS * API Documentation */ @Override public CompletableFuture listTagsForResource( ListTagsForResourceRequest listTagsForResourceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTagsForResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsForResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTagsForResource"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(ListTagsForResourceResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListTagsForResource").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(listTagsForResourceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the resource policy of the S3 Access Grants instance. *

*
*
Permissions
*
*

* You must have the s3:PutAccessGrantsInstanceResourcePolicy permission to use this operation. *

*
*
* * @param putAccessGrantsInstanceResourcePolicyRequest * @return A Java Future containing the result of the PutAccessGrantsInstanceResourcePolicy 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutAccessGrantsInstanceResourcePolicy * @see AWS API Documentation */ @Override public CompletableFuture putAccessGrantsInstanceResourcePolicy( PutAccessGrantsInstanceResourcePolicyRequest putAccessGrantsInstanceResourcePolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putAccessGrantsInstanceResourcePolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putAccessGrantsInstanceResourcePolicyRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutAccessGrantsInstanceResourcePolicy"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(PutAccessGrantsInstanceResourcePolicyResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutAccessGrantsInstanceResourcePolicy") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new PutAccessGrantsInstanceResourcePolicyRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(putAccessGrantsInstanceResourcePolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Replaces configuration for an Object Lambda Access Point. *

*

* The following actions are related to PutAccessPointConfigurationForObjectLambda: *

* * * @param putAccessPointConfigurationForObjectLambdaRequest * @return A Java Future containing the result of the PutAccessPointConfigurationForObjectLambda 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutAccessPointConfigurationForObjectLambda * @see AWS API Documentation */ @Override public CompletableFuture putAccessPointConfigurationForObjectLambda( PutAccessPointConfigurationForObjectLambdaRequest putAccessPointConfigurationForObjectLambdaRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( putAccessPointConfigurationForObjectLambdaRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putAccessPointConfigurationForObjectLambdaRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutAccessPointConfigurationForObjectLambda"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(PutAccessPointConfigurationForObjectLambdaResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutAccessPointConfigurationForObjectLambda") .withRequestConfiguration(clientConfiguration).withProtocolMetadata(protocolMetadata) .withMarshaller(new PutAccessPointConfigurationForObjectLambdaRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(putAccessPointConfigurationForObjectLambdaRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Associates an access policy with the specified access point. Each access point can have only one policy, so a * request made to this API replaces any existing policy associated with the specified access point. *

*

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following actions are related to PutAccessPointPolicy: *

* * * @param putAccessPointPolicyRequest * @return A Java Future containing the result of the PutAccessPointPolicy 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutAccessPointPolicy * @see AWS API Documentation */ @Override public CompletableFuture putAccessPointPolicy( PutAccessPointPolicyRequest putAccessPointPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putAccessPointPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putAccessPointPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutAccessPointPolicy"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(PutAccessPointPolicyResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutAccessPointPolicy").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new PutAccessPointPolicyRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(putAccessPointPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Creates or replaces resource policy for an Object Lambda Access Point. For an example policy, see Creating Object * Lambda Access Points in the Amazon S3 User Guide. *

*

* The following actions are related to PutAccessPointPolicyForObjectLambda: *

* * * @param putAccessPointPolicyForObjectLambdaRequest * @return A Java Future containing the result of the PutAccessPointPolicyForObjectLambda 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutAccessPointPolicyForObjectLambda * @see AWS API Documentation */ @Override public CompletableFuture putAccessPointPolicyForObjectLambda( PutAccessPointPolicyForObjectLambdaRequest putAccessPointPolicyForObjectLambdaRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putAccessPointPolicyForObjectLambdaRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putAccessPointPolicyForObjectLambdaRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutAccessPointPolicyForObjectLambda"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(PutAccessPointPolicyForObjectLambdaResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutAccessPointPolicyForObjectLambda") .withRequestConfiguration(clientConfiguration).withProtocolMetadata(protocolMetadata) .withMarshaller(new PutAccessPointPolicyForObjectLambdaRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(putAccessPointPolicyForObjectLambdaRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This action puts a lifecycle configuration to an Amazon S3 on Outposts bucket. To put a lifecycle configuration * to an S3 bucket, see PutBucketLifecycleConfiguration in the Amazon S3 API Reference. *

*
*

* Creates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing lifecycle * configuration. Outposts buckets only support lifecycle configurations that delete/expire objects after a certain * period of time and abort incomplete multipart uploads. *

*

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following actions are related to PutBucketLifecycleConfiguration: *

* * * @param putBucketLifecycleConfigurationRequest * @return A Java Future containing the result of the PutBucketLifecycleConfiguration 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutBucketLifecycleConfiguration * @see AWS API Documentation */ @Override public CompletableFuture putBucketLifecycleConfiguration( PutBucketLifecycleConfigurationRequest putBucketLifecycleConfigurationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putBucketLifecycleConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putBucketLifecycleConfigurationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutBucketLifecycleConfiguration"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(PutBucketLifecycleConfigurationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutBucketLifecycleConfiguration") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new PutBucketLifecycleConfigurationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(putBucketLifecycleConfigurationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This action puts a bucket policy to an Amazon S3 on Outposts bucket. To put a policy on an S3 bucket, see PutBucketPolicy in the * Amazon S3 API Reference. *

*
*

* Applies an Amazon S3 bucket policy to an Outposts bucket. For more information, see Using Amazon S3 on Outposts in * the Amazon S3 User Guide. *

*

* If you are using an identity other than the root user of the Amazon Web Services account that owns the Outposts * bucket, the calling identity must have the PutBucketPolicy permissions on the specified Outposts * bucket and belong to the bucket owner's account in order to use this action. *

*

* If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access Denied * error. If you have the correct permissions, but you're not using an identity that belongs to the bucket owner's * account, Amazon S3 returns a 405 Method Not Allowed error. *

* *

* As a security precaution, the root user of the Amazon Web Services account that owns a bucket can always use this * action, even if the policy explicitly denies the root user the ability to perform this action. *

*
*

* For more information about bucket policies, see Using Bucket Policies and User * Policies. *

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following actions are related to PutBucketPolicy: *

* * * @param putBucketPolicyRequest * @return A Java Future containing the result of the PutBucketPolicy 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutBucketPolicy * @see AWS API * Documentation */ @Override public CompletableFuture putBucketPolicy(PutBucketPolicyRequest putBucketPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putBucketPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putBucketPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutBucketPolicy"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(PutBucketPolicyResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutBucketPolicy") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new PutBucketPolicyRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(putBucketPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This action creates an Amazon S3 on Outposts bucket's replication configuration. To create an S3 bucket's * replication configuration, see PutBucketReplication in * the Amazon S3 API Reference. *

*
*

* Creates a replication configuration or replaces an existing one. For information about S3 replication on Outposts * configuration, see Replicating objects for * S3 on Outposts in the Amazon S3 User Guide. *

* *

* It can take a while to propagate PUT or DELETE requests for a replication configuration * to all S3 on Outposts systems. Therefore, the replication configuration that's returned by a GET * request soon after a PUT or DELETE request might return a more recent result than * what's on the Outpost. If an Outpost is offline, the delay in updating the replication configuration on that * Outpost can be significant. *

*
*

* Specify the replication configuration in the request body. In the replication configuration, you provide the * following information: *

*
    *
  • *

    * The name of the destination bucket or buckets where you want S3 on Outposts to replicate objects *

    *
  • *
  • *

    * The Identity and Access Management (IAM) role that S3 on Outposts can assume to replicate objects on your behalf *

    *
  • *
  • *

    * Other relevant information, such as replication rules *

    *
  • *
*

* A replication configuration must include at least one rule and can contain a maximum of 100. Each rule identifies * a subset of objects to replicate by filtering the objects in the source Outposts bucket. To choose additional * subsets of objects to replicate, add a rule for each subset. *

*

* To specify a subset of the objects in the source Outposts bucket to apply a replication rule to, add the * Filter element as a child of the Rule element. You can filter objects based on an * object key prefix, one or more object tags, or both. When you add the Filter element in the * configuration, you must also add the following elements: DeleteMarkerReplication, * Status, and Priority. *

*

* Using PutBucketReplication on Outposts requires that both the source and destination buckets must * have versioning enabled. For information about enabling versioning on a bucket, see Managing S3 * Versioning for your S3 on Outposts bucket. *

*

* For information about S3 on Outposts replication failure reasons, see Replication failure reasons in the Amazon S3 User Guide. *

*

* Handling Replication of Encrypted Objects *

*

* Outposts buckets are encrypted at all times. All the objects in the source Outposts bucket are encrypted and can * be replicated. Also, all the replicas in the destination Outposts bucket are encrypted with the same encryption * key as the objects in the source Outposts bucket. *

*

* Permissions *

*

* To create a PutBucketReplication request, you must have * s3-outposts:PutReplicationConfiguration permissions for the bucket. The Outposts bucket owner has * this permission by default and can grant it to others. For more information about permissions, see Setting up IAM with S3 on * Outposts and Managing access to S3 on * Outposts buckets. *

* *

* To perform this operation, the user or role must also have the iam:CreateRole and * iam:PassRole permissions. For more information, see Granting a user permissions to * pass a role to an Amazon Web Services service. *

*
*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following operations are related to PutBucketReplication: *

* * * @param putBucketReplicationRequest * @return A Java Future containing the result of the PutBucketReplication 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutBucketReplication * @see AWS API Documentation */ @Override public CompletableFuture putBucketReplication( PutBucketReplicationRequest putBucketReplicationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putBucketReplicationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putBucketReplicationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutBucketReplication"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(PutBucketReplicationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutBucketReplication") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new PutBucketReplicationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(putBucketReplicationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This action puts tags on an Amazon S3 on Outposts bucket. To put tags on an S3 bucket, see PutBucketTagging in the * Amazon S3 API Reference. *

*
*

* Sets the tags for an S3 on Outposts bucket. For more information, see Using Amazon S3 on Outposts in * the Amazon S3 User Guide. *

*

* Use tags to organize your Amazon Web Services bill to reflect your own cost structure. To do this, sign up to get * your Amazon Web Services account bill with tag key values included. Then, to see the cost of combined resources, * organize your billing information according to resources with the same tag key values. For example, you can tag * several resources with a specific application name, and then organize your billing information to see the total * cost of that application across several services. For more information, see Cost allocation and * tagging. *

* *

* Within a bucket, if you add a tag that has the same key as an existing tag, the new value overwrites the old * value. For more information, see Using cost allocation in * Amazon S3 bucket tags. *

*
*

* To use this action, you must have permissions to perform the s3-outposts:PutBucketTagging action. * The Outposts bucket owner has this permission by default and can grant this permission to others. For more * information about permissions, see Permissions Related to Bucket Subresource Operations and Managing access permissions * to your Amazon S3 resources. *

*

* PutBucketTagging has the following special errors: *

*
    *
  • *

    * Error code: InvalidTagError *

    * *
  • *
  • *

    * Error code: MalformedXMLError *

    *
      *
    • *

      * Description: The XML provided does not match the schema. *

      *
    • *
    *
  • *
  • *

    * Error code: OperationAbortedError *

    *
      *
    • *

      * Description: A conflicting conditional action is currently in progress against this resource. Try again. *

      *
    • *
    *
  • *
  • *

    * Error code: InternalError *

    *
      *
    • *

      * Description: The service was unable to apply the provided tag to the bucket. *

      *
    • *
    *
  • *
*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following actions are related to PutBucketTagging: *

* * * @param putBucketTaggingRequest * @return A Java Future containing the result of the PutBucketTagging 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutBucketTagging * @see AWS * API Documentation */ @Override public CompletableFuture putBucketTagging(PutBucketTaggingRequest putBucketTaggingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putBucketTaggingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putBucketTaggingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutBucketTagging"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(PutBucketTaggingResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutBucketTagging") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new PutBucketTaggingRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(putBucketTaggingRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation sets the versioning state for S3 on Outposts buckets only. To set the versioning state for an S3 * bucket, see PutBucketVersioning in * the Amazon S3 API Reference. *

*
*

* Sets the versioning state for an S3 on Outposts bucket. With S3 Versioning, you can save multiple distinct copies * of your objects and recover from unintended user actions and application failures. *

*

* You can set the versioning state to one of the following: *

*
    *
  • *

    * Enabled - Enables versioning for the objects in the bucket. All objects added to the bucket receive a * unique version ID. *

    *
  • *
  • *

    * Suspended - Suspends versioning for the objects in the bucket. All objects added to the bucket receive the * version ID null. *

    *
  • *
*

* If you've never set versioning on your bucket, it has no versioning state. In that case, a * GetBucketVersioning request does not return a versioning state value. *

*

* When you enable S3 Versioning, for each object in your bucket, you have a current version and zero or more * noncurrent versions. You can configure your bucket S3 Lifecycle rules to expire noncurrent versions after a * specified time period. For more information, see Creating and * managing a lifecycle configuration for your S3 on Outposts bucket in the Amazon S3 User Guide. *

*

* If you have an object expiration lifecycle configuration in your non-versioned bucket and you want to maintain * the same permanent delete behavior when you enable versioning, you must add a noncurrent expiration policy. The * noncurrent expiration lifecycle configuration will manage the deletes of the noncurrent object versions in the * version-enabled bucket. For more information, see Versioning in the Amazon S3 * User Guide. *

*

* All Amazon S3 on Outposts REST API requests for this action require an additional parameter of * x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint * hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on * Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by * using the access point ARN, see the Examples section. *

*

* The following operations are related to PutBucketVersioning for S3 on Outposts. *

* * * @param putBucketVersioningRequest * @return A Java Future containing the result of the PutBucketVersioning 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutBucketVersioning * @see AWS * API Documentation */ @Override public CompletableFuture putBucketVersioning( PutBucketVersioningRequest putBucketVersioningRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putBucketVersioningRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putBucketVersioningRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutBucketVersioning"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(PutBucketVersioningResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutBucketVersioning") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new PutBucketVersioningRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(putBucketVersioningRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Sets the supplied tag-set on an S3 Batch Operations job. *

*

* A tag is a key-value pair. You can associate S3 Batch Operations tags with any job by sending a PUT request * against the tagging subresource that is associated with the job. To modify the existing tag set, you can either * replace the existing tag set entirely, or make changes within the existing tag set by retrieving the existing tag * set using GetJobTagging, modify * that tag set, and use this operation to replace the tag set with the one you modified. For more information, see * * Controlling access and labeling jobs using tags in the Amazon S3 User Guide. *

* *
    *
  • *

    * If you send this request with an empty tag set, Amazon S3 deletes the existing tag set on the Batch Operations * job. If you use this method, you are charged for a Tier 1 Request (PUT). For more information, see Amazon S3 pricing. *

    *
  • *
  • *

    * For deleting existing tags for your Batch Operations job, a DeleteJobTagging * request is preferred because it achieves the same result without incurring charges. *

    *
  • *
  • *

    * A few things to consider about using tags: *

    *
      *
    • *

      * Amazon S3 limits the maximum number of tags to 50 tags per job. *

      *
    • *
    • *

      * You can associate up to 50 tags with a job as long as they have unique tag keys. *

      *
    • *
    • *

      * A tag key can be up to 128 Unicode characters in length, and tag values can be up to 256 Unicode characters in * length. *

      *
    • *
    • *

      * The key and values are case sensitive. *

      *
    • *
    • *

      * For tagging-related restrictions related to characters and encodings, see User-Defined * Tag Restrictions in the Billing and Cost Management User Guide. *

      *
    • *
    *
  • *
*
*
*
Permissions
*
*

* To use the PutJobTagging operation, you must have permission to perform the * s3:PutJobTagging action. *

*
*
*

* Related actions include: *

* * * @param putJobTaggingRequest * @return A Java Future containing the result of the PutJobTagging 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. *
    *
  • InternalServiceException
  • *
  • TooManyRequestsException
  • *
  • NotFoundException
  • *
  • TooManyTagsException Amazon S3 throws this exception if you have too many tags in your tag set.
  • *
  • 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutJobTagging * @see AWS API * Documentation */ @Override public CompletableFuture putJobTagging(PutJobTaggingRequest putJobTaggingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putJobTaggingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putJobTaggingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutJobTagging"); HttpResponseHandler> responseHandler = protocolFactory.createCombinedResponseHandler( PutJobTaggingResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutJobTagging").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new PutJobTaggingRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(putJobTaggingRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Associates an access control policy with the specified Multi-Region Access Point. Each Multi-Region Access Point * can have only one policy, so a request made to this action replaces any existing policy that is associated with * the specified Multi-Region Access Point. *

*

* This action will always be routed to the US West (Oregon) Region. For more information about the restrictions * around working with Multi-Region Access Points, see Multi-Region * Access Point restrictions and limitations in the Amazon S3 User Guide. *

*

* The following actions are related to PutMultiRegionAccessPointPolicy: *

* * * @param putMultiRegionAccessPointPolicyRequest * @return A Java Future containing the result of the PutMultiRegionAccessPointPolicy 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutMultiRegionAccessPointPolicy * @see AWS API Documentation */ @Override public CompletableFuture putMultiRegionAccessPointPolicy( PutMultiRegionAccessPointPolicyRequest putMultiRegionAccessPointPolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putMultiRegionAccessPointPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putMultiRegionAccessPointPolicyRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutMultiRegionAccessPointPolicy"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(PutMultiRegionAccessPointPolicyResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutMultiRegionAccessPointPolicy") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new PutMultiRegionAccessPointPolicyRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(putMultiRegionAccessPointPolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Creates or modifies the PublicAccessBlock configuration for an Amazon Web Services account. For this * operation, users must have the s3:PutAccountPublicAccessBlock permission. For more information, see * Using Amazon * S3 block public access. *

*

* Related actions include: *

* * * @param putPublicAccessBlockRequest * @return A Java Future containing the result of the PutPublicAccessBlock 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutPublicAccessBlock * @see AWS API Documentation */ @Override public CompletableFuture putPublicAccessBlock( PutPublicAccessBlockRequest putPublicAccessBlockRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putPublicAccessBlockRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putPublicAccessBlockRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutPublicAccessBlock"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(PutPublicAccessBlockResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutPublicAccessBlock").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new PutPublicAccessBlockRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(putPublicAccessBlockRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Puts an Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see Working with Amazon S3 Storage Lens * in the Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 Storage Lens * metrics glossary in the Amazon S3 User Guide. *

* *

* To use this action, you must have permission to perform the s3:PutStorageLensConfiguration action. * For more information, see Setting permissions to * use Amazon S3 Storage Lens in the Amazon S3 User Guide. *

*
* * @param putStorageLensConfigurationRequest * @return A Java Future containing the result of the PutStorageLensConfiguration 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutStorageLensConfiguration * @see AWS API Documentation */ @Override public CompletableFuture putStorageLensConfiguration( PutStorageLensConfigurationRequest putStorageLensConfigurationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putStorageLensConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putStorageLensConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutStorageLensConfiguration"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(PutStorageLensConfigurationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutStorageLensConfiguration").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new PutStorageLensConfigurationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(putStorageLensConfigurationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Put or replace tags on an existing Amazon S3 Storage Lens configuration. For more information about S3 Storage * Lens, see Assessing your storage * activity and usage with Amazon S3 Storage Lens in the Amazon S3 User Guide. *

* *

* To use this action, you must have permission to perform the s3:PutStorageLensConfigurationTagging * action. For more information, see Setting permissions to * use Amazon S3 Storage Lens in the Amazon S3 User Guide. *

*
* * @param putStorageLensConfigurationTaggingRequest * @return A Java Future containing the result of the PutStorageLensConfigurationTagging 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.PutStorageLensConfigurationTagging * @see AWS API Documentation */ @Override public CompletableFuture putStorageLensConfigurationTagging( PutStorageLensConfigurationTaggingRequest putStorageLensConfigurationTaggingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putStorageLensConfigurationTaggingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putStorageLensConfigurationTaggingRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutStorageLensConfigurationTagging"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(PutStorageLensConfigurationTaggingResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutStorageLensConfigurationTagging") .withRequestConfiguration(clientConfiguration).withProtocolMetadata(protocolMetadata) .withMarshaller(new PutStorageLensConfigurationTaggingRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(putStorageLensConfigurationTaggingRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** * *

* This operation is not supported by directory buckets. *

*
*

* Submits an updated route configuration for a Multi-Region Access Point. This API operation updates the routing * status for the specified Regions from active to passive, or from passive to active. A value of 0 * indicates a passive status, which means that traffic won't be routed to the specified Region. A value of * 100 indicates an active status, which means that traffic will be routed to the specified Region. At * least one Region must be active at all times. *

*

* When the routing configuration is changed, any in-progress operations (uploads, copies, deletes, and so on) to * formerly active Regions will continue to run to their final completion state (success or failure). The routing * configurations of any Regions that aren’t specified remain unchanged. *

* *

* Updated routing configurations might not be immediately applied. It can take up to 2 minutes for your changes to * take effect. *

*
*

* To submit routing control changes and failover requests, use the Amazon S3 failover control infrastructure * endpoints in these five Amazon Web Services Regions: *

*
    *
  • *

    * us-east-1 *

    *
  • *
  • *

    * us-west-2 *

    *
  • *
  • *

    * ap-southeast-2 *

    *
  • *
  • *

    * ap-northeast-1 *

    *
  • *
  • *

    * eu-west-1 *

    *
  • *
* * @param submitMultiRegionAccessPointRoutesRequest * @return A Java Future containing the result of the SubmitMultiRegionAccessPointRoutes 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.SubmitMultiRegionAccessPointRoutes * @see AWS API Documentation */ @Override public CompletableFuture submitMultiRegionAccessPointRoutes( SubmitMultiRegionAccessPointRoutesRequest submitMultiRegionAccessPointRoutesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(submitMultiRegionAccessPointRoutesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, submitMultiRegionAccessPointRoutesRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SubmitMultiRegionAccessPointRoutes"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(SubmitMultiRegionAccessPointRoutesResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("SubmitMultiRegionAccessPointRoutes") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new SubmitMultiRegionAccessPointRoutesRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(submitMultiRegionAccessPointRoutesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new Amazon Web Services resource tag or updates an existing resource tag. Each tag is a label * consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter * resources. You can add up to 50 Amazon Web Services resource tags for each S3 resource. *

* *

* This operation is only supported for S3 Storage Lens groups * and for S3 Access * Grants. The tagged resource can be an S3 Storage Lens group or S3 Access Grants instance, registered * location, or grant. *

*
*
*
Permissions
*
*

* You must have the s3:TagResource permission to use this operation. *

*
*
*

* For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. *

*

* For information about S3 Tagging errors, see List of Amazon * S3 Tagging error codes. *

* * @param tagResourceRequest * @return A Java Future containing the result of the TagResource 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.TagResource * @see AWS API * Documentation */ @Override public CompletableFuture tagResource(TagResourceRequest tagResourceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagResource"); HttpResponseHandler> responseHandler = protocolFactory.createCombinedResponseHandler( TagResourceResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("TagResource").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new TagResourceRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(tagResourceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* This operation removes the specified Amazon Web Services resource tags from an S3 resource. Each tag is a label * consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter * resources. *

* *

* This operation is only supported for S3 Storage Lens groups * and for S3 Access * Grants. The tagged resource can be an S3 Storage Lens group or S3 Access Grants instance, registered * location, or grant. *

*
*
*
Permissions
*
*

* You must have the s3:UntagResource permission to use this operation. *

*
*
*

* For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. *

*

* For information about S3 Tagging errors, see List of Amazon * S3 Tagging error codes. *

* * @param untagResourceRequest * @return A Java Future containing the result of the UntagResource 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.UntagResource * @see AWS API * Documentation */ @Override public CompletableFuture untagResource(UntagResourceRequest untagResourceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagResource"); HttpResponseHandler> responseHandler = protocolFactory.createCombinedResponseHandler( UntagResourceResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UntagResource").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new UntagResourceRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(untagResourceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the IAM role of a registered location in your S3 Access Grants instance. *

*
*
Permissions
*
*

* You must have the s3:UpdateAccessGrantsLocation permission to use this operation. *

*
*
Additional Permissions
*
*

* You must also have the following permission: iam:PassRole *

*
*
* * @param updateAccessGrantsLocationRequest * @return A Java Future containing the result of the UpdateAccessGrantsLocation 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.UpdateAccessGrantsLocation * @see AWS API Documentation */ @Override public CompletableFuture updateAccessGrantsLocation( UpdateAccessGrantsLocationRequest updateAccessGrantsLocationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateAccessGrantsLocationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateAccessGrantsLocationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateAccessGrantsLocation"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(UpdateAccessGrantsLocationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateAccessGrantsLocation") .withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateAccessGrantsLocationRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler) .withMetricCollector(apiCallMetricCollector) .putExecutionAttribute(SdkInternalExecutionAttribute.HTTP_CHECKSUM_REQUIRED, HttpChecksumRequired.create()).withInput(updateAccessGrantsLocationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates an existing S3 Batch Operations job's priority. For more information, see S3 Batch Operations in the * Amazon S3 User Guide. *

*
*
Permissions
*
*

* To use the UpdateJobPriority operation, you must have permission to perform the * s3:UpdateJobPriority action. *

*
*
*

* Related actions include: *

* * * @param updateJobPriorityRequest * @return A Java Future containing the result of the UpdateJobPriority 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. *
    *
  • BadRequestException
  • *
  • TooManyRequestsException
  • *
  • NotFoundException
  • *
  • InternalServiceException
  • *
  • 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.UpdateJobPriority * @see AWS * API Documentation */ @Override public CompletableFuture updateJobPriority(UpdateJobPriorityRequest updateJobPriorityRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateJobPriorityRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateJobPriorityRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateJobPriority"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(UpdateJobPriorityResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateJobPriority").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateJobPriorityRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(updateJobPriorityRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the status for the specified job. Use this operation to confirm that you want to run a job or to cancel * an existing job. For more information, see S3 Batch Operations in the * Amazon S3 User Guide. *

*
*
Permissions
*
*

* To use the UpdateJobStatus operation, you must have permission to perform the * s3:UpdateJobStatus action. *

*
*
*

* Related actions include: *

* * * @param updateJobStatusRequest * @return A Java Future containing the result of the UpdateJobStatus 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. *
    *
  • BadRequestException
  • *
  • TooManyRequestsException
  • *
  • NotFoundException
  • *
  • JobStatusException
  • *
  • InternalServiceException
  • *
  • 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.UpdateJobStatus * @see AWS API * Documentation */ @Override public CompletableFuture updateJobStatus(UpdateJobStatusRequest updateJobStatusRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateJobStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateJobStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateJobStatus"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(UpdateJobStatusResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateJobStatus").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateJobStatusRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(updateJobStatusRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the existing Storage Lens group. *

*

* To use this operation, you must have the permission to perform the s3:UpdateStorageLensGroup action. * For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. *

*

* For information about Storage Lens groups errors, see List of Amazon S3 * Storage Lens error codes. *

* * @param updateStorageLensGroupRequest * @return A Java Future containing the result of the UpdateStorageLensGroup 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.
  • *
  • S3ControlException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample S3ControlAsyncClient.UpdateStorageLensGroup * @see AWS API Documentation */ @Override public CompletableFuture updateStorageLensGroup( UpdateStorageLensGroupRequest updateStorageLensGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateStorageLensGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateStorageLensGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "S3 Control"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateStorageLensGroup"); HttpResponseHandler> responseHandler = protocolFactory .createCombinedResponseHandler(UpdateStorageLensGroupResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateStorageLensGroup").withRequestConfiguration(clientConfiguration) .withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdateStorageLensGroupRequestMarshaller(protocolFactory)) .withCombinedResponseHandler(responseHandler).withMetricCollector(apiCallMetricCollector) .withInput(updateStorageLensGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); return whenCompleteFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } @Override public final S3ControlServiceClientConfiguration serviceClientConfiguration() { return new S3ControlServiceClientConfigurationBuilder(this.clientConfiguration.toBuilder()).build(); } @Override public final String serviceName() { return SERVICE_NAME; } private AwsXmlProtocolFactory init() { return AwsXmlProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidRequestException") .exceptionBuilderSupplier(InvalidRequestException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidNextTokenException") .exceptionBuilderSupplier(InvalidNextTokenException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("JobStatusException") .exceptionBuilderSupplier(JobStatusException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchPublicAccessBlockConfiguration") .exceptionBuilderSupplier(NoSuchPublicAccessBlockConfigurationException::builder) .httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InternalServiceException") .exceptionBuilderSupplier(InternalServiceException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BucketAlreadyExists") .exceptionBuilderSupplier(BucketAlreadyExistsException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NotFoundException") .exceptionBuilderSupplier(NotFoundException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyTagsException") .exceptionBuilderSupplier(TooManyTagsException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("IdempotencyException") .exceptionBuilderSupplier(IdempotencyException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BucketAlreadyOwnedByYou") .exceptionBuilderSupplier(BucketAlreadyOwnedByYouException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyRequestsException") .exceptionBuilderSupplier(TooManyRequestsException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BadRequestException") .exceptionBuilderSupplier(BadRequestException::builder).build()) .clientConfiguration(clientConfiguration).defaultServiceExceptionSupplier(S3ControlException::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(); } S3ControlServiceClientConfigurationBuilder serviceConfigBuilder = new S3ControlServiceClientConfigurationBuilder( 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