public AwsS3ProtocolFactory build() { return new AwsS3ProtocolFactory(this); } }
/** * <p> * Deletes the CORS configuration information set for the bucket. * </p> * * @param deleteBucketCorsRequest * @return Result of the DeleteBucketCors operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.DeleteBucketCors */ @Override public DeleteBucketCorsResponse deleteBucketCors(DeleteBucketCorsRequest deleteBucketCorsRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<DeleteBucketCorsResponse> responseHandler = protocolFactory.createResponseHandler( DeleteBucketCorsResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<DeleteBucketCorsRequest, DeleteBucketCorsResponse>() .withOperationName("DeleteBucketCors").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteBucketCorsRequest) .withMarshaller(new DeleteBucketCorsRequestMarshaller(protocolFactory))); }
private AwsS3ProtocolFactory init() { return AwsS3ProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchUpload") .exceptionBuilderSupplier(NoSuchUploadException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ObjectAlreadyInActiveTierError") .exceptionBuilderSupplier(ObjectAlreadyInActiveTierErrorException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BucketAlreadyExists") .exceptionBuilderSupplier(BucketAlreadyExistsException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchBucket") .exceptionBuilderSupplier(NoSuchBucketException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ObjectNotInActiveTierError") .exceptionBuilderSupplier(ObjectNotInActiveTierErrorException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BucketAlreadyOwnedByYou") .exceptionBuilderSupplier(BucketAlreadyOwnedByYouException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchKey").exceptionBuilderSupplier(NoSuchKeyException::builder) .build()).clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(S3Exception::builder).build(); }
private AwsS3ProtocolFactory init() { return AwsS3ProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchUpload") .exceptionBuilderSupplier(NoSuchUploadException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ObjectAlreadyInActiveTierError") .exceptionBuilderSupplier(ObjectAlreadyInActiveTierErrorException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BucketAlreadyExists") .exceptionBuilderSupplier(BucketAlreadyExistsException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchBucket") .exceptionBuilderSupplier(NoSuchBucketException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ObjectNotInActiveTierError") .exceptionBuilderSupplier(ObjectNotInActiveTierErrorException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BucketAlreadyOwnedByYou") .exceptionBuilderSupplier(BucketAlreadyOwnedByYouException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchKey").exceptionBuilderSupplier(NoSuchKeyException::builder) .build()).clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(S3Exception::builder).build(); }
/** * <p> * Deletes the server-side encryption configuration from the bucket. * </p> * * @param deleteBucketEncryptionRequest * @return Result of the DeleteBucketEncryption operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.DeleteBucketEncryption */ @Override public DeleteBucketEncryptionResponse deleteBucketEncryption(DeleteBucketEncryptionRequest deleteBucketEncryptionRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<DeleteBucketEncryptionResponse> responseHandler = protocolFactory.createResponseHandler( DeleteBucketEncryptionResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<DeleteBucketEncryptionRequest, DeleteBucketEncryptionResponse>() .withOperationName("DeleteBucketEncryption").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteBucketEncryptionRequest) .withMarshaller(new DeleteBucketEncryptionRequestMarshaller(protocolFactory))); }
public AwsS3ProtocolFactory build() { return new AwsS3ProtocolFactory(this); } }
/** * <p> * Deletes the lifecycle configuration from the bucket. * </p> * * @param deleteBucketLifecycleRequest * @return Result of the DeleteBucketLifecycle operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.DeleteBucketLifecycle */ @Override public DeleteBucketLifecycleResponse deleteBucketLifecycle(DeleteBucketLifecycleRequest deleteBucketLifecycleRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<DeleteBucketLifecycleResponse> responseHandler = protocolFactory.createResponseHandler( DeleteBucketLifecycleResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<DeleteBucketLifecycleRequest, DeleteBucketLifecycleResponse>() .withOperationName("DeleteBucketLifecycle").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteBucketLifecycleRequest) .withMarshaller(new DeleteBucketLifecycleRequestMarshaller(protocolFactory))); }
/** * <p> * Deletes the tags from the bucket. * </p> * * @param deleteBucketTaggingRequest * @return Result of the DeleteBucketTagging operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.DeleteBucketTagging */ @Override public DeleteBucketTaggingResponse deleteBucketTagging(DeleteBucketTaggingRequest deleteBucketTaggingRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<DeleteBucketTaggingResponse> responseHandler = protocolFactory.createResponseHandler( DeleteBucketTaggingResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<DeleteBucketTaggingRequest, DeleteBucketTaggingResponse>() .withOperationName("DeleteBucketTagging").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteBucketTaggingRequest) .withMarshaller(new DeleteBucketTaggingRequestMarshaller(protocolFactory))); }
/** * <p> * Retrieves the <code>PublicAccessBlock</code> configuration for an Amazon S3 bucket. * </p> * * @param getPublicAccessBlockRequest * @return Result of the GetPublicAccessBlock operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.GetPublicAccessBlock */ @Override public GetPublicAccessBlockResponse getPublicAccessBlock(GetPublicAccessBlockRequest getPublicAccessBlockRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<GetPublicAccessBlockResponse> responseHandler = protocolFactory.createResponseHandler( GetPublicAccessBlockResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<GetPublicAccessBlockRequest, GetPublicAccessBlockResponse>() .withOperationName("GetPublicAccessBlock").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getPublicAccessBlockRequest) .withMarshaller(new GetPublicAccessBlockRequestMarshaller(protocolFactory))); }
/** * <p> * Deletes the bucket. All objects (including all object versions and Delete Markers) in the bucket must be deleted * before the bucket itself can be deleted. * </p> * * @param deleteBucketRequest * @return Result of the DeleteBucket operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.DeleteBucket */ @Override public DeleteBucketResponse deleteBucket(DeleteBucketRequest deleteBucketRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<DeleteBucketResponse> responseHandler = protocolFactory.createResponseHandler( DeleteBucketResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<DeleteBucketRequest, DeleteBucketResponse>() .withOperationName("DeleteBucket").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteBucketRequest) .withMarshaller(new DeleteBucketRequestMarshaller(protocolFactory))); }
/** * <p> * Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest * version of the object. If there isn't a null version, Amazon S3 does not remove any objects. * </p> * * @param deleteObjectRequest * @return Result of the DeleteObject operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.DeleteObject */ @Override public DeleteObjectResponse deleteObject(DeleteObjectRequest deleteObjectRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<DeleteObjectResponse> responseHandler = protocolFactory.createResponseHandler( DeleteObjectResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<DeleteObjectRequest, DeleteObjectResponse>() .withOperationName("DeleteObject").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteObjectRequest) .withMarshaller(new DeleteObjectRequestMarshaller(protocolFactory))); }
/** * <p> * Returns the CORS configuration for the bucket. * </p> * * @param getBucketCorsRequest * @return Result of the GetBucketCors operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.GetBucketCors */ @Override public GetBucketCorsResponse getBucketCors(GetBucketCorsRequest getBucketCorsRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<GetBucketCorsResponse> responseHandler = protocolFactory.createResponseHandler( GetBucketCorsResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<GetBucketCorsRequest, GetBucketCorsResponse>() .withOperationName("GetBucketCors").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getBucketCorsRequest) .withMarshaller(new GetBucketCorsRequestMarshaller(protocolFactory))); }
/** * <p> * Returns the policy of a specified bucket. * </p> * * @param getBucketPolicyRequest * @return Result of the GetBucketPolicy operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.GetBucketPolicy */ @Override public GetBucketPolicyResponse getBucketPolicy(GetBucketPolicyRequest getBucketPolicyRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<GetBucketPolicyResponse> responseHandler = protocolFactory.createResponseHandler( GetBucketPolicyResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<GetBucketPolicyRequest, GetBucketPolicyResponse>() .withOperationName("GetBucketPolicy").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getBucketPolicyRequest) .withMarshaller(new GetBucketPolicyRequestMarshaller(protocolFactory))); }
/** * <p> * Returns a list of all buckets owned by the authenticated sender of the request. * </p> * * @param listBucketsRequest * @return Result of the ListBuckets operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.ListBuckets */ @Override public ListBucketsResponse listBuckets(ListBucketsRequest listBucketsRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<ListBucketsResponse> responseHandler = protocolFactory.createResponseHandler( ListBucketsResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<ListBucketsRequest, ListBucketsResponse>() .withOperationName("ListBuckets").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listBucketsRequest) .withMarshaller(new ListBucketsRequestMarshaller(protocolFactory))); }
/** * <p> * Sets the versioning state of an existing bucket. To set the versioning state, you must be the bucket owner. * </p> * * @param putBucketVersioningRequest * @return Result of the PutBucketVersioning operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.PutBucketVersioning */ @Override public PutBucketVersioningResponse putBucketVersioning(PutBucketVersioningRequest putBucketVersioningRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<PutBucketVersioningResponse> responseHandler = protocolFactory.createResponseHandler( PutBucketVersioningResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<PutBucketVersioningRequest, PutBucketVersioningResponse>() .withOperationName("PutBucketVersioning").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(putBucketVersioningRequest) .withMarshaller(new PutBucketVersioningRequestMarshaller(protocolFactory))); }
/** * <p> * Creates or modifies the <code>PublicAccessBlock</code> configuration for an Amazon S3 bucket. * </p> * * @param putPublicAccessBlockRequest * @return Result of the PutPublicAccessBlock operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.PutPublicAccessBlock */ @Override public PutPublicAccessBlockResponse putPublicAccessBlock(PutPublicAccessBlockRequest putPublicAccessBlockRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<PutPublicAccessBlockResponse> responseHandler = protocolFactory.createResponseHandler( PutPublicAccessBlockResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<PutPublicAccessBlockRequest, PutPublicAccessBlockResponse>() .withOperationName("PutPublicAccessBlock").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(putPublicAccessBlockRequest) .withMarshaller(new PutPublicAccessBlockRequestMarshaller(protocolFactory))); }
/** * <p> * Deletes the policy from the bucket. * </p> * * @param deleteBucketPolicyRequest * @return Result of the DeleteBucketPolicy operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.DeleteBucketPolicy */ @Override public DeleteBucketPolicyResponse deleteBucketPolicy(DeleteBucketPolicyRequest deleteBucketPolicyRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<DeleteBucketPolicyResponse> responseHandler = protocolFactory.createResponseHandler( DeleteBucketPolicyResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<DeleteBucketPolicyRequest, DeleteBucketPolicyResponse>() .withOperationName("DeleteBucketPolicy").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteBucketPolicyRequest) .withMarshaller(new DeleteBucketPolicyRequestMarshaller(protocolFactory))); }
/** * <p> * Removes the <code>PublicAccessBlock</code> configuration from an Amazon S3 bucket. * </p> * * @param deletePublicAccessBlockRequest * @return Result of the DeletePublicAccessBlock operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.DeletePublicAccessBlock */ @Override public DeletePublicAccessBlockResponse deletePublicAccessBlock(DeletePublicAccessBlockRequest deletePublicAccessBlockRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<DeletePublicAccessBlockResponse> responseHandler = protocolFactory.createResponseHandler( DeletePublicAccessBlockResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<DeletePublicAccessBlockRequest, DeletePublicAccessBlockResponse>() .withOperationName("DeletePublicAccessBlock").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deletePublicAccessBlockRequest) .withMarshaller(new DeletePublicAccessBlockRequestMarshaller(protocolFactory))); }
/** * <p> * Gets the access control policy for the bucket. * </p> * * @param getBucketAclRequest * @return Result of the GetBucketAcl operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.GetBucketAcl */ @Override public GetBucketAclResponse getBucketAcl(GetBucketAclRequest getBucketAclRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<GetBucketAclResponse> responseHandler = protocolFactory.createResponseHandler( GetBucketAclResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<GetBucketAclRequest, GetBucketAclResponse>() .withOperationName("GetBucketAcl").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getBucketAclRequest) .withMarshaller(new GetBucketAclRequestMarshaller(protocolFactory))); }
/** * <p> * Returns the region the bucket resides in. * </p> * * @param getBucketLocationRequest * @return Result of the GetBucketLocation operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws S3Exception * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample S3Client.GetBucketLocation */ @Override public GetBucketLocationResponse getBucketLocation(GetBucketLocationRequest getBucketLocationRequest) throws AwsServiceException, SdkClientException, S3Exception { HttpResponseHandler<GetBucketLocationResponse> responseHandler = protocolFactory.createResponseHandler( GetBucketLocationResponse::builder, new XmlOperationMetadata().withHasStreamingSuccessResponse(false)); HttpResponseHandler<AwsServiceException> errorResponseHandler = protocolFactory.createErrorResponseHandler(); return clientHandler.execute(new ClientExecutionParams<GetBucketLocationRequest, GetBucketLocationResponse>() .withOperationName("GetBucketLocation").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getBucketLocationRequest) .withMarshaller(new GetBucketLocationRequestMarshaller(protocolFactory))); }