add storageClass example for s3 metadata (#4308)

* add storageClass example to docs

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>

* add field to table

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>

* update data indentation for example curl

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>

* Update daprdocs/content/en/reference/components-reference/supported-bindings/s3.md

Co-authored-by: Mark Fussell <markfussell@gmail.com>
Signed-off-by: Cassie Coyle <cassie.i.coyle@gmail.com>

* tweaks

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>

* add to template example

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>

* add doc link for storage class

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>

* Update daprdocs/content/en/reference/components-reference/supported-bindings/s3.md

Signed-off-by: Mark Fussell <markfussell@gmail.com>

* Update daprdocs/content/en/reference/components-reference/supported-bindings/s3.md

Signed-off-by: Mark Fussell <markfussell@gmail.com>

* Update daprdocs/content/en/reference/components-reference/supported-bindings/s3.md

Signed-off-by: Mark Fussell <markfussell@gmail.com>

---------

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Signed-off-by: Cassie Coyle <cassie.i.coyle@gmail.com>
Signed-off-by: Mark Fussell <markfussell@gmail.com>
Co-authored-by: Mark Fussell <markfussell@gmail.com>
This commit is contained in:
Cassie Coyle 2024-08-16 16:44:10 -05:00 committed by GitHub
parent ecf9637bdc
commit 3b38ae3ecc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 1 deletions

View File

@ -44,6 +44,8 @@ spec:
value: "<bool>"
- name: insecureSSL
value: "<bool>"
- name: storageClass
value: "<string>"
```
{{% alert title="Warning" color="warning" %}}
@ -65,6 +67,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| `encodeBase64` | N | Output | Configuration to encode base64 file content before return the content. (In case of opening a file with binary content). `"true"` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `"false"` | `"true"`, `"false"` |
| `disableSSL` | N | Output | Allows to connect to non `https://` endpoints. Defaults to `"false"` | `"true"`, `"false"` |
| `insecureSSL` | N | Output | When connecting to `https://` endpoints, accepts invalid or self-signed certificates. Defaults to `"false"` | `"true"`, `"false"` |
| `storageClass` | N | Output | The desired storage class for objects during the create operation. [Valid aws storage class types can be found here](https://aws.amazon.com/s3/storage-classes/) | `STANDARD_IA` |
{{% alert title="Important" color="warning" %}}
When running the Dapr sidecar (daprd) with your application on EKS (AWS Kubernetes), if you're using a node/pod that has already been attached to an IAM policy defining access to AWS resources, you **must not** provide AWS access-key, secret-key, and tokens in the definition of the component spec you're using.
@ -165,10 +168,20 @@ To perform a create operation, invoke the AWS S3 binding with a `POST` method an
```json
{
"operation": "create",
"data": "YOUR_CONTENT"
"data": "YOUR_CONTENT",
"metadata": {
"storageClass": "STANDARD_IA"
}
}
```
For example you can provide a storage class while using the `create` operation with a Linux curl command
```bash
curl -d '{ "operation": "create", "data": "YOUR_BASE_64_CONTENT", "metadata": { "storageClass": "STANDARD_IA" } }' /
http://localhost:<dapr-port>/v1.0/bindings/<binding-name>
```
#### Share object with a presigned URL
To presign an object with a specified time-to-live, use the `presignTTL` metadata key on a `create` request.