List all inputs for a specified deployment.
Table of Contents
Prerequisite: Example assumes you have previously authenticated, and your valid session cookie is in 'mycookie'.
#!/bin/sh -e DEPLOYMENT="306795001" # Set the Deployment you want to see inputs for curl -i -H X-API-Version:1.5 -b mycookie \ -X GET https://my.rightscale.com/api/deployments/$DEPLOYMENT/inputs.xml
Note: HTTP headers not shown. Response output is truncated.
<?xml version="1.0" encoding="UTF-8"?> <inputs> <input> <value>text:</value> <name>repo/default/storage_account_provider</name> </input> <input> <value>text:</value> <name>db/dns/slave/id</name> </input> . . . <input> <value>cred:GD_SVN_USERNAME</value> <name>repo/default/svn_username</name> </input> <input> <value>text:</value> <name>db/dns/master/id</name> </input> <input> <value>text:</value> <name>sys_dns/password</name> </input> <input> <value>text:</value> <name>db_mysql/version</name> </input> </inputs>
Prerequisite: Example assumes you have previously authenticated and your session cookie for subsequent requests is in 'cookieContainer'.
#get cookie container from authentication $cookieContainer $deploymentID = "306795001" # Set deployment ID to list Inputs for $listInputsRequest = [System.Net.WebRequest]::Create("https://my.rightscale.com/api/deployments/$deploymentID/inputs.xml") $listInputsRequest.Method = "GET" $listInputsRequest.CookieContainer = $cookieContainer $listInputsRequest.Headers.Add("X-API-Version", "1.5"); [System.Net.WebResponse] $listInputsResponse = $listInputsRequest.GetResponse() $listInputsResponseStream = $listInputsResponse.GetResponseStream() $listInputsResponseStreamReader = New-Object System.IO.StreamReader -argumentList $listInputsResponseStream [string]$listInputsResponseString = $listInputsResponseStreamReader.ReadToEnd() write-host $listInputsResponseString
See http/curl output.
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.