EndpointProperties Class

public final class EndpointProperties
extends EndpointPropertiesUpdateParameters

The JSON object that contains the properties required to create an endpoint.

Constructor Summary

Constructor Description
EndpointProperties()

Creates an instance of EndpointProperties class.

Method Summary

Modifier and Type Method and Description
List<DeepCreatedCustomDomain> customDomains()

Get the customDomains property: The custom domains under the endpoint.

static EndpointProperties fromJson(JsonReader jsonReader)

Reads an instance of EndpointProperties from the JsonReader.

String hostname()

Get the hostname property: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g.

List<DeepCreatedOriginGroup> originGroups()

Get the originGroups property: The origin groups comprising of origins that are used for load balancing the traffic based on availability.

List<DeepCreatedOrigin> origins()

Get the origins property: The source of the content being delivered via CDN.

EndpointProvisioningState provisioningState()

Get the provisioningState property: Provisioning status of the endpoint.

EndpointResourceState resourceState()

Get the resourceState property: Resource status of the endpoint.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

EndpointProperties withContentTypesToCompress(List<String> contentTypesToCompress)

Set the contentTypesToCompress property: List of content types on which compression applies.

EndpointProperties withDefaultOriginGroup(ResourceReference defaultOriginGroup)

Set the defaultOriginGroup property: A reference to the origin group.

EndpointProperties withDeliveryPolicy(EndpointPropertiesUpdateParametersDeliveryPolicy deliveryPolicy)

Set the deliveryPolicy property: A policy that specifies the delivery rules to be used for an endpoint.

EndpointProperties withGeoFilters(List<GeoFilter> geoFilters)

Set the geoFilters property: List of rules defining the user's geo access within a CDN endpoint.

EndpointProperties withIsCompressionEnabled(Boolean isCompressionEnabled)

Set the isCompressionEnabled property: Indicates whether content compression is enabled on CDN.

EndpointProperties withIsHttpAllowed(Boolean isHttpAllowed)

Set the isHttpAllowed property: Indicates whether HTTP traffic is allowed on the endpoint.

EndpointProperties withIsHttpsAllowed(Boolean isHttpsAllowed)

Set the isHttpsAllowed property: Indicates whether HTTPS traffic is allowed on the endpoint.

EndpointProperties withOptimizationType(OptimizationType optimizationType)

Set the optimizationType property: Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g.

EndpointProperties withOriginGroups(List<DeepCreatedOriginGroup> originGroups)

Set the originGroups property: The origin groups comprising of origins that are used for load balancing the traffic based on availability.

EndpointProperties withOriginHostHeader(String originHostHeader)

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

EndpointProperties withOriginPath(String originPath)

Set the originPath property: A directory path on the origin that CDN can use to retrieve content from, e.g.

EndpointProperties withOrigins(List<DeepCreatedOrigin> origins)

Set the origins property: The source of the content being delivered via CDN.

EndpointProperties withProbePath(String probePath)

Set the probePath property: Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN.

EndpointProperties withQueryStringCachingBehavior(QueryStringCachingBehavior queryStringCachingBehavior)

Set the queryStringCachingBehavior property: Defines how CDN caches requests that include query strings.

EndpointProperties withUrlSigningKeys(List<UrlSigningKey> urlSigningKeys)

Set the urlSigningKeys property: List of keys used to validate the signed URL hashes.

EndpointProperties withWebApplicationFirewallPolicyLink(EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink webApplicationFirewallPolicyLink)

Set the webApplicationFirewallPolicyLink property: Defines the Web Application Firewall policy for the endpoint (if applicable).

Methods inherited from EndpointPropertiesUpdateParameters

Methods inherited from java.lang.Object

Constructor Details

EndpointProperties

public EndpointProperties()

Creates an instance of EndpointProperties class.

Method Details

customDomains

public List<DeepCreatedCustomDomain> customDomains()

Get the customDomains property: The custom domains under the endpoint.

Returns:

the customDomains value.

fromJson

public static EndpointProperties fromJson(JsonReader jsonReader)

Reads an instance of EndpointProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

hostname

public String hostname()

Get the hostname property: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net.

Returns:

the hostname value.

originGroups

public List<DeepCreatedOriginGroup> originGroups()

Get the originGroups property: The origin groups comprising of origins that are used for load balancing the traffic based on availability.

Returns:

the originGroups value.

origins

public List<DeepCreatedOrigin> origins()

Get the origins property: The source of the content being delivered via CDN.

Returns:

the origins value.

provisioningState

public EndpointProvisioningState provisioningState()

Get the provisioningState property: Provisioning status of the endpoint.

Returns:

the provisioningState value.

resourceState

public EndpointResourceState resourceState()

Get the resourceState property: Resource status of the endpoint.

Returns:

the resourceState value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

EndpointProperties.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

EndpointProperties.validate()

withContentTypesToCompress

