public class BucketOperations extends Object
| Constructor and Description |
|---|
BucketOperations() |
| Modifier and Type | Method and Description |
|---|---|
void |
createBucket(S3Configuration configuration,
S3Connection connection,
String bucketName,
String locationConstraint,
ApiBucketACL acl,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<String,Void> callback)
Creates a new S3 bucket.
|
void |
deleteBucket(S3Configuration configuration,
S3Connection connection,
String bucketName,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Deletes the S3 bucket.
|
void |
deleteBucketCors(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Deletes the cors configuration information set for the bucket.
|
void |
deleteBucketLifecycleConfiguration(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Deletes the lifecycle configuration from the specified bucket.
|
void |
deleteBucketPolicy(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
This implementation of the DELETE action uses the policy subresource to delete the policy of a specified bucket.
|
void |
deleteBucketTagging(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Deletes the tags from the bucket.
|
void |
deleteBucketWebsite(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
This action removes the website configuration for a bucket.
|
void |
getBucketAcl(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketAclResponse,Void> callback)
This implementation of the GET action uses the acl subresource to return the access control list (ACL) of a bucket.
|
void |
getBucketCors(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketCorsResponse,Void> callback)
Returns the Cross-Origin Resource Sharing (CORS) configuration information set for the bucket.
|
void |
getBucketLifecycleConfiguration(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<ApiBucketLifecycleConfiguration,Void> callback)
Returns the lifecycle configuration information set on the bucket.
|
void |
getBucketLocation(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<String,Void> callback)
Returns the Region the bucket resides in.
|
void |
getBucketLogging(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<ApiBucketLoggingStatus,Void> callback)
Returns the logging status of a bucket and the permissions users have to view and modify that status.
|
void |
getBucketNotificationConfiguration(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketNotificationResponse,Void> callback)
Returns the notification configuration of a bucket.
|
void |
getBucketPolicy(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketPolicyResponse,Void> callback)
Returns the policy of a specified bucket.
|
void |
getBucketTagging(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketTaggingResponse,Void> callback)
Returns the tag set associated with the bucket.
|
void |
getBucketVersioning(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketVersioningResponse,Void> callback)
Returns the versioning state of a bucket.
|
void |
getBucketWebsite(S3Configuration configuration,
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketWebsiteResponse,Void> callback)
Returns the website configuration for a bucket.
|
void |
listBuckets(S3Configuration configuration,
S3Connection connection,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<ListBucketsResponse,Void> callback)
Returns a list of all buckets owned by the authenticated sender of the request.
|
void |
putBucketAcl(S3Configuration configuration,
S3Connection connection,
String bucket,
List<ApiGrant> grants,
String ownerId,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Sets the permissions on an existing bucket using access control lists (ACL).
|
void |
putBucketCors(S3Configuration configuration,
S3Connection connection,
String bucket,
List<ApiCORSRule> corsRules,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Sets the cors configuration for your bucket.
|
void |
putBucketLifecycleConfiguration(S3Configuration configuration,
S3Connection connection,
String bucket,
List<ApiLifecycleRule> lifecycleRules,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration.
|
void |
putBucketLoggingConfiguration(S3Configuration configuration,
S3Connection connection,
String bucket,
ApiBucketLoggingStatus bucketLoggingConfiguration,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters.
|
void |
putBucketNotificationConfiguration(S3Configuration configuration,
S3Connection connection,
String bucket,
ApiNotificationConfiguration notificationConfiguration,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Enables notifications of specified events for a bucket.
|
void |
putBucketPolicy(S3Configuration configuration,
S3Connection connection,
String bucket,
InputStream policy,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Applies an Amazon S3 bucket policy to an Amazon S3 bucket.
|
void |
putBucketTagging(S3Configuration configuration,
S3Connection connection,
String bucket,
Map<String,String> bucketTags,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Sets the tags for a bucket.
|
void |
putBucketVersioning(S3Configuration configuration,
S3Connection connection,
String bucket,
ApiVersioningStatus versioningStatus,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Sets the versioning state of an existing bucket.
|
void |
putBucketWebsite(S3Configuration configuration,
S3Connection connection,
String bucket,
ApiWebsiteConfiguration websiteConfig,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Sets the configuration of the website that is specified in the website subresource.
|
@DisplayName(value="Create Bucket")
@MediaType(value="text/plain")
@Throws(value={CreateBucketErrorProvider.class,S3ErrorProvider.class})
public void createBucket(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
String bucketName,
@Optional @Summary(value="Specifies the Region where the bucket will be created.")
String locationConstraint,
@Optional @Summary(value="The canned ACL to apply to the bucket.")
ApiBucketACL acl,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<String,Void> callback)
configuration - - configuration usedconnection - - active connectionbucketName - - Name of the bucketacl - - PRIVATE | PUBLIC-READ | PUBLIC-READ-WRITE | AUTHENTICATED-READ@DisplayName(value="Delete Bucket")
@Throws(value={NoSuchBucketErrorProvider.class,S3ErrorProvider.class})
public void deleteBucket(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
String bucketName,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
configuration - - configuration usedconnection - - active connectionbucketName - - Name of the bucket@Throws(value=S3ErrorProvider.class) @DisplayName(value="Delete Bucket Cors") public void deleteBucketCors(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
To use this operation, you must have permission to perform the s3:PutBucketCORS action. The bucket owner has this permission by default and can grant this permission to others.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@DisplayName(value="Delete Bucket Lifecycle Configuration")
@Throws(value={BucketLifeCycleConfigurationErrorProvider.class,S3ErrorProvider.class})
public void deleteBucketLifecycleConfiguration(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
To use this operation, you must have permission to perform the s3:PutLifecycleConfiguration action. By default, the bucket owner has this permission and the bucket owner can grant this permission to others.
There is usually some time lag before lifecycle configuration deletion is fully propagated to all the Amazon S3 systems.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@Throws(value=S3ErrorProvider.class) @DisplayName(value="Delete Bucket Policy") public void deleteBucketPolicy(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
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.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@Throws(value=S3ErrorProvider.class) @DisplayName(value="Delete Bucket Tagging") public void deleteBucketTagging(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
To use this operation, you must have permission to perform the s3:PutBucketTagging action. By default, the bucket owner has this permission and can grant this permission to others.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@Throws(value=S3ErrorProvider.class) @DisplayName(value="Delete Bucket Website") public void deleteBucketWebsite(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
This DELETE action requires the S3:DeleteBucketWebsite permission. By default, only the bucket owner can delete the website configuration attached to a bucket. However, bucket owners can grant other users permission to delete the website configuration by writing a bucket policy granting them the S3:DeleteBucketWebsite permission.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@Throws(value=S3ErrorProvider.class) @DisplayName(value="Get Bucket Acl") public void getBucketAcl(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketAclResponse,Void> callback)
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@Throws(value=S3ErrorProvider.class) @DisplayName(value="Get Bucket Cors") public void getBucketCors(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketCorsResponse,Void> callback)
To use this operation, you must have permission to perform the s3:GetBucketCORS action. By default, the bucket owner has this permission and can grant it to others.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@DisplayName(value="Get Bucket Lifecycle Configuration")
@Throws(value={BucketLifeCycleConfigurationErrorProvider.class,S3ErrorProvider.class})
public void getBucketLifecycleConfiguration(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<ApiBucketLifecycleConfiguration,Void> callback)
To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration action. The bucket owner has this permission, by default. The bucket owner can grant this permission to others.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@DisplayName(value="Get Bucket Location") @MediaType(value="text/plain") @Throws(value=S3ErrorProvider.class) public void getBucketLocation(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, org.mule.runtime.extension.api.runtime.process.CompletionCallback<String,Void> callback)
To use this implementation of the operation, you must be the bucket owner.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@DisplayName(value="Get Bucket Logging") @Throws(value=S3ErrorProvider.class) public void getBucketLogging(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, org.mule.runtime.extension.api.runtime.process.CompletionCallback<ApiBucketLoggingStatus,Void> callback)
The following operations are related to GetBucketLogging:
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@DisplayName(value="Get Bucket Notification Configuration") @Throws(value=S3ErrorProvider.class) public void getBucketNotificationConfiguration(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketNotificationResponse,Void> callback)
If notifications are not enabled on the bucket, the action returns an empty NotificationConfiguration element.
By default, you must be the bucket owner to read the notification configuration of a bucket. However, the bucket owner can use a bucket policy to grant permission to other users to read this configuration with the s3:GetBucketNotification permission.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@DisplayName(value="Get Bucket Policy") @Throws(value=S3ErrorProvider.class) public void getBucketPolicy(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketPolicyResponse,Void> callback)
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@DisplayName(value="Get Bucket Tagging")
@Throws(value={BucketTaggingErrorProvider.class,S3ErrorProvider.class})
public void getBucketTagging(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
String bucket,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketTaggingResponse,Void> callback)
To use this operation, you must have permission to perform the s3:GetBucketTagging action. By default, the bucket owner has this permission and can grant this permission to others.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@DisplayName(value="Get Bucket Versioning") @Throws(value=S3ErrorProvider.class) public void getBucketVersioning(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketVersioningResponse,Void> callback)
To retrieve the versioning state of a bucket, you must be the bucket owner.
This implementation also returns the MFA Delete status of the versioning state. If the MFA Delete status is enabled, the bucket owner must use an authentication device to change the versioning state of the bucket.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@DisplayName(value="Get Bucket Website") @Throws(value=S3ErrorProvider.class) public void getBucketWebsite(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, org.mule.runtime.extension.api.runtime.process.CompletionCallback<BucketWebsiteResponse,Void> callback)
This GET action requires the S3:GetBucketWebsite permission. By default, only the bucket owner can read the bucket website configuration. However, bucket owners can allow other users to read the website configuration by writing a bucket policy granting them the S3:GetBucketWebsite permission.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@DisplayName(value="List Buckets")
@Throws(value={NoSuchBucketErrorProvider.class,S3ErrorProvider.class})
public void listBuckets(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<ListBucketsResponse,Void> callback)
To use this operation, you must have the s3:ListAllMyBuckets permission.
configuration - - configuration usedconnection - - active connection@DisplayName(value="Put Bucket Acl") @Throws(value=S3ErrorProvider.class) public void putBucketAcl(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, @Optional @NullSafe List<ApiGrant> grants, @Optional @Summary(value="Canonical AWS owner id.") String ownerId, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
You can use one of the following two ways to set a bucket's permissions:
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucketgrants - - a list of grants for this bucketownerId - - the Canonical AWS ID of the owner@DisplayName(value="Put Bucket Cors") @Throws(value=S3ErrorProvider.class) public void putBucketCors(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, List<ApiCORSRule> corsRules, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
To use this operation, you must be allowed to perform the s3:PutBucketCORS action. By default, the bucket owner has this permission and can grant it to others.
You set this configuration on a bucket so that the bucket can service cross-origin requests. For example, you might want to enable a request whose origin is http://www.example.com to access your Amazon S3 bucket at my.example.bucket.com by using the browser's XMLHttpRequest capability.
To enable cross-origin resource sharing (CORS) on a bucket, you add the cors subresource to the bucket. The cors subresource is an XML document in which you configure rules that identify origins and the HTTP methods that can be executed on your bucket. The document is limited to 64 KB in size.
When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against a bucket, it evaluates the cors configuration on the bucket and uses the first CORSRule rule that matches the incoming browser request to enable a cross-origin request. For a rule to match, the following conditions must be met:
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucketcorsRules - - a list of CORS rules@DisplayName(value="Put Bucket Lifecycle Configuration")
@Throws(value={BucketLifeCycleConfigurationErrorProvider.class,S3ErrorProvider.class})
public void putBucketLifecycleConfiguration(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
String bucket,
List<ApiLifecycleRule> lifecycleRules,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucketlifecycleRules - - a list of lifecycle rules@DisplayName(value="Put Bucket Logging") @Throws(value=S3ErrorProvider.class) public void putBucketLoggingConfiguration(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, ApiBucketLoggingStatus bucketLoggingConfiguration, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
The bucket owner is automatically granted FULL_CONTROL to all logs. You use the Grantee request element to grant access to other people. The Permissions request element specifies the kind of access the grantee has to the logs.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucketbucketLoggingConfiguration - - configuration of the logging behavior@DisplayName(value="Put Bucket Notification Configuration") @Throws(value=S3ErrorProvider.class) public void putBucketNotificationConfiguration(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, ApiNotificationConfiguration notificationConfiguration, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Using this API, you can replace an existing notification configuration. The configuration is an XML file that defines the event types that you want Amazon S3 to publish and the destination where you want Amazon S3 to publish an event notification when it detects an event of the specified type.
This action replaces the existing notification configuration with the configuration you include in the request.
You can disable notifications by adding defining empty notificationConfiguration.
By default, only the bucket owner can configure notifications on a bucket. However, bucket owners can use a bucket policy to grant permission to other users to set this configuration with s3:PutBucketNotification permission
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucketnotificationConfiguration - - configuration of the notifications behavior@DisplayName(value="Put Bucket Policy") @Throws(value=S3ErrorProvider.class) public void putBucketPolicy(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, InputStream policy, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucketpolicy - - Policy configuration as JSON@DisplayName(value="Put Bucket Tagging")
@Throws(value={TaggingErrorProvider.class,S3ErrorProvider.class})
public void putBucketTagging(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
String bucket,
@Optional @NullSafe
Map<String,String> bucketTags,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Use tags to organize your AWS bill to reflect your own cost structure. To do this, sign up to get your AWS account bill with tag key values included. Then, to see the cost of combined resources, organize your billing information according to resources with the same tag key values. For example, you can tag several resources with a specific application name, and then organize your billing information to see the total cost of that application across several services.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucket@DisplayName(value="Put Bucket Versioning") @Throws(value=S3ErrorProvider.class) public void putBucketVersioning(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, @Optional ApiVersioningStatus versioningStatus, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
You can set the versioning state with one of the following values:
If the versioning state has never been set on a bucket, it has no versioning state; a GetBucketVersioning request does not return a versioning state value.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucketversioningStatus - - Status of versioning for this bucket, either Enabled or Suspended@DisplayName(value="Put Bucket Website") @Throws(value=S3ErrorProvider.class) public void putBucketWebsite(@Config S3Configuration configuration, @Connection S3Connection connection, String bucket, @Optional ApiWebsiteConfiguration websiteConfig, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
This PUT action requires the S3:PutBucketWebsite permission. By default, only the bucket owner can configure the website attached to a bucket; however, bucket owners can allow other users to set the website configuration by writing a bucket policy that grants them the S3:PutBucketWebsite permission.
configuration - - configuration usedconnection - - active connectionbucket - - name of the bucketwebsiteConfig - - Website serving configurationCopyright © 2025 MuleSoft, Inc.. All rights reserved.