Upravit

Sdílet prostřednictvím


New-AzContainerNicConfig

Creates a new container network interface configuration object.

Syntax

New-AzContainerNicConfig
   [-Name <String>]
   [-IpConfiguration <PSIPConfigurationProfile[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzContainerNicConfig cmdlet creates a new container network interface configuration object. This object determines the characteristics of container network interface created referencing the parent network profile.

Examples

Example 1

$containerNicConfig = New-AzContainerNicConfig -Name cnicConfig1

$networkProfile = New-AzNetworkProfile -Name np1 -ResourceGroupName rg1 -Location westus -ContainerNetworkInterfaceConfiguration $containerNicConfig

The first command creates an empty container network interface configuration. The second creates a new network profile, passing the previously created container network interface configuration as an argument to the New-NetworkProfile cmdlet.

Example 2

Creates a new container network interface configuration object. (autogenerated)

New-AzContainerNicConfig -IpConfiguration <PSIPConfigurationProfile[]> -Name cnic

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IpConfiguration

Collection of IP configuration profiles which determine what ip configurations are created when a container nic is instantiated from this container network interface configuration

Type:PSIPConfigurationProfile[]
Aliases:IpConfig
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Name

Name of the container network interface configuration.

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

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSIPConfigurationProfile[]

Outputs

PSContainerNetworkInterfaceConfiguration