Stackscripts

This section details Stackscript-related Linode CLI commands.

list

Aliases: ls

If the request is not authenticated, only public StackScripts are returned.

Usage

The format accepted by this command.

linode-cli stackscripts list [-h] [--label label]
    [--description description]
    [--deployments_total deployments_total] [--rev_note rev_note]
    [--is_public is_public] [--mine mine]
    [--order-by {label,description,deployments_total,rev_note,is_public,mine}]
    [--order {asc,desc}]

Sample

Examples of how this command might be used.

linode-cli stackscripts list

Filterable Attributes

Arguments used to define a filter for response entries.

Name

Type

Description

--deployments_total

int

The total number of times this StackScript has been deployed.

--description

str

A description for the StackScript.

--is_public

bool

This determines whether other users can use your StackScript.

--label

str

The StackScript’s label is for display purposes only.

--mine

bool

Returns true if this StackScript is owned by the account of the user making the request, and the user making the request is unrestricted or has access to this StackScript.

--rev_note

str

This field allows you to add notes for the set of revisions made to this StackScript.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

The date this StackScript was created.

deployments_active

int

1

Count of currently active, deployed Linodes created from this StackScript.

deployments_total

int

12

The total number of times this StackScript has been deployed.

description

str

This StackSc…igures MySQL

A description for the StackScript.

id

int

10079

The unique ID of this StackScript.

images

[]str

[“linode/deb…de/debian8”]

An array of Image IDs.

is_public

bool

true

This determines whether other users can use your StackScript.

label

str

a-stackscript

The StackScript’s label is for display purposes only.

mine

bool

true

Returns true if this StackScript is owned by the account of the user making the request, and the user making the request is unrestricted or has access to this StackScript.

rev_note

str

Set up MySQL

This field allows you to add notes for the set of revisions made to this StackScript.

script

str

"#!/bin/bash"

The script to execute when provisioning a new Linode with this StackScript.

updated

str

2018-01-01T00:01:01

The date this StackScript was last updated.

user_gravatar_id

str

a445b305abda…bc7fda037c37

The Gravatar ID for the User who created the StackScript.

username

str

myuser

The User who created the StackScript.

user_defined_fields

Name

Type

Example

Description

user_defined_fields.default

str

N/A

The default value.

user_defined_fields.example

str

hunter2

An example value for the field.

user_defined_fields.label

str

Enter the password

A human-readable label for the field that will serve as the input prompt for entering the value during deployment.

user_defined_fields.manyOf

str

avalue,anoth…e,thirdvalue

A list of acceptable values for the field in any quantity, combination or order.

user_defined_fields.name

str

DB_PASSWORD

The name of the field.

user_defined_fields.oneOf

str

avalue,anoth…e,thirdvalue

A list of acceptable single values for the field.


view

Returns all of the information about a specified StackScript, including the contents of the script.

Usage

The format accepted by this command.

linode-cli stackscripts view [-h]
    [--deployments_total deployments_total] [--label label]
    [--description description] [--mine mine]
    [--is_public is_public] [--rev_note rev_note]
    [--order-by {deployments_total,label,description,mine,is_public,rev_note}]
    [--order {asc,desc}] stackscriptId

Sample

Examples of how this command might be used.

linode-cli stackscripts view 10079

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

stackscriptId

str

The ID of the StackScript to look up.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

The date this StackScript was created.

deployments_active

int

1

Count of currently active, deployed Linodes created from this StackScript.

deployments_total

int

12

The total number of times this StackScript has been deployed.

description

str

This StackSc…igures MySQL

A description for the StackScript.

id

int

10079

The unique ID of this StackScript.

images

[]str

[“linode/deb…de/debian8”]

An array of Image IDs.

is_public

bool

true

This determines whether other users can use your StackScript.

label

str

a-stackscript

The StackScript’s label is for display purposes only.

mine

bool

true

Returns true if this StackScript is owned by the account of the user making the request, and the user making the request is unrestricted or has access to this StackScript.

rev_note

str

Set up MySQL

This field allows you to add notes for the set of revisions made to this StackScript.

script

str

"#!/bin/bash"

The script to execute when provisioning a new Linode with this StackScript.

updated

str

2018-01-01T00:01:01

The date this StackScript was last updated.

user_gravatar_id

str

a445b305abda…bc7fda037c37

The Gravatar ID for the User who created the StackScript.

username

str

myuser

The User who created the StackScript.

user_defined_fields

Name

Type

Example

Description

user_defined_fields.default

str

N/A

The default value.

user_defined_fields.example

str

hunter2

An example value for the field.

user_defined_fields.label

str

Enter the password

A human-readable label for the field that will serve as the input prompt for entering the value during deployment.

user_defined_fields.manyOf

str

avalue,anoth…e,thirdvalue

A list of acceptable values for the field in any quantity, combination or order.

user_defined_fields.name

str

DB_PASSWORD

The name of the field.

user_defined_fields.oneOf

str

avalue,anoth…e,thirdvalue

A list of acceptable single values for the field.


create

Creates a StackScript in your Account.

Usage

The format accepted by this command.

linode-cli stackscripts create [-h] [--description description]
    [--label label] [--script script] [--images images]
    [--rev_note rev_note]
    [--user_defined_fields user_defined_fields]
    [--is_public is_public]

Sample

Examples of how this command might be used.

linode-cli stackscripts create \
    --label a-stackscript \
    --description "This StackScript install and configures MySQL" \
    --images "linode/debian9" \
    --images "linode/debian8" \
    --is_public true \
    --rev_note "Set up MySQL" \
    --script '#!/bin/bash'

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--images *

