Skip to content

Commit

Permalink
add storageClass example for s3 metadata (#4308)
Browse files Browse the repository at this point in the history
* add storageClass example to docs

Signed-off-by: Cassandra Coyle <[email protected]>

* add field to table

Signed-off-by: Cassandra Coyle <[email protected]>

* update data indentation for example curl

Signed-off-by: Cassandra Coyle <[email protected]>

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

Co-authored-by: Mark Fussell <[email protected]>
Signed-off-by: Cassie Coyle <[email protected]>

* tweaks

Signed-off-by: Cassandra Coyle <[email protected]>

* add to template example

Signed-off-by: Cassandra Coyle <[email protected]>

* add doc link for storage class

Signed-off-by: Cassandra Coyle <[email protected]>

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

Signed-off-by: Mark Fussell <[email protected]>

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

Signed-off-by: Mark Fussell <[email protected]>

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

Signed-off-by: Mark Fussell <[email protected]>

---------

Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Cassie Coyle <[email protected]>
Signed-off-by: Mark Fussell <[email protected]>
Co-authored-by: Mark Fussell <[email protected]>
  • Loading branch information
cicoyle and msfussell authored Aug 16, 2024
1 parent ecf9637 commit 3b38ae3
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ spec:
value: "<bool>"
- name: insecureSSL
value: "<bool>"
- name: storageClass
value: "<string>"
```
{{% alert title="Warning" color="warning" %}}
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 3b38ae3

Please sign in to comment.