Update Userdata Script
- Name
put
- Type
- /v1/userdata/:uuid
- Description
Send a
PUT
to update a userdata script.
Request
Required Attributes
- Name
name
- Type
- string
- Description
Userdate script new name the user wish to update the userdata script with.
- Name
public_key
- Type
- string
- Description
The entire public key.
Example
curl -X PUT "https://api.simplystack.com/v1/userdata/69604814-f02f-4978-8c90-4a0957889218"
-H "Content-Type: application/json"
-H "Authorization: Token d359ad9cc9422b5ff07aede0cd2707da4ff82be0"
-d '{"name": "deploy01", "userdata": "#!/bin/sh\necho "Hello World. The time is now $(date -R)!" | tee /root/output.txt"}"}'
Response
JSON object with a key named userdata
which is an array of the following attributes:
Attributes
- Name
uuid
- Type
- string
- Description
Userdata script unique identifier.
- Name
name
- Type
- string
- Description
Userdate script name given by the user at its creation.
- Name
userdata
- Type
- string
- Description
The
user data
is the script used by the user to configure the Stacklet on first boot, often acloud-config
file or Bash script. It must be plain text and may not exceed 64 kilobytes in size.
- Name
created_at
- Type
- string
- Description
The date and time in ISO 8601 formats of when the userdata script was created.
Example
json
{
"userdata": {
"uuid": "69604814-f02f-4978-8c90-4a0957889218",
"name": "script01",
"userdata": "#!/bin/sh\necho "Hello World. The time is now $(date -R)!" | tee /root/output.txt",
"created_at": "2021-02-01T12:14:47.134880Z"
}
}