Skip to content

Get SdnResource

Adam Rudell edited this page Oct 30, 2024 · 4 revisions

Get-SdnResource

SYNOPSIS

Invokes a web request to SDN API for the requested resource.

SYNTAX

InstanceID

Get-SdnResource -NcUri <Uri> -InstanceId <String> [-NcRestCredential <PSCredential>]
 [-NcRestCertificate <X509Certificate>] [<CommonParameters>]

Resource

Get-SdnResource -NcUri <Uri> -Resource <SdnApiResource> [-ResourceId <String>] [-ApiVersion <String>]
 [-NcRestCredential <PSCredential>] [-NcRestCertificate <X509Certificate>] [<CommonParameters>]

ResourceRef

Get-SdnResource -NcUri <Uri> [-ResourceRef <String>] [-ApiVersion <String>] [-NcRestCredential <PSCredential>]
 [-NcRestCertificate <X509Certificate>] [<CommonParameters>]

DESCRIPTION

{{ Fill in the Description }}

EXAMPLES

EXAMPLE 1

Get-SdnResource -NcUri "https://nc.$env:USERDNSDOMAIN" -Resource PublicIPAddresses

EXAMPLE 2

Get-SdnResource -NcUri "https://nc.$env:USERDNSDOMAIN" -Resource PublicIPAddresses -ResourceId "d9266251-a3ba-4ac5-859e-2c3a7c70352a"

EXAMPLE 3

Get-SdnResource -NcUri "https://nc.$env:USERDNSDOMAIN" -ResourceRef "/publicIPAddresses/d9266251-a3ba-4ac5-859e-2c3a7c70352a"

EXAMPLE 4

Get-SdnResource -NcUri "https://nc.$env:USERDNSDOMAIN" -ResourceRef "/publicIPAddresses/d9266251-a3ba-4ac5-859e-2c3a7c70352a" -NcRestCredential (Get-Credential)

PARAMETERS

-NcUri

Specifies the Uniform Resource Identifier (URI) of the network controller that all Representational State Transfer (REST) clients use to connect to that controller.

Type: Uri
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceRef

The resource ref of the object you want to perform the operation against.

Type: String
Parameter Sets: ResourceRef
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Resource

The resource type you want to perform the operation against.

Type: SdnApiResource
Parameter Sets: Resource
Aliases:
Accepted values: AccessControlLists, AuditingSettingsConfig, Credentials, Discovery, GatewayPools, Gateways, IDNSServerConfig, LearnedIPAddresses, LoadBalancerManagerConfig, LoadBalancerMuxes, LoadBalancers, LogicalNetworks, MacPools, NetworkControllerBackup, NetworkControllerRestore, NetworkControllerStatistics, NetworkInterfaces, Operations, OperationResults, PublicIPAddresses, SecurityTags, Servers, ServiceInsertions, RouteTables, VirtualGateways, VirtualNetworkManagerConfig, VirtualNetworks, VirtualServers, VirtualSwitchManagerConfig

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceId

Specify the unique ID of the resource.

Type: String
Parameter Sets: Resource
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstanceId

Specify the unique Instance ID of the resource.

Type: String
Parameter Sets: InstanceID
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApiVersion

The API version to use when invoking against the NC REST API endpoint.

Type: String
Parameter Sets: Resource, ResourceRef
Aliases:

Required: False
Position: Named
Default value: $Global:SdnDiagnostics.EnvironmentInfo.RestApiVersion
Accept pipeline input: False
Accept wildcard characters: False

-NcRestCredential

Specifies a user account that has permission to perform this action against the Network Controller REST API. The default is the current user.

Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: [System.Management.Automation.PSCredential]::Empty
Accept pipeline input: False
Accept wildcard characters: False

-NcRestCertificate

Specifies the client certificate that is used for a secure web request to Network Controller REST API. Enter a variable that contains a certificate or a command or expression that gets the certificate.

Type: X509Certificate
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

RELATED LINKS

Documentation

How To Guides:

Troubleshooting Guides

Learning

Functions

Clone this wiki locally