New-AzCdnOrigin

Creates a new origin within the specified endpoint.

Syntax

New-AzCdnOrigin
   -EndpointName <String>
   -Name <String>
   -ProfileName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   [-Enabled]
   [-HostName <String>]
   [-HttpPort <Int32>]
   [-HttpsPort <Int32>]
   [-OriginHostHeader <String>]
   [-Priority <Int32>]
   [-PrivateLinkAlias <String>]
   [-PrivateLinkApprovalMessage <String>]
   [-PrivateLinkLocation <String>]
   [-PrivateLinkResourceId <String>]
   [-Weight <Int32>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

Creates a new origin within the specified endpoint.

Examples

Example 1: Create an AzureCDN origin under the AzureCDN endpoint

New-AzCdnOrigin -ResourceGroupName testps-rg-da16jm -ProfileName cdn001 -EndpointName endptest001 -Name origin1 -HostName "host1.hello.com"

Name    ResourceGroupName
----    -----------------
origin1 testps-rg-da16jm

Create an AzureCDN origin under the AzureCDN endpoint

Parameters

-AsJob

Run the command as a job

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

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DefaultProfile

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

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Enabled

Origin is enabled for load balancing or not

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

-EndpointName

Name of the endpoint under the profile which is unique globally.

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

-HostName

The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.

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

-HttpPort

The value of the HTTP port. Must be between 1 and 65535.

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

-HttpsPort

The value of the HTTPS port. Must be between 1 and 65535.

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

-Name

Name of the origin that is unique within the endpoint.

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

-NoWait

Run the command asynchronously

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

-OriginHostHeader

The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint

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

-Priority

Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5

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

-PrivateLinkAlias

The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'

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

-PrivateLinkApprovalMessage

A custom message to be included in the approval request to connect to the Private Link.

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

-PrivateLinkLocation

The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated

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

-PrivateLinkResourceId

The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'

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

-ProfileName

Name of the CDN profile which is unique within the resource group.

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

-ResourceGroupName

Name of the Resource group within the Azure subscription.

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

-SubscriptionId

Azure Subscription ID.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Accept pipeline input:False
Accept wildcard characters:False

-Weight

Weight of the origin in given origin group for load balancing. Must be between 1 and 1000

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

Outputs

IOrigin

Notes

ALIASES