Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Guides > RightScale API 1.5 > Examples > Inputs > List Inputs for Deployment

List Inputs for Deployment

List all inputs for a specified deployment.

icon_curl_v1.png    icon_powershell_v1.png

Table of Contents

Curl

Prerequisite:  Example assumes you have previously authenticated, and your valid session cookie is in 'mycookie'.

Example Call

#!/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

Sample Output

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>

 

PowerShell

Prerequisite:  Example assumes you have previously authenticated and your session cookie for subsequent requests is in 'cookieContainer'.

Example Call

#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

 

Sample Output

See http/curl output.

You must to post a comment.
Last modified
23:17, 16 May 2013

Tags

Classifications

This page has no classifications.

Announcements

None


© 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.