[]str

linode/debian9

An array of Image IDs.

--label *

str

a-stackscript

The StackScript’s label is for display purposes only.

--script *

str

"#!/bin/bash"

The script to execute when provisioning a new Linode with this StackScript.

--description

str

This StackSc…igures MySQL

A description for the StackScript.

--is_public

bool

true

This determines whether other users can use your StackScript.

--rev_note

str

Set up MySQL

This field allows you to add notes for the set of revisions made to this StackScript.

--user_defined_fields

json

N/A

A custom field defined by the User with a special syntax within a StackScript.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

The date this StackScript was created.

deployments_active

int

1

Count of currently active, deployed Linodes created from this StackScript.

deployments_total

int

12

The total number of times this StackScript has been deployed.

description

str

This StackSc…igures MySQL

A description for the StackScript.

id

int

10079

The unique ID of this StackScript.

images

[]str

[“linode/deb…de/debian8”]

An array of Image IDs.

is_public

bool

true

This determines whether other users can use your StackScript.

label

str

a-stackscript

The StackScript’s label is for display purposes only.

mine

bool

true

Returns true if this StackScript is owned by the account of the user making the request, and the user making the request is unrestricted or has access to this StackScript.

rev_note

str

Set up MySQL

This field allows you to add notes for the set of revisions made to this StackScript.

script

str

"#!/bin/bash"

The script to execute when provisioning a new Linode with this StackScript.

updated

str

2018-01-01T00:01:01

The date this StackScript was last updated.

user_gravatar_id

str

a445b305abda…bc7fda037c37

The Gravatar ID for the User who created the StackScript.

username

str

myuser

The User who created the StackScript.

user_defined_fields

Name

Type

Example

Description

user_defined_fields.default

str

N/A

The default value.

user_defined_fields.example

str

hunter2

An example value for the field.

user_defined_fields.label

str

Enter the password

A human-readable label for the field that will serve as the input prompt for entering the value during deployment.

user_defined_fields.manyOf

str

avalue,anoth…e,thirdvalue

A list of acceptable values for the field in any quantity, combination or order.

user_defined_fields.name

str

DB_PASSWORD

The name of the field.

user_defined_fields.oneOf

str

avalue,anoth…e,thirdvalue

A list of acceptable single values for the field.


update

Updates a StackScript.

Usage

The format accepted by this command.

linode-cli stackscripts update [-h] [--label label]
    [--description description] [--script script]
    [--images images] [--user_defined_fields user_defined_fields]
    [--rev_note rev_note] [--is_public is_public] stackscriptId

Sample

Examples of how this command might be used.

linode-cli stackscripts update 10079 \
    --label a-stackscript \
    --description "This StackScript installs \
        and configures MySQL" \
    --images "linode/debian9" \
    --images "linode/debian8" \
    --is_public true \
    --rev_note "Set up MySQL" \
    --script '#!/bin/bash'

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

stackscriptId

str

The ID of the StackScript to look up.

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--description

str

This StackSc…igures MySQL

A description for the StackScript.

--images

[]str

linode/debian9

An array of Image IDs.

--is_public

bool

true

This determines whether other users can use your StackScript.

--label

str

a-stackscript

The StackScript’s label is for display purposes only.

--rev_note

str

Set up MySQL

This field allows you to add notes for the set of revisions made to this StackScript.

--script

str

"#!/bin/bash"

The script to execute when provisioning a new Linode with this StackScript.

--user_defined_fields

json

N/A

A custom field defined by the User with a special syntax within a StackScript.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

The date this StackScript was created.

deployments_active

int

1

Count of currently active, deployed Linodes created from this StackScript.

deployments_total

int

12

The total number of times this StackScript has been deployed.

description

str

This StackSc…igures MySQL

A description for the StackScript.

id

int

10079

The unique ID of this StackScript.

images

[]str

[“linode/deb…de/debian8”]

An array of Image IDs.

is_public

bool

true

This determines whether other users can use your StackScript.

label

str

a-stackscript

The StackScript’s label is for display purposes only.

mine

bool

true

Returns true if this StackScript is owned by the account of the user making the request, and the user making the request is unrestricted or has access to this StackScript.

rev_note

str

Set up MySQL

This field allows you to add notes for the set of revisions made to this StackScript.

script

str

"#!/bin/bash"

The script to execute when provisioning a new Linode with this StackScript.

updated

str

2018-01-01T00:01:01

The date this StackScript was last updated.

user_gravatar_id

str

a445b305abda…bc7fda037c37

The Gravatar ID for the User who created the StackScript.

username

str

myuser

The User who created the StackScript.

user_defined_fields

Name

Type

Example

Description

user_defined_fields.default

str

N/A

The default value.

user_defined_fields.example

str

hunter2

An example value for the field.

user_defined_fields.label

str

Enter the password

A human-readable label for the field that will serve as the input prompt for entering the value during deployment.

user_defined_fields.manyOf

str

avalue,anoth…e,thirdvalue

A list of acceptable values for the field in any quantity, combination or order.

user_defined_fields.name

str

DB_PASSWORD

The name of the field.

user_defined_fields.oneOf

str

avalue,anoth…e,thirdvalue

A list of acceptable single values for the field.

delete

Aliases: rm

Deletes a private StackScript you have permission to read_write.

Usage

The format accepted by this command.

linode-cli stackscripts delete [-h] stackscriptId

Sample

Examples of how this command might be used.

linode-cli stackscripts delete 10079

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

stackscriptId

str

The ID of the StackScript to look up.