Skip to content

~crosstalk.api.aws.s3.deleteObject@v1

tristanls edited this page Dec 26, 2012 · 1 revision

DeleteObject. see: http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html

Since Version 1.0.0
Scope
accepts: public responds as: ~crosstalk

Parameters

All parameters are optional, unless otherwise indicated.

awsAccessKeyId AKIAIOSFODNN7EXAMPLE required AWS Access Key Id
bucketName myBucket required AWS S3 Bucket to put object into
objectName myObject.json required Object name that will be used when putting into AWS S3
secretAccessKey EXAMPLEgqkMoFlcrotaJGlKH82cOA3IyhEXAMPLE required AWS Secret Access Key

Response fields

Response

requestId 4442587FB7D0A2F9 Request id returned by AWS S3 API

Error

code NoSuchKey Error code returned by AWS S3 API
message The resource you requested does not exist Error message by AWS S3 API
requestId 4442587FB7D0A2F9 Request id returned by AWS S3 API
resource /mybucket/myfoto.jpg Request resource returned by AWS S3 API

Example

Request:

crosstalk.emit( 
  '~crosstalk.api.aws.s3.deleteObject@v1', 
  {
    awsAccessKeyId : 'AKIAIOSFODNN7EXAMPLE',
    bucketName : 'myBucket',
    objectName : 'myObject.json',
    secretAccessKey : 'EXAMPLEgqkMoFlcrotaJGlKH82cOA3IyhEXAMPLE'
  }, 
  '~crosstalk',
  function ( error, response ) { /* ... */ }
);

Response:

{ 
  requestId : "477E74B075212267"
}

Error:

{ 
  code : "NoSuchKey",
  message : "The resource you requested does not exist",
  resource : "/mybucket/myfoto.jpg",
  requestId : "4442587FB7D0A2F9"
}