OriginProperties Class

public final class OriginProperties
extends OriginUpdatePropertiesParameters

The JSON object that contains the properties of the origin.

Constructor Summary

Constructor Description
OriginProperties()

Creates an instance of OriginProperties class.

Method Summary

Modifier and Type Method and Description
static OriginProperties fromJson(JsonReader jsonReader)

Reads an instance of OriginProperties from the JsonReader.

PrivateEndpointStatus privateEndpointStatus()

Get the privateEndpointStatus property: The approval status for the connection to the Private Link.

OriginProvisioningState provisioningState()

Get the provisioningState property: Provisioning status of the origin.

OriginResourceState resourceState()

Get the resourceState property: Resource status of the origin.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

OriginProperties withEnabled(Boolean enabled)

Set the enabled property: Origin is enabled for load balancing or not.

OriginProperties withHostname(String hostname)

Set the hostname property: The address of the origin.

OriginProperties withHttpPort(Integer httpPort)

Set the httpPort property: The value of the HTTP port.

OriginProperties withHttpsPort(Integer httpsPort)

Set the httpsPort property: The value of the HTTPS port.

OriginProperties withOriginHostHeader(String originHostHeader)

Set the originHostHeader property: The host header value sent to the origin with each request.

OriginProperties withPriority(Integer priority)

Set the priority property: Priority of origin in given origin group for load balancing.

OriginProperties withPrivateLinkAlias(String privateLinkAlias)

Set the privateLinkAlias property: The Alias of the Private Link resource.

OriginProperties withPrivateLinkApprovalMessage(String privateLinkApprovalMessage)

Set the privateLinkApprovalMessage property: A custom message to be included in the approval request to connect to the Private Link.

OriginProperties withPrivateLinkLocation(String privateLinkLocation)

Set the privateLinkLocation property: The location of the Private Link resource.

OriginProperties withPrivateLinkResourceId(String privateLinkResourceId)

Set the privateLinkResourceId property: The Resource Id of the Private Link resource.

OriginProperties withWeight(Integer weight)

Set the weight property: Weight of the origin in given origin group for load balancing.

Methods inherited from OriginUpdatePropertiesParameters

Methods inherited from java.lang.Object

Constructor Details

OriginProperties

public OriginProperties()

Creates an instance of OriginProperties class.

Method Details

fromJson

public static OriginProperties fromJson(JsonReader jsonReader)

Reads an instance of OriginProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of OriginProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the OriginProperties.

privateEndpointStatus

public PrivateEndpointStatus privateEndpointStatus()

Get the privateEndpointStatus property: The approval status for the connection to the Private Link.

Returns:

the privateEndpointStatus value.

provisioningState

public OriginProvisioningState provisioningState()

Get the provisioningState property: Provisioning status of the origin.

Returns:

the provisioningState value.

resourceState

public OriginResourceState resourceState()

Get the resourceState property: Resource status of the origin.

Returns:

the resourceState value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

OriginProperties.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

OriginProperties.validate()

withEnabled

public OriginProperties withEnabled(Boolean enabled)

Set the enabled property: Origin is enabled for load balancing or not.

Overrides:

OriginProperties.withEnabled(Boolean enabled)

Parameters:

enabled

withHostname

public OriginProperties withHostname(String hostname)

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

Overrides:

OriginProperties.withHostname(String hostname)

Parameters:

hostname

withHttpPort

public OriginProperties withHttpPort(Integer httpPort)

Set the httpPort property: The value of the HTTP port. Must be between 1 and 65535.

Overrides:

OriginProperties.withHttpPort(Integer httpPort)

Parameters:

httpPort

withHttpsPort

public OriginProperties withHttpsPort(Integer httpsPort)

Set the httpsPort property: The value of the HTTPS port. Must be between 1 and 65535.

Overrides:

OriginProperties.withHttpsPort(Integer httpsPort)

Parameters:

httpsPort

withOriginHostHeader

public OriginProperties withOriginHostHeader(String originHostHeader)

Set the originHostHeader property: 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.

Overrides:

OriginProperties.withOriginHostHeader(String originHostHeader)

Parameters:

originHostHeader

withPriority

public OriginProperties withPriority(Integer priority)

Set the priority property: 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.

Overrides:

OriginProperties.withPriority(Integer priority)

Parameters:

priority

withPrivateLinkAlias

public OriginProperties withPrivateLinkAlias(String privateLinkAlias)

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

Overrides:

OriginProperties.withPrivateLinkAlias(String privateLinkAlias)

Parameters:

privateLinkAlias

withPrivateLinkApprovalMessage

public OriginProperties withPrivateLinkApprovalMessage(String privateLinkApprovalMessage)

Set the privateLinkApprovalMessage property: A custom message to be included in the approval request to connect to the Private Link.

Overrides:

OriginProperties.withPrivateLinkApprovalMessage(String privateLinkApprovalMessage)

Parameters:

privateLinkApprovalMessage

withPrivateLinkLocation

public OriginProperties withPrivateLinkLocation(String privateLinkLocation)

Set the privateLinkLocation property: The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated.

Overrides:

OriginProperties.withPrivateLinkLocation(String privateLinkLocation)

Parameters:

privateLinkLocation

withPrivateLinkResourceId

public OriginProperties withPrivateLinkResourceId(String privateLinkResourceId)

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

Overrides:

OriginProperties.withPrivateLinkResourceId(String privateLinkResourceId)

Parameters:

privateLinkResourceId

withWeight

public OriginProperties withWeight(Integer weight)

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

Overrides:

OriginProperties.withWeight(Integer weight)

Parameters:

weight

Applies to