< Back

Request-vRAResourceAction

Sat Jan 18, 2020 10:05 pm

NAME Request-vRAResourceAction



SYNOPSIS

Request an available resourceAction for a catalog resource





SYNTAX

Request-vRAResourceAction -ActionId <String> -ResourceId <String> [-Wait] [-WhatIf] [-Confirm] [<CommonParameters>]



Request-vRAResourceAction -ActionId <String> -ResourceName <String> [-Wait] [-WhatIf] [-Confirm]

[<CommonParameters>]



Request-vRAResourceAction -JSON <String> [-Wait] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

A resourceAction is a specific type of ResourceOperation that is performed by submitting a request.

Unlike ResourceExtensions, resource actions can be invoked via the Service Catalog service and subject to

approvals.





PARAMETERS

-ActionId <String>

The Id for the resource action



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ResourceId <String>

The id of the resource that the resourceAction will execute against



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-ResourceName <String>

The name of the resource that the resourceAction will execute against



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-JSON <String>

A JSON payload for the request



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Wait [<SwitchParameter>]

Wait for the request to complete



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

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 (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String





OUTPUTS

System.Management.Automation.PSObject





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



PS C:\\>$ResourceActionId = (Get-vRAResource -Name vm01 | Get-vRAResourceAction | Where-Object {$_.Name -eq

"Reboot"}).id



Request-vRAResourceAction -Id $ResourceActionId -ResourceName vm01









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



PS C:\\>Request-vRAResourceAction -Id 6a301f8c-d868-4908-8348-80ad0eb35b00 -ResourceId

20402e93-fb1d-4bd9-8a51-b809fbb946fd













-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Request-vRAResourceAction -Id 6a301f8c-d868-4908-8348-80ad0eb35b00 -ResourceName vm01













-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Request-vRAResourceAction -Id 6a301f8c-d868-4908-8348-80ad0eb35b00 -ResourceName vm01 -Wait













-------------------------- EXAMPLE 5 --------------------------



PS C:\\>$JSON = @"



{

"type": "com.vmware.vcac.catalog.domain.request.CatalogResourceRequest",

"resourceId": "448fcd09-b8c0-482c-abbc-b3ab818c2e31",

"actionId": "fae08c75-3506-40f6-9c9b-35966fe9125c",

"description": null,

"data": {

"description": null,

"reasons": null

}

}

"@



$JSON | Request-vRAResourceAction











RELATED LINKS