次の方法で共有


AddIpamSubnet method of the MSFT_IPAM_Subnet class

Adds a subnet to IPAM.

Syntax

uint32 AddIpamSubnet(
  [in]  string           Name,
  [in]  string           NetworkId,
  [in]  uint16           NetworkType,
  [in]  string           AddressSpace,
  [in]  string           Owner,
  [in]  string           Description,
  [in]  uint16           VlanId[],
  [in]  string           CustomConfiguration,
  [in]  string           VmmLogicalNetwork,
  [in]  string           NetworkSite,
  [in]  uint32           VirtualSubnetId,
  [out] MSFT_IPAM_Subnet output
);

Parameters

Name [in]

The user specified name of the subnet.

NetworkId [in]

The network ID of the subnet.

Note

The NetworkID property uses the format: NetworkId / Prefix Length.

NetworkType [in]

Indicates whether the IP address is a virtual address.

The possible values are:

1

NonVirtualized

2

Provider

4

Customer

AddressSpace [in]

The address space of the subnet.

Owner [in]

The owner of the subnet.

Description [in]

The Description property provides a textual description of the object.

VlanId [in]

An array that contains the IDs of VLANs that contain the subnet.

CustomConfiguration [in]

A set of custom metadata associated with the subnet address. This is specified as a semi-colon separated name=value pairs.

Note

This property is formatted with semi-colon separated name=value pairs.

VmmLogicalNetwork [in]

The name of an abstraction of a physical network that describes a particular function in an environment. A logical network can contain multiple network sites.

NetworkSite [in]

The name of a network site in the physical network.

VirtualSubnetId [in]

The virtual subnet ID to use for network virtualization.

output [out]

When this method returns, this parameter contains the new subnet object.

Return value

Returns 0 on success, otherwise returns a WMI error code.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2012 R2
Namespace
Root\Microsoft\IPAM
MOF
IPAMServerPSProvider.mof
DLL
IPAMServerPSProvider.dll

See also

MSFT_IPAM_Subnet