1 amazon.s3.uploadBlob
Gets the object stored in Amazon S3 under the specified bucket and key. Returns null if the specified constraints weren't met. To get an object from Amazon S3, the caller must have Permission. Read access to the object.
<aamazon.s3.uploadBlob
bucketName='bucketName'
fileName='fileName'
acl='Private|PublicRead|PublicReadWrite|AuthenticatedRead|LogDeliveryWrite|BucketOwnerRead|BucketOwnerFullControl|AwsExecRead'
multipart='multipart'
access-key='access-key'
secret-key='secret-key'
region='region'
>
<blob /> +
</aamazon.s3.uploadBlob>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
AbucketName | String | Name of the bucket | |||
AfileName | String | The name of the file in the bucket | |||
Aacl | String | Specifies constants defining a canned access control list.
Canned access control lists are commonly used access control lists (ACL) that can be used as a shortcut when applying an access control list to Amazon S3 buckets and objects. Only a few commonly used configurations are available, but they offer an alternative to manually creating a custom ACL. |
|||
Amultipart | Boolean | Amazon S3 objects can range in size from a minimum of 0 bytes to a maximum of 5 terabytes. The largest object that can be uploaded in a single PUT is 5 gigabytes. For objects larger than 100 megabytes, customers should consider using the Multipart Upload capability. | |||
Aaccess-key | String | The AWS access key | |||
Asecret-key | String | The AWS secret access key | |||
Aregion | String | Sets the region to be used by the client. This will be used to determine both the service endpoint (eg: https://sns.us-west-1.amazonaws.com) and signing region (eg: us-west-1) for requests. If region is not explicitly provided as an attribute the DEFAULT_REGION_PROVIDER is consulted. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Eblob | Blob|JDBCBlob | The blob to be uploaded |
Example
Copy
<xsql-script name='upload_blob_sample'> <body> <select prefix='m_'> <columns>codart, lowres</columns> <from table='gartimag'/> <where> codart = '026147' </where> </select> <amazon.s3.uploadBlob bucketName='testjabbucket' acl='PublicReadWrite' fileName='#m_codart' multipart='false' > <m_lowres /> </amazon.s3.uploadBlob> <println><amazon.s3.listKeys bucketName='testjabbucket' /></println> </body> </xsql-script>
Which prints in standard output:
Copy
+-------------------+-------+-------+-----------------------------+------------+--------------------------------+ |key |owner |size |lastModified |storageClass|ETag | |char |char |long |char |char |char | |visible |visible|visible|visible |visible |visible | +-------------------+-------+-------+-----------------------------+------------+--------------------------------+ |026147 | | 5195|Mon Sep 04 18:06:45 CEST 2017|STANDARD |464f8a86c0bbcc413ee43bfbe9a4dc5e| |sample_fil3_s3_name| | 12|Mon Sep 04 17:58:20 CEST 2017|STANDARD |2cad20c19a8eb9bb11a9f76527aec9bc| +-------------------+-------+-------+-----------------------------+------------+--------------------------------+