Class OriginProperties
- java.lang.Object
-
- com.azure.resourcemanager.cdn.models.OriginUpdatePropertiesParameters
-
- com.azure.resourcemanager.cdn.models.OriginProperties
-
public final class OriginProperties extends OriginUpdatePropertiesParameters
The JSON object that contains the properties of the origin.
-
-
Constructor Summary
Constructors Constructor Description OriginProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrivateEndpointStatusprivateEndpointStatus()Get the privateEndpointStatus property: The approval status for the connection to the Private Link.StringprovisioningState()Get the provisioningState property: Provisioning status of the origin.OriginResourceStateresourceState()Get the resourceState property: Resource status of the origin.voidvalidate()Validates the instance.OriginPropertieswithEnabled(Boolean enabled)Set the enabled property: Origin is enabled for load balancing or not.OriginPropertieswithHostname(String hostname)Set the hostname property: The address of the origin.OriginPropertieswithHttpPort(Integer httpPort)Set the httpPort property: The value of the HTTP port.OriginPropertieswithHttpsPort(Integer httpsPort)Set the httpsPort property: The value of the HTTPS port.OriginPropertieswithOriginHostHeader(String originHostHeader)Set the originHostHeader property: The host header value sent to the origin with each request.OriginPropertieswithPriority(Integer priority)Set the priority property: Priority of origin in given origin group for load balancing.OriginPropertieswithPrivateLinkAlias(String privateLinkAlias)Set the privateLinkAlias property: The Alias of the Private Link resource.OriginPropertieswithPrivateLinkApprovalMessage(String privateLinkApprovalMessage)Set the privateLinkApprovalMessage property: A custom message to be included in the approval request to connect to the Private Link.OriginPropertieswithPrivateLinkLocation(String privateLinkLocation)Set the privateLinkLocation property: The location of the Private Link resource.OriginPropertieswithPrivateLinkResourceId(String privateLinkResourceId)Set the privateLinkResourceId property: The Resource Id of the Private Link resource.OriginPropertieswithWeight(Integer weight)Set the weight property: Weight of the origin in given origin group for load balancing.-
Methods inherited from class com.azure.resourcemanager.cdn.models.OriginUpdatePropertiesParameters
enabled, hostname, httpPort, httpsPort, originHostHeader, priority, privateLinkAlias, privateLinkApprovalMessage, privateLinkLocation, privateLinkResourceId, weight
-
-
-
-
Method Detail
-
resourceState
public OriginResourceState resourceState()
Get the resourceState property: Resource status of the origin.- Returns:
- the resourceState value.
-
provisioningState
public String provisioningState()
Get the provisioningState property: Provisioning status of the origin.- Returns:
- the provisioningState value.
-
privateEndpointStatus
public PrivateEndpointStatus privateEndpointStatus()
Get the privateEndpointStatus property: The approval status for the connection to the Private Link.- Returns:
- the privateEndpointStatus value.
-
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:
withHostnamein classOriginUpdatePropertiesParameters- Parameters:
hostname- the hostname value to set.- Returns:
- the OriginUpdatePropertiesParameters object itself.
-
withHttpPort
public OriginProperties withHttpPort(Integer httpPort)
Set the httpPort property: The value of the HTTP port. Must be between 1 and 65535.- Overrides:
withHttpPortin classOriginUpdatePropertiesParameters- Parameters:
httpPort- the httpPort value to set.- Returns:
- the OriginUpdatePropertiesParameters object itself.
-
withHttpsPort
public OriginProperties withHttpsPort(Integer httpsPort)
Set the httpsPort property: The value of the HTTPS port. Must be between 1 and 65535.- Overrides:
withHttpsPortin classOriginUpdatePropertiesParameters- Parameters:
httpsPort- the httpsPort value to set.- Returns:
- the OriginUpdatePropertiesParameters object itself.
-
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:
withOriginHostHeaderin classOriginUpdatePropertiesParameters- Parameters:
originHostHeader- the originHostHeader value to set.- Returns:
- the OriginUpdatePropertiesParameters object itself.
-
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:
withPriorityin classOriginUpdatePropertiesParameters- Parameters:
priority- the priority value to set.- Returns:
- the OriginUpdatePropertiesParameters object itself.
-
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:
withWeightin classOriginUpdatePropertiesParameters- Parameters:
weight- the weight value to set.- Returns:
- the OriginUpdatePropertiesParameters object itself.
-
withEnabled
public OriginProperties withEnabled(Boolean enabled)
Set the enabled property: Origin is enabled for load balancing or not.- Overrides:
withEnabledin classOriginUpdatePropertiesParameters- Parameters:
enabled- the enabled value to set.- Returns:
- the OriginUpdatePropertiesParameters object itself.
-
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:
withPrivateLinkAliasin classOriginUpdatePropertiesParameters- Parameters:
privateLinkAlias- the privateLinkAlias value to set.- Returns:
- the OriginUpdatePropertiesParameters object itself.
-
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:
withPrivateLinkResourceIdin classOriginUpdatePropertiesParameters- Parameters:
privateLinkResourceId- the privateLinkResourceId value to set.- Returns:
- the OriginUpdatePropertiesParameters object itself.
-
withPrivateLinkLocation
public OriginProperties withPrivateLinkLocation(String privateLinkLocation)
Set the privateLinkLocation property: The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated.- Overrides:
withPrivateLinkLocationin classOriginUpdatePropertiesParameters- Parameters:
privateLinkLocation- the privateLinkLocation value to set.- Returns:
- the OriginUpdatePropertiesParameters object itself.
-
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:
withPrivateLinkApprovalMessagein classOriginUpdatePropertiesParameters- Parameters:
privateLinkApprovalMessage- the privateLinkApprovalMessage value to set.- Returns:
- the OriginUpdatePropertiesParameters object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validatein classOriginUpdatePropertiesParameters- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-