Skip to content

Commit def980c

Browse files
authored
Merge pull request #542 from bbiggerr/image-upload-cli-4-106-1
Update Image Upload CLI settings
2 parents 1c42fb9 + d75cc4c commit def980c

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

openapi.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3858,14 +3858,16 @@ paths:
38583858
- Uploaded image data should be compressed in gzip (`.gz`) format. The uncompressed disk should be in raw
38593859
disk image (`.img`) format. A maximum compressed file size of 5GB is supported for upload at this time.
38603860

3861-
- To initiate and complete and upload in a single step, see our guide on how to [Upload an Image](/docs/products/tools/images/guides/upload-an-image/) using Cloud Manager or the Linode CLI.
3861+
**Note:** To initiate and complete an Image upload in a single step, see our guide on how to [Upload an Image](/docs/products/tools/images/guides/upload-an-image/) using Cloud Manager or the Linode CLI `image-upload` plugin.
38623862
x-linode-cli-action: upload
38633863
security:
38643864
- personalAccessToken: []
38653865
- oauth:
38663866
- images:read_write
38673867
requestBody:
38683868
description: The uploaded Image details.
3869+
x-linode-cli-allowed-defaults:
3870+
- region
38693871
content:
38703872
application/json:
38713873
schema:
@@ -3889,7 +3891,7 @@ paths:
38893891
example: This is an example image in the docs.
38903892
responses:
38913893
'200':
3892-
description: The new Image upload URL.
3894+
description: Image Upload object including the upload URL and Image object.
38933895
content:
38943896
application/json:
38953897
schema:
@@ -3898,6 +3900,7 @@ paths:
38983900
upload_to:
38993901
type: string
39003902
description: The URL to upload the Image to.
3903+
x-linode-cli-display: 1
39013904
image:
39023905
$ref: '#/components/schemas/Image'
39033906
default:
@@ -3908,18 +3911,25 @@ paths:
39083911
curl -H "Content-Type: application/json" \
39093912
-H "Authorization: Bearer $TOKEN" \
39103913
-X POST -d '{
3911-
"description": "This is an example Machine Image.",
3912-
"label": "example-machine-image-label",
3914+
"description": "Optional details about the Image",
3915+
"label": "Example Image",
39133916
"region": "us-east"
39143917
}' \
39153918
https://api.linode.com/v4/images/upload
39163919
- lang: CLI
3917-
source: >
3920+
source: |
3921+
# Upload the Image file in a single step
39183922
linode-cli image-upload \
3923+
--description "Optional details about the Image" \
39193924
--label "Example Image" \
3920-
--description "Some details about the image" \
39213925
--region us-east \
3922-
~/Downloads/image-file.img.gz
3926+
/path/to/image-file.img.gz
3927+
3928+
# Returns the upload_to URL
3929+
linode-cli images upload \
3930+
--description "Optional details about the Image" \
3931+
--label "Example Image" \
3932+
--region us-east
39233933
/images/{imageId}:
39243934
x-linode-cli-command: images
39253935
parameters:

0 commit comments

Comments
 (0)