Amazon S3 Bucket (Independent Publisher) (#2912)

* Custom Connector added for Amazon S3 Bucket

* Documentation improved

* API Documentation improved

* documentation

* x-ms-summary added

* x-ms-connector-metadata updated

* icon brand color

* Summary fixed

---------

Co-authored-by: Michael Megel <michael.megel@mme2k.onmicrosoft.com>
Co-authored-by: Michael Megel <michael.megel@biontech.de>
This commit is contained in:
Michael Megel 2024-02-01 08:24:39 +01:00 коммит произвёл GitHub
Родитель bc1011c5e7
Коммит 02e2e9d6ff
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
4 изменённых файлов: 1634 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,371 @@
{
"swagger": "2.0",
"info": {
"title": "Amazon S3 Bucket",
"description": "This connector provides read and write access to objects of an Amazon S3 Bucket.",
"version": "1.0",
"contact": {
"name": "Michael Megel",
"url": "https://never-stop-learning.de",
"email": "michael.megel@never-stop-learning.de"
}
},
"host": "s3.amazonaws.com",
"basePath": "/",
"schemes": [
"https"
],
"consumes": [],
"produces": [],
"paths": {
"/aws/s3/{region}/{bucket}": {
"get": {
"responses": {
"200": {
"description": "success",
"schema": {
"type": "object",
"properties": {
"ListBucketResult": {
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "The bucket name."
},
"Prefix": {
"type": "string",
"description": "Keys that begin with the indicated prefix."
},
"MaxKeys": {
"type": "string",
"description": "Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more."
},
"IsTruncated": {
"type": "string",
"description": "Set to false if all of the results were returned. Set to true if more keys are available to return. If the number of results exceeds that specified by MaxKeys, all of the results might not be returned."
},
"KeyCount": {
"type": "string",
"description": "KeyCount is the number of keys returned with this request. KeyCount will always be less than or equal to the MaxKeys field. For example, if you ask for 50 keys, your result will include 50 keys or fewer."
},
"ContinuationToken": {
"type": "string",
"description": "If ContinuationToken was sent with the request, it is included in the response."
},
"NextContinuationToken": {
"type": "string",
"description": "NextContinuationToken is sent when isTruncated is true, which means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken is obfuscated and is not a real key"
},
"StartAfter": {
"type": "string",
"description": "If StartAfter was sent with the request, it is included in the response."
},
"Contents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Key": {
"type": "string",
"description": "The key of the object."
},
"LastModified": {
"type": "string",
"description": "The last modified date of the object"
},
"Size": {
"type": "string",
"description": "The size of the object in bytes."
},
"Owner": {
"type": "object",
"properties": {
"ID": {
"type": "string",
"description": "The ID of the owner."
},
"DisplayName": {
"type": "string",
"description": "The display name of the owner."
}
},
"description": "Owner"
},
"StorageClass": {
"type": "string",
"description": "The S3 Storage Class"
}
}
},
"description": "The list of objects."
}
},
"description": "List S3 Objects Result"
}
}
}
}
},
"tags": [
"S3-Bucket"
],
"summary": "List Objects",
"description": "List Objects in S3 Bucket",
"operationId": "list-objects-s3",
"parameters": [
{
"name": "region",
"in": "path",
"required": true,
"type": "string",
"default": "",
"description": "The region of the S3 bucket.",
"x-ms-summary": "Region"
},
{
"name": "bucket",
"in": "path",
"required": true,
"type": "string",
"default": "",
"description": "The name of the S3 bucket.",
"x-ms-summary": "Bucket"
},
{
"name": "bucketlist-type",
"in": "query",
"required": false,
"type": "string",
"default": "2",
"description": "The bucket list type.",
"x-ms-summary": "Bucket List Type"
},
{
"name": "continuation-token",
"in": "query",
"required": false,
"type": "string",
"description": "ContinuationToken indicates to Amazon S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key.",
"x-ms-summary": "Continuation Token"
},
{
"name": "delimiter",
"in": "query",
"required": false,
"type": "string",
"description": "A delimiter is a character that you use to group keys.",
"x-ms-summary": "Delimiter"
},
{
"name": "prefix",
"in": "query",
"required": false,
"type": "string",
"description": "Limits the response to keys that begin with the specified prefix.",
"x-ms-summary": "Prefix"
},
{
"name": "encoding-type",
"in": "query",
"required": false,
"type": "string",
"description": "Encoding type used by Amazon S3 to encode object keys in the response.",
"x-ms-summary": "Encoding Type"
},
{
"name": "fetch-owner",
"in": "query",
"required": false,
"type": "string",
"description": "The owner field is not present in ListObjectsV2 by default. If you want to return the owner field with each key in the result, then set the FetchOwner field to true.",
"x-ms-summary": "Fetch Owner"
},
{
"name": "max-keys",
"in": "query",
"required": false,
"type": "number",
"format": "integer",
"description": "Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more.",
"x-ms-summary": "Max Keys"
},
{
"name": "start-after",
"in": "query",
"required": false,
"type": "string",
"description": "StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket.",
"x-ms-summary": "Start After"
}
]
}
},
"/aws/s3/{region}/{bucket}/{key}": {
"delete": {
"responses": {
"204": {
"description": "success",
"schema": {}
}
},
"tags": [
"S3-Bucket"
],
"summary": "Delete Object",
"description": "Delete Object from S3 Bucket",
"operationId": "delete-object-s3",
"parameters": [
{
"name": "region",
"in": "path",
"required": true,
"type": "string",
"default": "",
"description": "The region of the S3 bucket.",
"x-ms-summary": "Region"
},
{
"name": "bucket",
"in": "path",
"required": true,
"type": "string",
"default": "",
"description": "The name of the S3 bucket.",
"x-ms-summary": "Bucket"
},
{
"name": "key",
"in": "path",
"required": true,
"type": "string",
"description": "The key of the object.",
"x-ms-summary": "Key"
}
]
},
"get": {
"responses": {
"200": {
"description": "success",
"schema": {}
}
},
"tags": [
"S3-Bucket"
],
"summary": "Get Object",
"description": "Get Object from S3 Bucket",
"operationId": "get-object-s3",
"parameters": [
{
"name": "region",
"in": "path",
"required": true,
"type": "string",
"default": "",
"description": "The region of the S3 bucket.",
"x-ms-summary": "Region"
},
{
"name": "bucket",
"in": "path",
"required": true,
"type": "string",
"default": "",
"description": "The name of the S3 bucket.",
"x-ms-summary": "Bucket"
},
{
"name": "key",
"in": "path",
"required": true,
"type": "string",
"default": "",
"description": "The key of the object.",
"x-ms-summary": "Key"
}
]
},
"put": {
"responses": {
"200": {
"description": "success",
"schema": {}
}
},
"tags": [
"S3-Bucket"
],
"summary": "Put Object",
"description": "Put Object to S3 Bucket",
"operationId": "put-object-s3",
"parameters": [
{
"name": "region",
"in": "path",
"required": true,
"type": "string",
"default": "",
"description": "The region of the S3 bucket.",
"x-ms-summary": "Region"
},
{
"name": "bucket",
"in": "path",
"required": true,
"type": "string",
"default": "",
"description": "The name of the S3 bucket.",
"x-ms-summary": "Bucket"
},
{
"name": "key",
"in": "path",
"required": true,
"type": "string",
"default": "",
"description": "The key of the object.",
"x-ms-summary": "Key"
},
{
"name": "body",
"in": "body",
"schema": {
"type": "string"
},
"x-ms-summary": "Content"
}
]
}
}
},
"definitions": {},
"parameters": {},
"responses": {},
"securityDefinitions": {
"basic-auth": {
"type": "basic"
}
},
"security": [
{
"basic-auth": []
}
],
"tags": [],
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://aws.amazon.com//"
},
{
"propertyName": "Privacy policy",
"propertyValue": "https://aws.amazon.com//"
},
{
"propertyName": "Categories",
"propertyValue": "Collaboration;Content and Files"
}
]
}

