NAME

Send-HPOVRequest

SYNOPSIS

Sends a request to the management appliance

SYNTAX

Send-HPOVRequest [-uri] <String> [[-method] <String>] [[-body] <Object>] [[-start] <Int32>] [[-count] <Int32>] [<CommonParameters>]

DESCRIPTION

Receives the request input, properly constructs and formats the request header and body and sends the request to the management appliance. This is the main cmdlet that interacts with the appliance.
The message body can contain valid JSON data, with the correct URI and accepted HTTP method accepted by the target resource manager. Please see the on-appliance Resource Model for more information (https://[appliance_IP]/help/cic/en/content/images/api/.)

PARAMETERS

-uri <String>
The uri that identifies the required resource on the appliance.
Required? true
Position? 1
Default value <none>
Accept pipeline input? false
Accept wildcard characters?    false         
-method <String>
Optional. The request HTTP Method.
    • "GET" (default) to get a resource from the appliance (read)
    • "POST" to create a new resource
    • "PUT" to modify a resource (write)
    • "DELETE" to delete a resource
Required? false
Position? 2
Default value GET
Accept pipeline input? false
Accept wildcard characters?    false         
-body <Object>
Optional. Body for the request. Required if the method is POST or PUT.
Required? false
Position? 3
Default value <none>
Accept pipeline input? false
Accept wildcard characters?    false         
-start <Int32>
Optional. For GETs on resource collections, this specifies the starting index in the collection.

If not specified, collection members starting from the beginning are returned.

Required? false
Position? 4
Default value 0
Accept pipeline input? false
Accept wildcard characters?    false         
-count <Int32>
Optional. For GETs on resource collections, this specifies the number of collection members to return.

If not specified, all members of the collection are returned from this function.

Required? false
Position? 5
Default value 0
Accept pipeline input? false
Accept wildcard characters?    false         

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

None.

OUTPUTS

Object returned from appliance

If Async task, a PSCustomObject is returned with the following contents:

   @{
	uri = TaskUri;
	category = "tasks";
	type = "TaskResourceV2";
	taskState = "New";
   }

RELATED LINKS

EXAMPLES

-------------------------- EXAMPLE 1 --------------------------

PS C:\> Send-HPOVRequest "/rest/enclosures"
Returns all the enclosure objects managed by the appliance.

-------------------------- EXAMPLE 2 --------------------------

PS C:\> $e = Send-HPOVRequest "/rest/enclosures/SGH2X6J1"
PS C:\> $e.name = "New Name"
PS C:\> Send-HPOVRequest $e.uri "PUT" $e
Updates the name of the enclosure object specified by the uri.

Last edited Feb 19, 2014 at 12:36 AM by ChrisLynchHP, version 6