|
| 1 | +--- |
| 2 | +title: gcp-cloud-storage |
| 3 | +--- |
| 4 | + |
| 5 | +| | | |
| 6 | +|---|:---:| |
| 7 | +|__Latest Version__| `v1.0.0` | |
| 8 | +|__Input Content Type__| Any | |
| 9 | + |
| 10 | +:::usage |
| 11 | +Sending data to GCP Cloud Storage incurs usage costs after exceeding the free |
| 12 | +tier. See [Golioth pricing](https://golioth.io/pricing) for more information. |
| 13 | +::: |
| 14 | + |
| 15 | +The `gcp-cloud-storage` destination sends data to a [Google Cloud Platform Cloud |
| 16 | +Storage](https://cloud.google.com/cloud-storage) bucket. |
| 17 | + |
| 18 | +### Parameters |
| 19 | + |
| 20 | +|Parameter|Type|Description|Required| |
| 21 | +|---|---|---|:---:| |
| 22 | +|`service_account`|`string`| The GCP Service Account key used for authentication. |✅| |
| 23 | +|`name`|`string`| The name of the GCP Cloud Storage bucket. |✅| |
| 24 | + |
| 25 | +### Example Secrets |
| 26 | + |
| 27 | +`GCP_SERVICE_ACCOUNT` |
| 28 | +``` |
| 29 | +{ |
| 30 | + "type": "service_account", |
| 31 | + "project_id": "my-gcp-project", |
| 32 | + "private_key_id": "87984ikjddkpda896fa8932jk2", |
| 33 | + "private_key": "-----BEGIN RSA PRIVATE KEY-----.....", |
| 34 | + "client_email": "test-account@my-gcp-project.iam.gserviceaccount.com", |
| 35 | + "client_id": "75091285748954182", |
| 36 | + "auth_uri": "https://accounts.google.com/o/oauth2/auth", |
| 37 | + "token_uri": "https://oauth2.googleapis.com/token", |
| 38 | + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", |
| 39 | + "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test-account%40my-gcp-projec.iam.gserviceaccount.com" |
| 40 | +} |
| 41 | +``` |
| 42 | + |
| 43 | +### Example Usage |
| 44 | + |
| 45 | +```yaml |
| 46 | + destination: |
| 47 | + type: gcp-cloud-storage |
| 48 | + version: v1 |
| 49 | + parameters: |
| 50 | + service_account: $GCP_SERVICE_ACCOUNT |
| 51 | + name: my-bucket |
| 52 | +``` |
| 53 | +
|
| 54 | +### Example Input |
| 55 | +
|
| 56 | +> Binary data displayed as hex encoded for documentation purposes only. |
| 57 | +
|
| 58 | +``` |
| 59 | +00000000: 5249 4646 ffff ffff 5741 5645 666d 7420 RIFF....WAVEfmt |
| 60 | +00000010: 1000 0000 0100 0100 c05d 0000 80bb 0000 .........]...... |
| 61 | +00000020: 0200 1000 6461 7461 ffff ffff eaff edff ....data........ |
| 62 | +00000030: f0ff f5ff f9ff feff 0100 0300 0800 0b00 ................ |
| 63 | +00000040: 0b00 0c00 0a00 0800 0500 0100 fbff f8ff ................ |
| 64 | +``` |
| 65 | +
|
| 66 | +### Example Output |
| 67 | +
|
| 68 | +Input data is uploaded to the Google Cloud Storage bucket as an |
| 69 | +[object](https://cloud.google.com/storage/docs/objects) with content unmodified. |
| 70 | +
|
| 71 | +> Binary data displayed as hex encoded for documentation purposes only. |
| 72 | +
|
| 73 | +``` |
| 74 | +00000000: 5249 4646 ffff ffff 5741 5645 666d 7420 RIFF....WAVEfmt |
| 75 | +00000010: 1000 0000 0100 0100 c05d 0000 80bb 0000 .........]...... |
| 76 | +00000020: 0200 1000 6461 7461 ffff ffff eaff edff ....data........ |
| 77 | +00000030: f0ff f5ff f9ff feff 0100 0300 0800 0b00 ................ |
| 78 | +00000040: 0b00 0c00 0a00 0800 0500 0100 fbff f8ff ................ |
| 79 | +``` |
| 80 | +
|
| 81 | +Objects are created with name matching the event ID in a directory with |
| 82 | +name matching the device ID. An example directory structure is shown below. |
| 83 | +
|
| 84 | +``` |
| 85 | +/ |
| 86 | +├─ 664b9e889a9590ccfcf822b3/ |
| 87 | +│ ├─ 28ebd981-80ae-467f-b700-ba00e7c1e3ee |
| 88 | +│ ├─ e47e5b46-d4e3-4bf1-a413-9fc71ec9f6b0 |
| 89 | +│ ├─ ... |
| 90 | +├─ 66632a45658c93af0895a70e/ |
| 91 | +├─ .../ |
| 92 | +``` |
0 commit comments