POST/cloud-init-scripts

Create a cloud-init script

Creates a cloud-init script for the authenticated team. Provide name and script; script accepts a Bash script with a shebang or cloud-config YAML. A 201 response confirms that the script was created.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 body fields

Cloud-init script details.

namestringrequired
The name to assign to the cloud-init script.
scriptstringrequired
Bash script (#!) or cloud-config YAML.

4 status codes
201Returns confirmation that the cloud-init script was created.
401Returned when the request is unauthenticated.
messagestringoptional
403Returned when the authenticated user is forbidden from creating the script.
422Returned when the request fails validation.
errorsobjectoptional
messagestringoptional

Error handling

A 401 is returned when the request is unauthenticated; a 403 is returned when the authenticated user is forbidden from creating the script; a 422 is returned when the request fails validation. The request must include name and script.