Skip to content

Set SdnResource

Adam Rudell edited this page Oct 30, 2024 · 1 revision

Set-SdnResource

SYNOPSIS

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

SYNTAX

Resource

Set-SdnResource -NcUri <Uri> -Resource <SdnApiResource> -ResourceId <String> -Object <Object>
 [-ApiVersion <String>] [-NcRestCredential <PSCredential>] [-NcRestCertificate <X509Certificate>] [-WhatIf]
 [-Confirm] [<CommonParameters>]

ResourceRef

Set-SdnResource -NcUri <Uri> -ResourceRef <String> -Object <Object> [-ApiVersion <String>]
 [-NcRestCredential <PSCredential>] [-NcRestCertificate <X509Certificate>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

{{ Fill in the Description }}

EXAMPLES

EXAMPLE 1

Set-SdnResource -NcUri "https://nc.$env:USERDNSDOMAIN" -ResourceRef "/networkInterfaces/contoso-nic1" -Object $object

EXAMPLE 2

Set-SdnResource -NcUri "https://nc.$env:USERDNSDOMAIN" -Resource "networkInterfaces" -ResourceId "contoso-nic1" -Object $object

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: True
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: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Object

{{ Fill Object Description }}

Type: Object
Parameter Sets: (All)
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: (All)
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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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