DeleteObject
Delete objects from an Amazon S3 bucket.
Task version: 2.0.0
Required Frends version: 5.7+
Required .NET version: 8.0
Compatible Agents: Crossplatform
Source code: https://github.com/FrendsPlatform/Frends.AmazonS3
Task Parameters
Objects : S3ObjectArray[]
Array of S3 objects to be deleted. Each object contains bucket name, key, and optional version ID.
Default: -
Example: [ { BucketName: "ExampleBucket", Key: "ExampleKey", VersionId: "1" }, { BucketName: "ExampleBucket", Key: "ExampleKey2", VersionId: "" } ]
ActionOnObjectNotFound : NotExistsHandler
Defines how to handle objects that don't exist:
- None (Default): Task doesn't check if the object exists before deletion. Each delete operation will return version ID and be included in DeletedObjects unless an exception occurs.
- Info: Task will check if the object exists before each delete operation. Non-existing objects will be skipped and included in DeletedObjects with null version ID.
- Throw: Throw an exception if any object doesn't exist. Task will check all objects in Input.Objects before starting the delete process.
Possible values:
None: Task doesn't check if the object exists before the delete operation. Each delete operation will return versionid and success = true unless an exception occurs.Info: Each nonexisting object will return Success = false and an error message.Throw: Throw an exception if the object doesn't exists. Task will check all objects listed in Input.Objects before continuing to delete process.
Default: None
Example: NotExistsHandler.None
🗝AwsAccessKeyId : String
AWS Access Key ID for authentication with AWS S3 service.
Default: -
Example: AKIAQWERTY7NJ5Q7NZ6Q
🗝AwsSecretAccessKey : String
AWS Secret Access Key for authentication with AWS S3 service.
Default: -
Example: TVh5hgd3uGY/2CqH
Region : Region
The AWS region where the S3 bucket is located.
Possible values:
AfSouth1: The AWS region where the S3 bucket is located.ApEast1: The AWS region where the S3 bucket is located.ApNortheast1: The AWS region where the S3 bucket is located.ApNortheast2: The AWS region where the S3 bucket is located.ApNortheast3: The AWS region where the S3 bucket is located.ApSouth1: The AWS region where the S3 bucket is located.ApSoutheast1: The AWS region where the S3 bucket is located.ApSoutheast2: The AWS region where the S3 bucket is located.CaCentral1: The AWS region where the S3 bucket is located.CnNorth1: The AWS region where the S3 bucket is located.CnNorthWest1: The AWS region where the S3 bucket is located.EuCentral1: The AWS region where the S3 bucket is located.EuNorth1: The AWS region where the S3 bucket is located.EuSouth1: The AWS region where the S3 bucket is located.EuWest1: The AWS region where the S3 bucket is located.EuWest2: The AWS region where the S3 bucket is located.EuWest3: The AWS region where the S3 bucket is located.MeSouth1: The AWS region where the S3 bucket is located.SaEast1: The AWS region where the S3 bucket is located.UsEast1: The AWS region where the S3 bucket is located.UsEast2: The AWS region where the S3 bucket is located.UsWest1: The AWS region where the S3 bucket is located.UsWest2: The AWS region where the S3 bucket is located.
Default: EuWest1
Example: Region.EuCentral1
Timeout : Int32
Timeout in seconds for S3 operations. If an operation takes longer than this value, it will be cancelled.
Default: 30
Example: 30
ThrowErrorOnFailure : Boolean
If true, throws an exception when any delete operation fails. If false, returns a Result object with error information.
Default: True
Example: true
ErrorMessageOnFailure : String
Custom error message to use when operations fail. If empty, default error messages will be used.
Default: -
Example: "Custom delete operation failed"
Task Result
Success : Boolean
Indicates whether all delete operations completed successfully. False if any operations failed or objects were not found (depending on ActionOnObjectNotFound setting).
Example: true
DeletedObjects : List<SingleResultObject>
List of objects that were processed during the delete operation. Includes both successfully deleted objects and skipped objects (when ActionOnObjectNotFound is set to Info).
Example: [ { BucketName: "my-bucket", Key: "Key1.txt", VersionId: "etZwWf8lJPf_5MuzOyFzepWqA3eS3EIN" }, { BucketName: "my-bucket", Key: "Key2.txt", VersionId: "atZwWf8lJPf_5MuzOyFzepWqA3eS3EIN" } ]
Error : Error
Error information containing details about failed operations and objects that encountered errors. Null if all operations succeeded.
Example: { Message: "Some objects could not be deleted.", AdditionalInfo: [ { BucketName: "my-bucket", Key: "Key3.txt", VersionId: null } ] }
Error.Message : String
Error message.
Example: Object ExampleKey doesn't exist in ExampleBucket.
Error.AdditionalInfo : List<SingleResultObject>
List of objects that encountered errors during delete operation.
Example: Additional context or details
Task Changelog
Changelog for Task Frends.AmazonS3.DeleteObject.
[2.0.0] - 2026-01-07
Added
New Connection tab with AWS connection parameters (AwsAccessKeyId, AwsSecretAccessKey, Region)
ThrowErrorOnFailure option in Options tab with default value true
ErrorMessageOnFailure option in Options tab for custom error messages
BucketName property in SingleResultObject class
Error class with Message and AdditionalInfo properties
Changed
[Breaking] Moved AwsAccessKeyId, AwsSecretAccessKey, and Region from Input tab to Connection tab
[Breaking] Moved NotExistsHandler from Options tab to Input tab and renamed to ActionOnObjectNotFound
[Breaking] Renamed Result.Data property to Result.DeletedObjects
[Breaking] Removed Success and Error properties from SingleResultObject class
[Breaking] Updated Result class structure with new Error property
[1.0.0] - 2023-02-20
Added
Initial implementation
Last updated
Was this helpful?

