|
| 1 | +# Destinations Command-Line Interface Specification |
| 2 | + |
| 3 | +This document lays out the command-line interface to interact with the Planet |
| 4 | +[Destinations API](https://docs.planet.com/develop/apis/destinations/). |
| 5 | + |
| 6 | +## Overview |
| 7 | + |
| 8 | +The `planet destinations` command group allows you to list, create, update, archive, unarchive, and rename cloud storage destinations, including Amazon S3, S3-compatible, Google Cloud Storage, Azure Blob Storage, and Oracle Cloud Storage. |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## Global Options |
| 13 | + |
| 14 | +- `-u, --base-url TEXT` |
| 15 | + Assign custom base Destinations API URL. |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +## Commands |
| 20 | + |
| 21 | +### List Destinations |
| 22 | + |
| 23 | +```sh |
| 24 | +planet destinations list [OPTIONS] |
| 25 | +``` |
| 26 | + |
| 27 | +**Options:** |
| 28 | +- `--archived [true|false]` |
| 29 | + Include only archived destinations (`true`) or exclude them (`false`). |
| 30 | +- `--is-owner [true|false]` |
| 31 | + Include only destinations owned by the requesting user (`true`) or exclude them (`false`). |
| 32 | +- `--can-write [true|false]` |
| 33 | + Include only destinations the user can modify (`true`) or exclude them (`false`). |
| 34 | + |
| 35 | +**Example:** |
| 36 | +```sh |
| 37 | +planet destinations list --archived false --is-owner true --can-write true |
| 38 | +``` |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +### Get Destination |
| 43 | + |
| 44 | +```sh |
| 45 | +planet destinations get DESTINATION_ID [OPTIONS] |
| 46 | +``` |
| 47 | + |
| 48 | +Retrieve detailed information about a specific destination. |
| 49 | + |
| 50 | +**Example:** |
| 51 | +```sh |
| 52 | +planet destinations get my-destination-id |
| 53 | +``` |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +### Create Destinations |
| 58 | + |
| 59 | +#### Amazon S3 |
| 60 | + |
| 61 | +```sh |
| 62 | +planet destinations create s3 --bucket BUCKET --region REGION --access-key-id KEY --secret-access-key SECRET [--explicit-sse] [--name NAME] |
| 63 | +``` |
| 64 | + |
| 65 | +**Options:** |
| 66 | +- `--bucket` (required): S3 bucket name. |
| 67 | +- `--region` (required): AWS region. |
| 68 | +- `--access-key-id` (required): AWS access key ID. |
| 69 | +- `--secret-access-key` (required): AWS secret access key. |
| 70 | +- `--explicit-sse`: Explicitly set headers for server-side encryption (SSE). |
| 71 | +- `--name`: Optional name for the destination. |
| 72 | + |
| 73 | +#### S3-Compatible |
| 74 | + |
| 75 | +```sh |
| 76 | +planet destinations create s3-compatible --bucket BUCKET --endpoint ENDPOINT --region REGION --access-key-id KEY --secret-access-key SECRET [--use-path-style] [--name NAME] |
| 77 | +``` |
| 78 | + |
| 79 | +**Options:** |
| 80 | +- `--bucket` (required): Bucket name. |
| 81 | +- `--endpoint` (required): Endpoint URL. |
| 82 | +- `--region` (required): Region. |
| 83 | +- `--access-key-id` (required): Access key ID. |
| 84 | +- `--secret-access-key` (required): Secret access key. |
| 85 | +- `--use-path-style`: Use path-style addressing. |
| 86 | +- `--name`: Optional name for the destination. |
| 87 | + |
| 88 | +#### Google Cloud Storage (GCS) |
| 89 | + |
| 90 | +```sh |
| 91 | +planet destinations create gcs --bucket BUCKET --credentials BASE64_JSON [--name NAME] |
| 92 | +``` |
| 93 | + |
| 94 | +**Options:** |
| 95 | +- `--bucket` (required): GCS bucket name. |
| 96 | +- `--credentials` (required): Base64-encoded service account credentials (JSON). |
| 97 | +- `--name`: Optional name for the destination. |
| 98 | + |
| 99 | +#### Azure Blob Storage |
| 100 | + |
| 101 | +```sh |
| 102 | +planet destinations create azure --container CONTAINER --account ACCOUNT --sas-token SAS_TOKEN [--storage-endpoint-suffix SUFFIX] [--name NAME] |
| 103 | +``` |
| 104 | + |
| 105 | +**Options:** |
| 106 | +- `--container` (required): Blob storage container name. |
| 107 | +- `--account` (required): Azure account. |
| 108 | +- `--sas-token` (required): Shared-Access Signature token. |
| 109 | +- `--storage-endpoint-suffix`: Custom Azure Storage endpoint suffix. |
| 110 | +- `--name`: Optional name for the destination. |
| 111 | + |
| 112 | +#### Oracle Cloud Storage (OCS) |
| 113 | + |
| 114 | +```sh |
| 115 | +planet destinations create ocs --bucket BUCKET --access-key-id KEY --secret-access-key SECRET --namespace NAMESPACE --region REGION [--name NAME] |
| 116 | +``` |
| 117 | + |
| 118 | +**Options:** |
| 119 | +- `--bucket` (required): Oracle bucket name. |
| 120 | +- `--access-key-id` (required): Oracle account access key. |
| 121 | +- `--secret-access-key` (required): Oracle account secret key. |
| 122 | +- `--namespace` (required): Oracle Object Storage namespace. |
| 123 | +- `--region` (required): Oracle region. |
| 124 | +- `--name`: Optional name for the destination. |
| 125 | + |
| 126 | +--- |
| 127 | + |
| 128 | +### Update Destinations |
| 129 | + |
| 130 | +#### Amazon S3 |
| 131 | + |
| 132 | +```sh |
| 133 | +planet destinations update s3 DESTINATION_ID --access-key-id KEY --secret-access-key SECRET [--explicit-sse] |
| 134 | +``` |
| 135 | + |
| 136 | +#### S3-Compatible |
| 137 | + |
| 138 | +```sh |
| 139 | +planet destinations update s3-compatible DESTINATION_ID --access-key-id KEY --secret-access-key SECRET [--use-path-style] |
| 140 | +``` |
| 141 | + |
| 142 | +#### Google Cloud Storage (GCS) |
| 143 | + |
| 144 | +```sh |
| 145 | +planet destinations update gcs DESTINATION_ID --credentials BASE64_JSON |
| 146 | +``` |
| 147 | + |
| 148 | +#### Azure Blob Storage |
| 149 | + |
| 150 | +```sh |
| 151 | +planet destinations update azure DESTINATION_ID --sas-token SAS_TOKEN |
| 152 | +``` |
| 153 | + |
| 154 | +#### Oracle Cloud Storage (OCS) |
| 155 | + |
| 156 | +```sh |
| 157 | +planet destinations update ocs DESTINATION_ID --access-key-id KEY --secret-access-key SECRET |
| 158 | +``` |
| 159 | + |
| 160 | +--- |
| 161 | + |
| 162 | +### Archive/Unarchive Destinations |
| 163 | + |
| 164 | +#### Archive |
| 165 | + |
| 166 | +```sh |
| 167 | +planet destinations archive DESTINATION_ID |
| 168 | +``` |
| 169 | + |
| 170 | +#### Unarchive |
| 171 | + |
| 172 | +```sh |
| 173 | +planet destinations unarchive DESTINATION_ID |
| 174 | +``` |
| 175 | + |
| 176 | +--- |
| 177 | + |
| 178 | +### Rename Destination |
| 179 | + |
| 180 | +```sh |
| 181 | +planet destinations rename DESTINATION_ID NEW_NAME |
| 182 | +``` |
| 183 | + |
| 184 | +--- |
| 185 | + |
| 186 | +## Notes |
| 187 | + |
| 188 | +- For GCS, the `--credentials` argument must be the base64-encoded JSON of your Google Cloud service account key. |
| 189 | + To encode a JSON file to base64: |
| 190 | + ```sh |
| 191 | + cat my_creds.json | base64 | tr -d '\n' |
| 192 | + ``` |
| 193 | + |
| 194 | +- All commands support the `--base-url` option for custom API endpoints. |
| 195 | + |
| 196 | +--- |
0 commit comments