@@ -3471,6 +3471,89 @@ paths:
34713471 --description "A longer description \
34723472 of the image" \
34733473 --disk_id 123
3474+ /images/upload:
3475+ x-linode-cli-command: images
3476+ post:
3477+ servers:
3478+ - url: https://api.linode.com/v4beta
3479+ tags:
3480+ - Images
3481+ summary: Machine Image Upload
3482+ description: |
3483+ Initiates a Machine Image upload.
3484+
3485+ This endpoint creates a new private Image object and returns it, along
3486+ with the URL the image data should be uploaded to.
3487+
3488+ - Machine Images must be uploaded within 24 hours of creation or the upload will be cancelled.
3489+
3490+ - Machine Image uploads should be made as an HTTP PUT request to the returned URL, with a
3491+ `Content-type: application/octet-stream` header included in the request.
3492+
3493+ - Uploaded image data should be in gzip format. A maximum file size of
3494+ 5GB is supported for upload at this time.
3495+
3496+ This endpoint is currently in **alpha** and not publicly accessible. This notice will be updated when this endpoint placed in
3497+ beta.
3498+ x-linode-cli-action: upload
3499+ security:
3500+ - personalAccessToken: []
3501+ - oauth:
3502+ - images:read_write
3503+ requestBody:
3504+ description: The Machine Image details.
3505+ content:
3506+ application/json:
3507+ schema:
3508+ type: object
3509+ required:
3510+ - label
3511+ - region
3512+ properties:
3513+ region:
3514+ type: string
3515+ description: The region to upload to.
3516+ example: eu-central
3517+ label:
3518+ type: string
3519+ description: Label for the new Machine Image.
3520+ example: my-image-label
3521+ description:
3522+ type: string
3523+ description: Description for the Machine Image.
3524+ example: This is an example image in the docs.
3525+ responses:
3526+ '200':
3527+ description: The new Machine Image upload URL.
3528+ content:
3529+ application/json:
3530+ schema:
3531+ type: object
3532+ properties:
3533+ upload_url:
3534+ type: string
3535+ description: The URL to upload the Machine Image to.
3536+ image:
3537+ $ref: '#/components/schemas/ImagePrivate'
3538+ default:
3539+ $ref: '#/components/responses/ErrorResponse'
3540+ x-code-samples:
3541+ - lang: Shell
3542+ source: >
3543+ curl -H "Content-Type: application/json" \
3544+ -H "Authorization: Bearer $TOKEN" \
3545+ -X POST -d '{
3546+ "description": "This is an example Machine Image.",
3547+ "label": "example-machine-image-label",
3548+ "region": "us-east"
3549+ }' \
3550+ https://api.linode.com/v4/images
3551+ - lang: CLI
3552+ source: >
3553+ linode-cli images upload \
3554+ --label example-machine-image-label \
3555+ --description "This is an example Machine Image."
3556+ --region us-east
34743557 /images/{imageId}:
34753558 x-linode-cli-command: images
34763559 parameters:
@@ -17277,6 +17360,20 @@ components:
1727717360 x-linode-cli-color:
1727817361 None: black
1727917362 default_: white
17363+ status:
17364+ x-linode-cli-display: 7
17365+ type: string
17366+ enum:
17367+ - creating
17368+ - pending_upload
17369+ - available
17370+ description: |
17371+ The current status of this Image. Only images in an "available" status
17372+ can be deployed. Images in a "creating" status are being created from
17373+ a Linode Disk, and will become "available" shortly. Images in a
17374+ "pending_upload" status are waiting for data to be uploaded for the
17375+ image, and will become "available" after the upload is complete and
17376+ processing occurs.
1728017377 ImagePublic:
1728117378 type: object
1728217379 description: Public Image object
@@ -17380,6 +17477,16 @@ components:
1738017477 x-linode-cli-color:
1738117478 None: black
1738217479 default_: white
17480+ status:
17481+ x-linode-cli-display: 7
17482+ type: string
17483+ enum:
17484+ - creating
17485+ - pending_upload
17486+ - available
17487+ description: |
17488+ The current status of this Image. Only images in an "available" status
17489+ can be deployed.
1738317490 LinodeConfigInterface:
1738417491 type: object
1738517492 description: >
0 commit comments