
com.pulumi.azurenative.cdn.Endpoint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.cdn;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.cdn.EndpointArgs;
import com.pulumi.azurenative.cdn.outputs.DeepCreatedCustomDomainResponse;
import com.pulumi.azurenative.cdn.outputs.DeepCreatedOriginGroupResponse;
import com.pulumi.azurenative.cdn.outputs.DeepCreatedOriginResponse;
import com.pulumi.azurenative.cdn.outputs.EndpointPropertiesUpdateParametersResponseDeliveryPolicy;
import com.pulumi.azurenative.cdn.outputs.EndpointPropertiesUpdateParametersResponseWebApplicationFirewallPolicyLink;
import com.pulumi.azurenative.cdn.outputs.GeoFilterResponse;
import com.pulumi.azurenative.cdn.outputs.ResourceReferenceResponse;
import com.pulumi.azurenative.cdn.outputs.SystemDataResponse;
import com.pulumi.azurenative.cdn.outputs.UrlSigningKeyResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content caching and delivery behavior. The CDN endpoint uses the URL format <endpointname>.azureedge.net.
* Azure REST API version: 2023-05-01. Prior API version in Azure Native 1.x: 2020-09-01.
*
* Other available API versions: 2016-04-02, 2023-07-01-preview, 2024-02-01, 2024-05-01-preview, 2024-06-01-preview.
*
* ## Example Usage
* ### Endpoints_Create
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.cdn.Endpoint;
* import com.pulumi.azurenative.cdn.EndpointArgs;
* import com.pulumi.azurenative.cdn.inputs.ResourceReferenceArgs;
* import com.pulumi.azurenative.cdn.inputs.EndpointPropertiesUpdateParametersDeliveryPolicyArgs;
* import com.pulumi.azurenative.cdn.inputs.DeepCreatedOriginGroupArgs;
* import com.pulumi.azurenative.cdn.inputs.HealthProbeParametersArgs;
* import com.pulumi.azurenative.cdn.inputs.ResponseBasedOriginErrorDetectionParametersArgs;
* import com.pulumi.azurenative.cdn.inputs.DeepCreatedOriginArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var endpoint = new Endpoint("endpoint", EndpointArgs.builder()
* .contentTypesToCompress(
* "text/html",
* "application/octet-stream")
* .defaultOriginGroup(ResourceReferenceArgs.builder()
* .id("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/originGroups/originGroup1")
* .build())
* .deliveryPolicy(EndpointPropertiesUpdateParametersDeliveryPolicyArgs.builder()
* .description("Test description for a policy.")
* .rules(DeliveryRuleArgs.builder()
* .actions(
* DeliveryRuleCacheExpirationActionArgs.builder()
* .name("CacheExpiration")
* .parameters(CacheExpirationActionParametersArgs.builder()
* .cacheBehavior("Override")
* .cacheDuration("10:10:09")
* .cacheType("All")
* .typeName("DeliveryRuleCacheExpirationActionParameters")
* .build())
* .build(),
* DeliveryRuleCacheExpirationActionArgs.builder()
* .name("ModifyResponseHeader")
* .parameters(CacheExpirationActionParametersArgs.builder()
* .headerAction("Overwrite")
* .headerName("Access-Control-Allow-Origin")
* .typeName("DeliveryRuleHeaderActionParameters")
* .value("*")
* .build())
* .build(),
* DeliveryRuleCacheExpirationActionArgs.builder()
* .name("ModifyRequestHeader")
* .parameters(CacheExpirationActionParametersArgs.builder()
* .headerAction("Overwrite")
* .headerName("Accept-Encoding")
* .typeName("DeliveryRuleHeaderActionParameters")
* .value("gzip")
* .build())
* .build())
* .conditions(DeliveryRuleRemoteAddressConditionArgs.builder()
* .name("RemoteAddress")
* .parameters(RemoteAddressMatchConditionParametersArgs.builder()
* .matchValues(
* "192.168.1.0/24",
* "10.0.0.0/24")
* .negateCondition(true)
* .operator("IPMatch")
* .typeName("DeliveryRuleRemoteAddressConditionParameters")
* .build())
* .build())
* .name("rule1")
* .order(1)
* .build())
* .build())
* .endpointName("endpoint1")
* .isCompressionEnabled(true)
* .isHttpAllowed(true)
* .isHttpsAllowed(true)
* .location("WestUs")
* .originGroups(DeepCreatedOriginGroupArgs.builder()
* .healthProbeSettings(HealthProbeParametersArgs.builder()
* .probeIntervalInSeconds(120)
* .probePath("/health.aspx")
* .probeProtocol("Http")
* .probeRequestType("GET")
* .build())
* .name("originGroup1")
* .origins(
* ResourceReferenceArgs.builder()
* .id("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin1")
* .build(),
* ResourceReferenceArgs.builder()
* .id("/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/origin2")
* .build())
* .responseBasedOriginErrorDetectionSettings(ResponseBasedOriginErrorDetectionParametersArgs.builder()
* .responseBasedDetectedErrorTypes("TcpErrorsOnly")
* .responseBasedFailoverThresholdPercentage(10)
* .build())
* .build())
* .originHostHeader("www.bing.com")
* .originPath("/photos")
* .origins(
* DeepCreatedOriginArgs.builder()
* .enabled(true)
* .hostName("www.someDomain1.net")
* .httpPort(80)
* .httpsPort(443)
* .name("origin1")
* .originHostHeader("www.someDomain1.net")
* .priority(1)
* .weight(50)
* .build(),
* DeepCreatedOriginArgs.builder()
* .enabled(true)
* .hostName("www.someDomain2.net")
* .httpPort(80)
* .httpsPort(443)
* .name("origin2")
* .originHostHeader("www.someDomain2.net")
* .priority(2)
* .weight(50)
* .build())
* .profileName("profile1")
* .queryStringCachingBehavior("BypassCaching")
* .resourceGroupName("RG")
* .tags(Map.of("key1", "value1"))
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:cdn:Endpoint endpoint4899 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}
* ```
*
*/
@ResourceType(type="azure-native:cdn:Endpoint")
public class Endpoint extends com.pulumi.resources.CustomResource {
/**
* List of content types on which compression applies. The value should be a valid MIME type.
*
*/
@Export(name="contentTypesToCompress", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> contentTypesToCompress;
/**
* @return List of content types on which compression applies. The value should be a valid MIME type.
*
*/
public Output>> contentTypesToCompress() {
return Codegen.optional(this.contentTypesToCompress);
}
/**
* The custom domains under the endpoint.
*
*/
@Export(name="customDomains", refs={List.class,DeepCreatedCustomDomainResponse.class}, tree="[0,1]")
private Output> customDomains;
/**
* @return The custom domains under the endpoint.
*
*/
public Output> customDomains() {
return this.customDomains;
}
/**
* A reference to the origin group.
*
*/
@Export(name="defaultOriginGroup", refs={ResourceReferenceResponse.class}, tree="[0]")
private Output* @Nullable */ ResourceReferenceResponse> defaultOriginGroup;
/**
* @return A reference to the origin group.
*
*/
public Output> defaultOriginGroup() {
return Codegen.optional(this.defaultOriginGroup);
}
/**
* A policy that specifies the delivery rules to be used for an endpoint.
*
*/
@Export(name="deliveryPolicy", refs={EndpointPropertiesUpdateParametersResponseDeliveryPolicy.class}, tree="[0]")
private Output* @Nullable */ EndpointPropertiesUpdateParametersResponseDeliveryPolicy> deliveryPolicy;
/**
* @return A policy that specifies the delivery rules to be used for an endpoint.
*
*/
public Output> deliveryPolicy() {
return Codegen.optional(this.deliveryPolicy);
}
/**
* 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/
*
*/
@Export(name="geoFilters", refs={List.class,GeoFilterResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> geoFilters;
/**
* @return 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/
*
*/
public Output>> geoFilters() {
return Codegen.optional(this.geoFilters);
}
/**
* The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net
*
*/
@Export(name="hostName", refs={String.class}, tree="[0]")
private Output hostName;
/**
* @return The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net
*
*/
public Output hostName() {
return this.hostName;
}
/**
* 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.
*
*/
@Export(name="isCompressionEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> isCompressionEnabled;
/**
* @return 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.
*
*/
public Output> isCompressionEnabled() {
return Codegen.optional(this.isCompressionEnabled);
}
/**
* Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
*
*/
@Export(name="isHttpAllowed", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> isHttpAllowed;
/**
* @return Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
*
*/
public Output> isHttpAllowed() {
return Codegen.optional(this.isHttpAllowed);
}
/**
* Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
*
*/
@Export(name="isHttpsAllowed", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> isHttpsAllowed;
/**
* @return Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
*
*/
public Output> isHttpsAllowed() {
return Codegen.optional(this.isHttpsAllowed);
}
/**
* Resource location.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return Resource location.
*
*/
public Output location() {
return this.location;
}
/**
* Resource name.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Resource name.
*
*/
public Output name() {
return this.name;
}
/**
* 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.
*
*/
@Export(name="optimizationType", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> optimizationType;
/**
* @return 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.
*
*/
public Output> optimizationType() {
return Codegen.optional(this.optimizationType);
}
/**
* The origin groups comprising of origins that are used for load balancing the traffic based on availability.
*
*/
@Export(name="originGroups", refs={List.class,DeepCreatedOriginGroupResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> originGroups;
/**
* @return The origin groups comprising of origins that are used for load balancing the traffic based on availability.
*
*/
public Output>> originGroups() {
return Codegen.optional(this.originGroups);
}
/**
* 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.
*
*/
@Export(name="originHostHeader", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> originHostHeader;
/**
* @return 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.
*
*/
public Output> originHostHeader() {
return Codegen.optional(this.originHostHeader);
}
/**
* A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
*
*/
@Export(name="originPath", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> originPath;
/**
* @return A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
*
*/
public Output> originPath() {
return Codegen.optional(this.originPath);
}
/**
* The source of the content being delivered via CDN.
*
*/
@Export(name="origins", refs={List.class,DeepCreatedOriginResponse.class}, tree="[0,1]")
private Output> origins;
/**
* @return The source of the content being delivered via CDN.
*
*/
public Output> origins() {
return this.origins;
}
/**
* 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.
*
*/
@Export(name="probePath", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> probePath;
/**
* @return 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.
*
*/
public Output> probePath() {
return Codegen.optional(this.probePath);
}
/**
* Provisioning status of the endpoint.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return Provisioning status of the endpoint.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* 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.
*
*/
@Export(name="queryStringCachingBehavior", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> queryStringCachingBehavior;
/**
* @return 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.
*
*/
public Output> queryStringCachingBehavior() {
return Codegen.optional(this.queryStringCachingBehavior);
}
/**
* Resource status of the endpoint.
*
*/
@Export(name="resourceState", refs={String.class}, tree="[0]")
private Output resourceState;
/**
* @return Resource status of the endpoint.
*
*/
public Output resourceState() {
return this.resourceState;
}
/**
* Read only system data
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return Read only system data
*
*/
public Output systemData() {
return this.systemData;
}
/**
* Resource tags.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Resource tags.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Resource type.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Resource type.
*
*/
public Output type() {
return this.type;
}
/**
* List of keys used to validate the signed URL hashes.
*
*/
@Export(name="urlSigningKeys", refs={List.class,UrlSigningKeyResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> urlSigningKeys;
/**
* @return List of keys used to validate the signed URL hashes.
*
*/
public Output>> urlSigningKeys() {
return Codegen.optional(this.urlSigningKeys);
}
/**
* Defines the Web Application Firewall policy for the endpoint (if applicable)
*
*/
@Export(name="webApplicationFirewallPolicyLink", refs={EndpointPropertiesUpdateParametersResponseWebApplicationFirewallPolicyLink.class}, tree="[0]")
private Output* @Nullable */ EndpointPropertiesUpdateParametersResponseWebApplicationFirewallPolicyLink> webApplicationFirewallPolicyLink;
/**
* @return Defines the Web Application Firewall policy for the endpoint (if applicable)
*
*/
public Output> webApplicationFirewallPolicyLink() {
return Codegen.optional(this.webApplicationFirewallPolicyLink);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Endpoint(java.lang.String name) {
this(name, EndpointArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Endpoint(java.lang.String name, EndpointArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public Endpoint(java.lang.String name, EndpointArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:cdn:Endpoint", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Endpoint(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:cdn:Endpoint", name, null, makeResourceOptions(options, id), false);
}
private static EndpointArgs makeArgs(EndpointArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? EndpointArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:cdn/v20150601:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20160402:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20161002:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20170402:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20171012:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20190415:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20190615:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20190615preview:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20191231:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20200331:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20200415:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20200901:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20210601:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20220501preview:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20221101preview:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20230501:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20230701preview:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20240201:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20240501preview:Endpoint").build()),
Output.of(Alias.builder().type("azure-native:cdn/v20240601preview:Endpoint").build())
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static Endpoint get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Endpoint(name, id, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy