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
:
*
*
* -
*
* GetAccessPoint
*
*
* -
*
*
* -
*
* ListAccessPoints
*
*
*
*
* @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:
*
*
* -
*
* PutObject
*
*
* -
*
* GetBucket
*
*
* -
*
* DeleteBucket
*
*
* -
*
*
* -
*
*
*
*
* @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:
*
*
* -
*
* DescribeJob
*
*
* -
*
* ListJobs
*
*
* -
*
*
* -
*
* UpdateJobStatus
*
*
* -
*
* JobOperation
*
*
*
*
* @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
:
*
*
* -
*
*
* -
*
* GetAccessPoint
*
*
* -
*
* ListAccessPoints
*
*
*
*
* @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
*
*
* -
*
* CreateBucket
*
*
* -
*
* GetBucket
*
*
* -
*
* DeleteObject
*
*
*
*
* @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
:
*
*
* -
*
* GetBucketPolicy
*
*
* -
*
* PutBucketPolicy
*
*
*
*
* @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
:
*
*
* -
*
* GetBucketTagging
*
*
* -
*
* PutBucketTagging
*
*
*
*
* @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:
*
*
* -
*
* CreateJob
*
*
* -
*
* GetJobTagging
*
*
* -
*
* PutJobTagging
*
*
*
*
* @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:
*
*
* -
*
* CreateJob
*
*
* -
*
* ListJobs
*
*
* -
*
*
* -
*
* UpdateJobStatus
*
*
*
*
* @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
:
*
*
* -
*
*
* -
*
*
* -
*
* ListAccessPoints
*
*
*
*
* @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