Templates

1. List Templates

Retrieves a list of CoreStack templates for a given tenant. List includes both Marketplace templates & My templates. Template list can be filtered using Scope and Category. ID in the output is referred as Template ID

Syntax
(.venv)$ corestack templates-list

Parameters

Attributes Description
scope Optional. Template Scope can be Global or Tenant
category Optional. Template Category to be filtered
limit Optional. Limits the number of templates that can be retrieved
page_number Optional. Page number of the templates list to be retrieved

Sample Output

2. View Template

Retrieves a CoreStack template by its ID. Template ID can be fetched from the output of templates-list command. Name, Description, Template content, Engine Type (Heat, Mistral, ARM etc.,), Created By, Updated By etc., will be available as output

Syntax
(.venv)$ corestack template-show <template_id>

Parameters

Attributes Description
template_id Required. ID of the CoreStack Template to be retrieved

Sample Output

3. Execute Template

Executes a template by its ID with the inputs (Request Body). Request body is expected to vary for each template and the same can be identified using template content retrieved as part of template-show command

Syntax
(.venv)$ corestack template-execute <template_id> <body>

Parameters

Attributes Description
template_id Required. ID of the CoreStack Template to be executed
body Required. JSON content with the needed inputs to execute the template
Example:
{
“service_accounts”: [{
“id”: “59a508cf07e31206a6a3282b”,
“region”: “useast1”
}],
“args”: {
“to_email”: “arun.p@cloudenablers.com”,
“Bill_Scheduled_bucket_name”: “satyabilling”,
“Billing_filename”: “awsbillingcsv”
}
}

Sample Output