Skip to content

Instantly share code, notes, and snippets.

View trisharia's full-sized avatar

Trisha Navarro trisharia

View GitHub Profile
@trisharia
trisharia / postVraCatalogItemRequest.ps1
Created August 26, 2017 01:57
Submit a catalog item request via vRA API in PowerShell
# VMware vRealize Automation API sample in PowerSHell
#
# Submits a catalog item request via the vRA API
#
# For vRO 7.0+
#set global variables
$baseUrl = 'https://vra01a.corp.local'
$vrauser = 'myuser'
@trisharia
trisharia / postVraResourceActionRequest.ps1
Created August 26, 2017 01:58
Submit a day-2 or resource action request via vRA API in PowerShell
# VMware vRealize Automation API sample in PowerSHell
#
# Submits a catalog item request via the vRA API
#
# For vRO 7.0+
#set global variables
$baseUrl = 'https://vra01a.corp.local'
$catalogItemName = 'HVD 7'
@trisharia
trisharia / getConfigurationAttributeValue.js
Last active September 22, 2017 16:12
Get a configuration element's attribute value
// VMware vRealize Orchestrator action sample
//
// This sample retrieves the value of an attribute defined in a configuration element
// Note: This calls another action defined in getConfigurationElement.js
//
// For vRO 6.0+
//
// Action Inputs:
// configurationCategoryPath - string - Path of the configuration element; e.g., PSO/VAPI/
// configurationName - string - name of the configuration element
@trisharia
trisharia / getTagCategoryIdByName.js
Last active September 22, 2017 16:04
Get the names of all vCenter Tags of a Category given a Category name
// VMware vRealize Orchestrator action sample
//
// This sample returns the ID of a vCenter Tag Category given its name
//
// For vRO/VAPI 7.0+
//
// Action Inputs:
// endpoint - VAPIEndpoint - VAPI Endpoint
// categoryName - string - Name of the vCenter Tag Category
//
@trisharia
trisharia / getVraManagedVms.js
Last active May 12, 2018 00:48
Get all the managed VMs in a vRA IaaS instance
// VMware vRealize Orchestrator action sample
//
// Get all the managed VMs in a vRA IaaS instance
//
// For vRO/VRA 7.0+
//
// Action Inputs:
// host - vCAC:VCACHost - vRA IaaS Host
//
// Return type: Array/vCAC:VirtualMachine - all managed VMs in a vRA instance
@trisharia
trisharia / getComputeResourceNames.js
Last active May 12, 2018 00:59
Get the names of all the compute resources of a vRA IaaS instance with optional filters
// VMware vRealize Orchestrator action sample
//
// Get the names of all the compute resources of a vRA IaaS instance with optional filters
//
// For vRO/VRA 7.0+
//
// Action Inputs:
// host - vCAC:VCACHost - vRA IaaS Host
// isAgentAlive - boolean - Set to true to only return compute resources for which the agent status is OK
// hasFabricGroups - boolean - Set to true to only return compute resources with 1 or more fabric groups linked
@trisharia
trisharia / getReservationNamesOfComputeResource.js
Created May 12, 2018 00:46
Get the names of all the reservations of a compute resource in a vRA IaaS instance
// VMware vRealize Orchestrator action sample
//
// Get the names of all the reservations of a compute resource in a vRA IaaS instance
//
// For vRO/VRA 7.0+
//
// Action Inputs:
// host - vCAC:VCACHost - vRA IaaS Host
// computeResourceName - string - Compute resource name
// onlyEnabledReservations - boolean - Set to true to only return the names of enabled reservations
@trisharia
trisharia / getReservationPolicyIdsOfComputeResource.js
Created May 12, 2018 00:47
Get the reservation policy IDs of all the reservations of a compute resource in a vRA IaaS instance
// VMware vRealize Orchestrator action sample
//
// Get the reservation policy IDs of all the reservations of a compute resource in a vRA IaaS instance
//
// For vRO/VRA 7.0+
//
// Action Inputs:
// host - vCAC:VCACHost - vRA IaaS Host
// computeResourceName - string - Compute resource name
// onlyEnabledReservations - boolean - Set to true to only return the reservation policies of enabled reservations
@trisharia
trisharia / getNetworkNamesOfReservation.js
Last active May 12, 2018 00:57
Get the network names of a vRA reservation
// VMware vRealize Orchestrator action sample
//
// Get the network names of a vRA reservation
//
// For vRO/VRA 7.0+
//
// Action Inputs:
// reservation - vCACCAFE:Reservation - vRA Reservation
//
// Return type: Array/strings - Network names
@trisharia
trisharia / getReservationById.js
Created May 12, 2018 00:50
Get a vRA reservation object given its ID
// VMware vRealize Orchestrator action sample
//
// Get a vRA reservation object given its ID
//
// For vRO/VRA 7.0+
//
// Action Inputs:
// cafeHost - vCACCAFE:VCACHost - vRA host
// reservationId - string - ID of a Reservation
//