S3
Kubemq aws-s3 target connector allows services using kubemq server to access aws s3 service.

Prerequisites

The following required to run the aws-s3 target connector:
  • kubemq cluster
  • aws account with s3 active service
  • kubemq-source deployment

Configuration

s3 target connector configuration properties:
Properties Key
Required
Description
Example
aws_key
yes
aws key
aws key supplied by aws
aws_secret_key
yes
aws secret key
aws secret key supplied by aws
region
yes
region
aws region
token
no
aws token ("default" empty string
aws token
downloader
no
if needed to create downloader instance
true
uploader
no
if needed to create uploader instance
false
Example:
1
bindings:
2
- name: kubemq-query-aws-s3
3
source:
4
kind: kubemq.query
5
name: kubemq-query
6
properties:
7
address: "kubemq-cluster:50000"
8
client_id: "kubemq-query-aws-s3-connector"
9
auth_token: ""
10
channel: "query.aws.s3"
11
group: ""
12
auto_reconnect: "true"
13
reconnect_interval_seconds: "1"
14
max_reconnects: "0"
15
target:
16
kind: aws.s3
17
name: aws-s3
18
properties:
19
aws_key: "id"
20
aws_secret_key: 'json'
21
region: "region"
22
token: ""
23
downloader: "true"
24
uploader: "true"
Copied!

Usage

List Buckets

list all buckets.
List Buckets:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"list_buckets"
Example:
1
{
2
"metadata": {
3
"method": "list_buckets"
4
},
5
"data": null
6
}
Copied!

List Bucket Items

list all items in the selected bucket
List Bucket Items:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"list_bucket_items"
bucket_name
yes
s3 bucket name
"my_bucket_name"
Example:
1
{
2
"metadata": {
3
"method": "list_bucket_items",
4
"bucket_name": "my_bucket_name"
5
},
6
"data": null
7
}
Copied!

Create Bucket

create a new bucket, name must be unique
Create Bucket :
Metadata Key
Required
Description
Possible values
method
yes
type of method
"create_bucket"
bucket_name
yes
s3 bucket name
"my_bucket_name"
wait_for_completion
no
wait for operation to end
"true","false" default of false
Example:
1
{
2
"metadata": {
3
"method": "create_bucket",
4
"bucket_name": "my_bucket_name"
5
},
6
"data": null
7
}
Copied!

Upload Item

upload item to bucket.
Upload Bucket Items:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"upload_item"
bucket_name
yes
s3 bucket name
"my_bucket_name"
wait_for_completion
no
wait for operation to end
"true","false" (default of false )
item_name
yes
the name of the item
"valid-string"
data
yes
the object data in byte array
"valid-string"
Example:
1
{
2
"metadata": {
3
"method": "create_bucket",
4
"bucket_name": "my_bucket_name",
5
"item_name": "my_item_name"
6
},
7
"data": "bXkgaXRlbSBoZXJl"
8
}
Copied!

Get Item

Get item by item name from bucket
Get Bucket Items:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"get_item"
bucket_name
yes
s3 bucket name
"my_bucket_name"
item_name
yes
the name of the item
"valid-string"
Example:
1
{
2
"metadata": {
3
"method": "get_item",
4
"bucket_name": "my_bucket_name",
5
"item_name": "my_item_name"
6
},
7
"data": null
8
}
Copied!

Delete Item

delete item by item name from bucket
Delete Item:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"delete_item_from_bucket"
bucket_name
yes
s3 bucket name
"my_bucket_name"
wait_for_completion
no
wait for operation to end
"true","false" (default of false )
item_name
yes
the name of the item
"valid-string"
Example:
1
{
2
"metadata": {
3
"method": "delete_item_from_bucket",
4
"bucket_name": "my_bucket_name",
5
"item_name": "my_item_name"
6
},
7
"data": null
8
}
Copied!

Delete All Items

delete all items from a bucket
Delete All Items:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"delete_all_items_from_bucket"
bucket_name
yes
s3 bucket name
"my_bucket_name"
wait_for_completion
no
wait for operation to end
"true","false" (default of false )
Example:
1
{
2
"metadata": {
3
"method": "delete_item_from_bucket",
4
"bucket_name": "my_bucket_name"
5
},
6
"data": null
7
}
Copied!

Copy Item

copy an item from one bucket to another
Copy Items:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"copy_item"
bucket_name
yes
s3 bucket name
"my_bucket_name"
copy_source
yes
s3 bucket name source name
"my_bucket_source_name"
item_name
yes
the name of the item
"valid-string"
wait_for_completion
no
wait for operation to end
"true","false" (default of false )
Example:
1
{
2
"metadata": {
3
"method": "copy_item",
4
"bucket_name": "my_bucket_name",
5
"copy_source": "my_bucket_source_name",
6
"item_name": "my_item_name"
7
},
8
"data": null
9
}
Copied!

Delete Bucket

delete a bucket by name.
Delete Bucket:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"delete_bucket"
bucket_name
yes
s3 bucket name
"my_bucket_name"
wait_for_completion
no
wait for operation to end
"true","false" (default of false )
Example:
1
{
2
"metadata": {
3
"method": "delete_bucket",
4
"bucket_name": "my_bucket_name"
5
},
6
"data": null
7
}
Copied!
Last modified 11mo ago