Просмотреть файл

@ -0,0 +1,43 @@
{
"properties": {
"connectionParameters": {
"username": {
"type": "securestring",
"uiDefinition": {
"displayName": "accessKeyId",
"description": "The accessKeyId for this api",
"tooltip": "Provide the accessKeyId",
"constraints": {
"tabIndex": 2,
"clearText": true,
"required": "true"
}
}
},
"password": {
"type": "securestring",
"uiDefinition": {
"displayName": "accessKeySecret",
"description": "The accessKeySecret for this api",
"tooltip": "Provide the accessKeySecret",
"constraints": {
"tabIndex": 3,
"clearText": false,
"required": "true"
}
}
}
},
"iconBrandColor": "#da3b01",
"capabilities": [],
"scriptOperations": [
"list-objects-s3",
"get-object-s3",
"put-object-s3",
"delete-object-s3"
],
"publisher": "Michael Megel",
"stackOwner": "Amazon Web Services",
"policyTemplateInstances": []
}
}

Просмотреть файл

@ -0,0 +1,47 @@
# Amazon S3 Bucket
Amazon Simple Storage Service (Amazon S3) is an object storage service.
## Publisher
Michael Megel
## Prerequisites
You will need the following to proceed:
* You must have an AWS account.
* You need an IAM (Identity and Access Management) user or role with appropriate permissions to access the S3 bucket.
* You need the AWS Access Key ID and AWS Secret Access Key of the IAM user or role.
* You need the name of the S3 bucket you want to access.
## Obtaining Credentials
Use your AWS Access Key ID as the username and AWS Access Key Secret as the password. AWS Access Key ID and AWS Access Key Secret are used to authenticate the request to AWS. For more information, see [AWS Signature Version 4](#aws-signature-version-4).
## Supported Operations
AWS S3 Rest API operations is documented here: [AWS S3 Rest API Documentation](https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations.html)
This connector supports the following operations:
* [List Objects v2](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
* [Get Object](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
* [Put Object](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
* [Delete Object](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
## Known Issues and Limitations
* List Objects v2
* The maximum number of objects returned is 1000.
* Get Object
* The content is returned as a string.
* Put Object
* The content must be a string.
## AWS Signature Version 4
The AWS Signature Version 4 is used to authenticate requests to AWS services. The signature is calculated based on the following documentation:
* [Authenticating Requests (AWS Signature Version 4)](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html)
* [AWS Signature Version 4 C# example for Amazon S3 Buckets](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-examples-using-sdks.html)

Разница между файлами не показана из-за своего большого размера Загрузить разницу