[{"label":"Latest (1.0)","version":"latest"}]
srs-for-vsphere

Create Argument Scripts Script

Description

Replaces the placeholders in a given argument transformation script template with given values on the placeholder_value_list field The resulting script can be provided to a script execution parameter that expects a specific script runtime type

Example

If the template argument transformation script is

Get-VM -Id -Server

The result of this operation with given Id ‘vm-1’ and Server ‘server-1’ is

Get-VM -Id ‘vm-1’ -Server ‘server-1’

Request

Request

URL

URL


post
https://{api_host}/api/argument-scripts/script
Copy

Request Body

Request Body

ArgumentScript of mimetype application/json Optional

The argument script create request

{
	"template_id": "string",
	"template_placeholder_value_list": [
		{
			"values": [
				{
					"placeholder_name": "string",
					"value": [
						"string"
					]
				}
			]
		}
	]
}
string
template_id Required

Unique identifier for the argument template script.


template_placeholder_value_list Required

Placeholder value list which are used to create script from script template.

Single template_placeholder_value_list produces script by the given template replacing placeholder with the given values. Multiple items for template_placeholder_value_list produce a script of scripts which can produce an array of objects. Each template_placeholder_value_list item is used to produce script from template. Scripts are then combined in a multi-line script where each line produces result object.


string
script Optional

Script result produced by the service based on given template_id and template_placeholder_parameters

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

200 OK

Returns ArgumentScript of type application/json
{
	"script": "string",
	"template_id": "string",
	"template_placeholder_value_list": [
		{
			"values": [
				{
					"placeholder_name": "string",
					"value": [
						"string"
					]
				}
			]
		}
	]
}
string
template_id Required

Unique identifier for the argument template script.


template_placeholder_value_list Required

Placeholder value list which are used to create script from script template.

Single template_placeholder_value_list produces script by the given template replacing placeholder with the given values. Multiple items for template_placeholder_value_list produce a script of scripts which can produce an array of objects. Each template_placeholder_value_list item is used to produce script from template. Scripts are then combined in a multi-line script where each line produces result object.


string
script Optional

Script result produced by the service based on given template_id and template_placeholder_parameters

Errors

Errors

ErrorDetails
404

Not Found

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"script":"string","template_id":"string","template_placeholder_value_list":[{"values":[{"placeholder_name":"string","value":["string"]}]}]}' https://{api_host}/api/argument-scripts/script


[{"label":"Latest (1.0)","version":"latest"}]
srs-for-vsphere
Feedback

Was this page helpful?