Add sessiontoken for aws s3 storage
Fixes #3961 Update s3.md doc Signed-off-by: stonezdj <stonezdj@gmail.com>
This commit is contained in:
parent
003dd5aaa1
commit
a380aa4584
2 changed files with 21 additions and 17 deletions
|
@ -10,9 +10,10 @@ Amazon S3 or S3 compatible services for object storage.
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Required | Description |
|
| Parameter | Required | Description |
|
||||||
|:--------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|:-----------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `accesskey` | no | Your AWS Access Key. If you use [IAM roles](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html), omit to fetch temporary credentials from IAM. |
|
| `accesskey` | no | Your AWS Access Key. If you use [IAM roles](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html), omit to fetch temporary credentials from IAM. |
|
||||||
| `secretkey` | no | Your AWS Secret Key. If you use [IAM roles](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html), omit to fetch temporary credentials from IAM. |
|
| `secretkey` | no | Your AWS Secret Key. If you use [IAM roles](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html), omit to fetch temporary credentials from IAM. |
|
||||||
|
| `sessiontoken` | no | Your AWS Session token. If you use [IAM roles](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html), omit to fetch temporary credentials from IAM. |
|
||||||
| `region` | yes | The AWS region in which your bucket exists. |
|
| `region` | yes | The AWS region in which your bucket exists. |
|
||||||
| `regionendpoint` | no | Endpoint for S3 compatible storage services (Minio, etc). |
|
| `regionendpoint` | no | Endpoint for S3 compatible storage services (Minio, etc). |
|
||||||
| `forcepathstyle` | no | To enable path-style addressing when the value is set to `true`. The default is `true`. |
|
| `forcepathstyle` | no | To enable path-style addressing when the value is set to `true`. The default is `true`. |
|
||||||
|
|
|
@ -417,6 +417,9 @@ func FromParameters(parameters map[string]interface{}) (*Driver, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
sessionToken := ""
|
sessionToken := ""
|
||||||
|
if sk, ok := parameters["sessiontoken"].(string); ok {
|
||||||
|
sessionToken = sk
|
||||||
|
}
|
||||||
|
|
||||||
accelerateBool := false
|
accelerateBool := false
|
||||||
accelerate := parameters["accelerate"]
|
accelerate := parameters["accelerate"]
|
||||||
|
|
Loading…
Reference in a new issue