public EndpointProperties withContentTypesToCompress(List<String> contentTypesToCompress)

Set the contentTypesToCompress property: List of content types on which compression applies. The value should be a valid MIME type.

Overrides:

EndpointProperties.withContentTypesToCompress(List<String> contentTypesToCompress)

Parameters:

contentTypesToCompress

withDefaultOriginGroup

public EndpointProperties withDefaultOriginGroup(ResourceReference defaultOriginGroup)

Set the defaultOriginGroup property: A reference to the origin group.

Overrides:

EndpointProperties.withDefaultOriginGroup(ResourceReference defaultOriginGroup)

Parameters:

defaultOriginGroup

withDeliveryPolicy

public EndpointProperties withDeliveryPolicy(EndpointPropertiesUpdateParametersDeliveryPolicy deliveryPolicy)

Set the deliveryPolicy property: A policy that specifies the delivery rules to be used for an endpoint.

Overrides:

EndpointProperties.withDeliveryPolicy(EndpointPropertiesUpdateParametersDeliveryPolicy deliveryPolicy)

Parameters:

deliveryPolicy

withGeoFilters

public EndpointProperties withGeoFilters(List<GeoFilter> geoFilters)

Set the geoFilters property: List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/.

Overrides:

EndpointProperties.withGeoFilters(List<GeoFilter> geoFilters)

Parameters:

geoFilters

withIsCompressionEnabled

public EndpointProperties withIsCompressionEnabled(Boolean isCompressionEnabled)

Set the isCompressionEnabled property: Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.

Overrides:

EndpointProperties.withIsCompressionEnabled(Boolean isCompressionEnabled)

Parameters:

isCompressionEnabled

withIsHttpAllowed

public EndpointProperties withIsHttpAllowed(Boolean isHttpAllowed)

Set the isHttpAllowed property: Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.

Overrides:

EndpointProperties.withIsHttpAllowed(Boolean isHttpAllowed)

Parameters:

isHttpAllowed

withIsHttpsAllowed

public EndpointProperties withIsHttpsAllowed(Boolean isHttpsAllowed)

Set the isHttpsAllowed property: Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.

Overrides:

EndpointProperties.withIsHttpsAllowed(Boolean isHttpsAllowed)

Parameters:

isHttpsAllowed

withOptimizationType

public EndpointProperties withOptimizationType(OptimizationType optimizationType)

Set the optimizationType property: Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization.

Overrides:

EndpointProperties.withOptimizationType(OptimizationType optimizationType)

Parameters:

optimizationType

withOriginGroups

public EndpointProperties withOriginGroups(List<DeepCreatedOriginGroup> originGroups)

Set the originGroups property: The origin groups comprising of origins that are used for load balancing the traffic based on availability.

Parameters:

originGroups - the originGroups value to set.

Returns:

the EndpointProperties object itself.

withOriginHostHeader

public EndpointProperties withOriginHostHeader(String originHostHeader)

Set the originHostHeader property: The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.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.

Overrides:

EndpointProperties.withOriginHostHeader(String originHostHeader)

Parameters:

originHostHeader

withOriginPath

public EndpointProperties withOriginPath(String originPath)

Set the originPath property: A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.

Overrides:

EndpointProperties.withOriginPath(String originPath)

Parameters:

originPath

withOrigins

public EndpointProperties withOrigins(List<DeepCreatedOrigin> origins)

Set the origins property: The source of the content being delivered via CDN.

Parameters:

origins - the origins value to set.

Returns:

the EndpointProperties object itself.

withProbePath

public EndpointProperties withProbePath(String probePath)

Set the probePath property: Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.

Overrides:

EndpointProperties.withProbePath(String probePath)

Parameters:

probePath

withQueryStringCachingBehavior

public EndpointProperties withQueryStringCachingBehavior(QueryStringCachingBehavior queryStringCachingBehavior)

Set the queryStringCachingBehavior property: Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.

Overrides:

EndpointProperties.withQueryStringCachingBehavior(QueryStringCachingBehavior queryStringCachingBehavior)

Parameters:

queryStringCachingBehavior

withUrlSigningKeys

public EndpointProperties withUrlSigningKeys(List<UrlSigningKey> urlSigningKeys)

Set the urlSigningKeys property: List of keys used to validate the signed URL hashes.

Overrides:

EndpointProperties.withUrlSigningKeys(List<UrlSigningKey> urlSigningKeys)

Parameters:

urlSigningKeys

withWebApplicationFirewallPolicyLink

public EndpointProperties withWebApplicationFirewallPolicyLink(EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink webApplicationFirewallPolicyLink)

Set the webApplicationFirewallPolicyLink property: Defines the Web Application Firewall policy for the endpoint (if applicable).

Overrides:

EndpointProperties.withWebApplicationFirewallPolicyLink(EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink webApplicationFirewallPolicyLink)

Parameters:

webApplicationFirewallPolicyLink

Applies to