GlobalLB::VirtualServerV2::get_ltm_virtual_server

Introduced : BIG-IP_v11.1.0
Gets the ltm virtual server associated with the global server.

Prototype

String [] get_ltm_virtual_server(
    in GlobalLB__VirtualServerID [] virtual_servers
);

Parameters

Parameter Type Description
virtual_servers VirtualServerID [] Set of virtual servers to modify.

Return Type

Type Description
String [] Description of each specified virtual server.

Exceptions

Exception Description
Common::AccessDenied Raised if the client credentials are not valid.
Common::InvalidArgument Raised if one of the arguments is invalid.
Common::OperationFailed Raised if an operation error occurs.

See Also

#Add SnapIn for iControl
Add-PSSnapIn iControlSnapIn

#Declare variables
$BIGIP = "serverUrl"
$User = "username"
$Pass = "password"

#Initialize iControl
Initialize-F5.iControl -HostName $BIGIP -Username $User -Password $Pass
$ic = Get-F5.iControl

#Get list of all GTM Virtual Servers
$GTMlist = $ic.GlobalLBVirtualServerV2.get_list()

#Loop through virtual servers
foreach ($server in $GTMlist)
{
    #Get the associated LTM virtual server
    $LTMVirtualServer = $ic.GlobalLBVirtualServerV2.get_ltm_virtual_server($server)
    #Output to screen
    write-host $LTMVirtualServer
}

The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.