匯出 (0) 列印
全部展開
EN
本內容沒有您的語言版本,但有英文版本。

Add-AzureEndpoint

Updated: October 4, 2013

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Add-AzureEndpoint

Adds a new endpoint to a Windows Azure virtual machine.

 

Parameter Set: NoLB
Add-AzureEndpoint [-Name] <String> [-Protocol] <String> [-LocalPort] <Int32> -VM <IPersistentVM> [-ACL <NetworkAclObject> ] [-DirectServerReturn <Boolean> ] [-PublicPort <Int32> ] [ <CommonParameters>]

Parameter Set: LBCustomProbe
Add-AzureEndpoint [-Name] <String> [-Protocol] <String> [-LocalPort] <Int32> -LBSetName <String> -ProbePort <Int32> -ProbeProtocol <String> -VM <IPersistentVM> [-ACL <NetworkAclObject> ] [-DirectServerReturn <Boolean> ] [-ProbeIntervalInSeconds <Int32> ] [-ProbePath <String> ] [-ProbeTimeoutInSeconds <Int32> ] [-PublicPort <Int32> ] [ <CommonParameters>]

Parameter Set: LBDefaultProbe
Add-AzureEndpoint [-Name] <String> [-Protocol] <String> [-LocalPort] <Int32> -DefaultProbe -LBSetName <String> -VM <IPersistentVM> [-ACL <NetworkAclObject> ] [-DirectServerReturn <Boolean> ] [-PublicPort <Int32> ] [ <CommonParameters>]

Parameter Set: LBNoProbe
Add-AzureEndpoint [-Name] <String> [-Protocol] <String> [-LocalPort] <Int32> -LBSetName <String> -NoProbe -VM <IPersistentVM> [-ACL <NetworkAclObject> ] [-DirectServerReturn <Boolean> ] [-PublicPort <Int32> ] [ <CommonParameters>]




 

This topic describes the cmdlet in the .6.19 version of the Windows Azure PowerShell module. To find out the version of the module you're using, from the Windows Azure PowerShell console, type (get-module azure).version.

The Add-AzureEndpoint cmdlet adds a new input endpoint to a virtual machine. You can specify a new endpoint that is not load balanced, which will be used only by this virtual machine, or you can specify a load-balanced endpoint, which other virtual machines running in the same cloud service can share to load-balance traffic.

When adding a load-balanced endpoint, you can also specify parameters for an endpoint probe. The probe will be used to check the health of endpoints and endpoint resources, probing for response every 15 seconds, and taking a resource out of rotation if no response is received within 31 seconds.

 

-ACL<NetworkAclObject>

Specifies an access control list (ACL) to apply to the endpoint.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DefaultProbe

Specifies whether to use the default load balancer probe.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DirectServerReturn<Boolean>

Enables or disables Direct Server Return on the endpoint.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LBSetName<String>

Specifies the name of a load-balanced endpoint. Multiple virtual machines in the cloud service can use a load-balanced endpoint.


Aliases

LoadBalancedEndpointSetName

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LocalPort<Int32>

Specifies the local (private) port that will be used for the endpoint. Applications within the virtual machine listen to this port to service input requests over the endpoint.


Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the endpoint.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NoProbe

Specifies whether to use a load balancer probe.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ProbeIntervalInSeconds<Int32>

Specifies the polling interval of the load balancer probe in seconds.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ProbePath<String>

Required if ProbeProtocol is set to "http". Omit otherwise. Specifies the URI whose health will be probed.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ProbePort<Int32>

Required. Specifies the public port that the probe will use.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ProbeProtocol<String>

Specifies the protocol of the endpoint to be probed. Acceptable values are "http" or "tcp". If "tcp" is specified, a received ACK is required for the probe to be successful. If "http" is specified, a 200 OK response from the ProbePath URI is required.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ProbeTimeoutInSeconds<Int32>

Specifies the timeout of the load balancer probe in seconds.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Protocol<String>

Specifies the protocol of the endpoint. Acceptable values are "udp" or "tcp".


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PublicPort<Int32>

Specifies the public port that the endpoint will use.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VM<IPersistentVM>

Specifies the virtual machine object for which the endpoint will be created.


Aliases

InputObject

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

 

Example 1

This command retrieves the configuration of a virtual machine and adds a new endpoint named "HttpIn" configured with public port 80 and local port 8080. The changed configuration is passed through the pipeline to Update-AzureVM to update the virtual machine.


C:\PS>Get-AzureVM -ServiceName "mySvc" -Name "MyVM1" | Add-AzureEndpoint -Name "HttpIn" -Protocol "tcp" -PublicPort 80 -LocalPort 8080 | Update-AzureVM

Example 2

This command retrieves the configuration of a virtual machine and adds a new endpoint named "HttpIn" configured with public port 80 and local port 8080. The endpoint belongs to the shared load-balanced group named "WebFarm" and its availability is monitored by an HTTP probe on port 80, path '/'. The changed configuration is pass through the pipeline to Update-AzureVM to update the virtual machine.


C:\PS>Get-AzureVM -ServiceName "myLBSvc" -Name "MyVM2" | Add-AzureEndpoint -Name "HttpIn" -Protocol "http" -PublicPort 80 -LocalPort 8080 -LBSetName "WebFarm" -ProbePort 80 -ProbeProtocol "http" -ProbePath '/' | Update-AzureVM

Related topics

Microsoft 正展開一份線上問卷調查,了解您對於 MSDN 網站的看法。 如果您選擇參加,您離開 MSDN 網站時即會顯示線上問卷調查。

您是否想要參加?
顯示:
© 2014 Microsoft