Module cdn
This page documents the language specification for the azure package. If you're looking for help working with the inputs, outputs, or functions of azure resources in a Pulumi program, please see the resource documentation for examples and API reference.
Resources
Functions
Others
Resources
Resource Endpoint
class Endpoint extends CustomResourceA CDN Endpoint is the entity within a CDN Profile containing configuration information regarding caching behaviours and origins. The CDN Endpoint is exposed using the URL format
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleProfile = new azure.cdn.Profile("exampleProfile", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
sku: "Standard_Verizon",
});
const exampleEndpoint = new azure.cdn.Endpoint("exampleEndpoint", {
profileName: exampleProfile.name,
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
origin: [{
name: "example",
hostName: "www.example.com",
}],
});constructor
new Endpoint(name: string, args: EndpointArgs, opts?: pulumi.CustomResourceOptions)Create a Endpoint resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: EndpointState, opts?: pulumi.CustomResourceOptions): EndpointGet an existing Endpoint resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is EndpointReturns true if the given object is an instance of Endpoint. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property contentTypesToCompresses
public contentTypesToCompresses: pulumi.Output<string[]>;An array of strings that indicates a content types on which compression will be applied. The value for the elements should be MIME types.
property deliveryRules
public deliveryRules: pulumi.Output<EndpointDeliveryRule[] | undefined>;Rules for the rules engine. An endpoint can contain up until 4 of those rules that consist of conditions and actions. A deliveryRule blocks as defined below.
property geoFilters
public geoFilters: pulumi.Output<EndpointGeoFilter[] | undefined>;A set of Geo Filters for this CDN Endpoint. Each geoFilter block supports fields documented below.
property globalDeliveryRule
public globalDeliveryRule: pulumi.Output<EndpointGlobalDeliveryRule | undefined>;Actions that are valid for all resources regardless of any conditions. A globalDeliveryRule block as defined below.
property hostName
public hostName: pulumi.Output<string>;A string that determines the hostname/IP address of the origin server. This string can be a domain name, Storage Account endpoint, Web App endpoint, IPv4 address or IPv6 address. Changing this forces a new resource to be created.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property isCompressionEnabled
public isCompressionEnabled: pulumi.Output<boolean | undefined>;Indicates whether compression is to be enabled. Defaults to false.
property isHttpAllowed
public isHttpAllowed: pulumi.Output<boolean | undefined>;Defaults to true.
property isHttpsAllowed
public isHttpsAllowed: pulumi.Output<boolean | undefined>;Defaults to true.
property location
public location: pulumi.Output<string>;Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property name
public name: pulumi.Output<string>;The name of the origin. This is an arbitrary value. However, this value needs to be unique under the endpoint. Changing this forces a new resource to be created.
property optimizationType
public optimizationType: pulumi.Output<string | undefined>;What types of optimization should this CDN Endpoint optimize for? Possible values include DynamicSiteAcceleration, GeneralMediaStreaming, GeneralWebDelivery, LargeFileDownload and VideoOnDemandMediaStreaming.
property originHostHeader
public originHostHeader: pulumi.Output<string | undefined>;The host header CDN provider will send along with content requests to origins. Defaults to the host name of the origin.
property originPath
public originPath: pulumi.Output<string>;The path used at for origin requests.
property origins
public origins: pulumi.Output<EndpointOrigin[]>;The set of origins of the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options. Each origin block supports fields documented below.
property probePath
public probePath: pulumi.Output<string>;the 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 originPath.
property profileName
public profileName: pulumi.Output<string>;The CDN Profile to which to attach the CDN Endpoint.
property querystringCachingBehaviour
public querystringCachingBehaviour: pulumi.Output<string | undefined>;Sets query string caching behavior. Allowed values are IgnoreQueryString, BypassCaching and UseQueryString. Defaults to IgnoreQueryString.
property resourceGroupName
public resourceGroupName: pulumi.Output<string>;The name of the resource group in which to create the CDN Endpoint.
property tags
public tags: pulumi.Output<{[key: string]: string} | undefined>;A mapping of tags to assign to the resource.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Profile
class Profile extends CustomResourceManages a CDN Profile to create a collection of CDN Endpoints.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West US"});
const exampleProfile = new azure.cdn.Profile("exampleProfile", {
location: "West US",
resourceGroupName: exampleResourceGroup.name,
sku: "Standard_Verizon",
tags: {
environment: "Production",
cost_center: "MSFT",
},
});constructor
new Profile(name: string, args: ProfileArgs, opts?: pulumi.CustomResourceOptions)Create a Profile resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProfileState, opts?: pulumi.CustomResourceOptions): ProfileGet an existing Profile resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ProfileReturns true if the given object is an instance of Profile. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property location
public location: pulumi.Output<string>;Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property name
public name: pulumi.Output<string>;Specifies the name of the CDN Profile. Changing this forces a new resource to be created.
property resourceGroupName
public resourceGroupName: pulumi.Output<string>;The name of the resource group in which to create the CDN Profile.
property sku
public sku: pulumi.Output<string>;The pricing related information of current CDN profile. Accepted values are Standard_Akamai, Standard_ChinaCdn, Standard_Microsoft, Standard_Verizon or Premium_Verizon.
property tags
public tags: pulumi.Output<{[key: string]: string} | undefined>;A mapping of tags to assign to the resource.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getProfile
getProfile(args: GetProfileArgs, opts?: pulumi.InvokeOptions): Promise<GetProfileResult>Use this data source to access information about an existing CDN Profile.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.cdn.getProfile({
name: "myfirstcdnprofile",
resourceGroupName: "example-resources",
});
export const cdnProfileId = example.then(example => example.id);Others
interface EndpointArgs
interface EndpointArgsThe set of arguments for constructing a Endpoint resource.
property contentTypesToCompresses
contentTypesToCompresses?: pulumi.Input<pulumi.Input<string>[]>;An array of strings that indicates a content types on which compression will be applied. The value for the elements should be MIME types.
property deliveryRules
deliveryRules?: pulumi.Input<pulumi.Input<EndpointDeliveryRule>[]>;Rules for the rules engine. An endpoint can contain up until 4 of those rules that consist of conditions and actions. A deliveryRule blocks as defined below.
property geoFilters
geoFilters?: pulumi.Input<pulumi.Input<EndpointGeoFilter>[]>;A set of Geo Filters for this CDN Endpoint. Each geoFilter block supports fields documented below.
property globalDeliveryRule
globalDeliveryRule?: pulumi.Input<EndpointGlobalDeliveryRule>;Actions that are valid for all resources regardless of any conditions. A globalDeliveryRule block as defined below.
property isCompressionEnabled
isCompressionEnabled?: pulumi.Input<boolean>;Indicates whether compression is to be enabled. Defaults to false.
property isHttpAllowed
isHttpAllowed?: pulumi.Input<boolean>;Defaults to true.
property isHttpsAllowed
isHttpsAllowed?: pulumi.Input<boolean>;Defaults to true.
property location
location?: pulumi.Input<string>;Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property name
name?: pulumi.Input<string>;The name of the origin. This is an arbitrary value. However, this value needs to be unique under the endpoint. Changing this forces a new resource to be created.
property optimizationType
optimizationType?: pulumi.Input<string>;What types of optimization should this CDN Endpoint optimize for? Possible values include DynamicSiteAcceleration, GeneralMediaStreaming, GeneralWebDelivery, LargeFileDownload and VideoOnDemandMediaStreaming.
property originHostHeader
originHostHeader?: pulumi.Input<string>;The host header CDN provider will send along with content requests to origins. Defaults to the host name of the origin.
property originPath
originPath?: pulumi.Input<string>;The path used at for origin requests.
property origins
origins: pulumi.Input<pulumi.Input<EndpointOrigin>[]>;The set of origins of the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options. Each origin block supports fields documented below.
property probePath
probePath?: pulumi.Input<string>;the 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 originPath.
property profileName
profileName: pulumi.Input<string>;The CDN Profile to which to attach the CDN Endpoint.
property querystringCachingBehaviour
querystringCachingBehaviour?: pulumi.Input<string>;Sets query string caching behavior. Allowed values are IgnoreQueryString, BypassCaching and UseQueryString. Defaults to IgnoreQueryString.
property resourceGroupName
resourceGroupName: pulumi.Input<string>;The name of the resource group in which to create the CDN Endpoint.
property tags
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A mapping of tags to assign to the resource.
interface EndpointState
interface EndpointStateInput properties used for looking up and filtering Endpoint resources.
property contentTypesToCompresses
contentTypesToCompresses?: pulumi.Input<pulumi.Input<string>[]>;An array of strings that indicates a content types on which compression will be applied. The value for the elements should be MIME types.
property deliveryRules
deliveryRules?: pulumi.Input<pulumi.Input<EndpointDeliveryRule>[]>;Rules for the rules engine. An endpoint can contain up until 4 of those rules that consist of conditions and actions. A deliveryRule blocks as defined below.
property geoFilters
geoFilters?: pulumi.Input<pulumi.Input<EndpointGeoFilter>[]>;A set of Geo Filters for this CDN Endpoint. Each geoFilter block supports fields documented below.
property globalDeliveryRule
globalDeliveryRule?: pulumi.Input<EndpointGlobalDeliveryRule>;Actions that are valid for all resources regardless of any conditions. A globalDeliveryRule block as defined below.
property hostName
hostName?: pulumi.Input<string>;A string that determines the hostname/IP address of the origin server. This string can be a domain name, Storage Account endpoint, Web App endpoint, IPv4 address or IPv6 address. Changing this forces a new resource to be created.
property isCompressionEnabled
isCompressionEnabled?: pulumi.Input<boolean>;Indicates whether compression is to be enabled. Defaults to false.
property isHttpAllowed
isHttpAllowed?: pulumi.Input<boolean>;Defaults to true.
property isHttpsAllowed
isHttpsAllowed?: pulumi.Input<boolean>;Defaults to true.
property location
location?: pulumi.Input<string>;Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property name
name?: pulumi.Input<string>;The name of the origin. This is an arbitrary value. However, this value needs to be unique under the endpoint. Changing this forces a new resource to be created.
property optimizationType
optimizationType?: pulumi.Input<string>;What types of optimization should this CDN Endpoint optimize for? Possible values include DynamicSiteAcceleration, GeneralMediaStreaming, GeneralWebDelivery, LargeFileDownload and VideoOnDemandMediaStreaming.
property originHostHeader
originHostHeader?: pulumi.Input<string>;The host header CDN provider will send along with content requests to origins. Defaults to the host name of the origin.
property originPath
originPath?: pulumi.Input<string>;The path used at for origin requests.
property origins
origins?: pulumi.Input<pulumi.Input<EndpointOrigin>[]>;The set of origins of the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options. Each origin block supports fields documented below.
property probePath
probePath?: pulumi.Input<string>;the 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 originPath.
property profileName
profileName?: pulumi.Input<string>;The CDN Profile to which to attach the CDN Endpoint.
property querystringCachingBehaviour
querystringCachingBehaviour?: pulumi.Input<string>;Sets query string caching behavior. Allowed values are IgnoreQueryString, BypassCaching and UseQueryString. Defaults to IgnoreQueryString.
property resourceGroupName
resourceGroupName?: pulumi.Input<string>;The name of the resource group in which to create the CDN Endpoint.
property tags
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A mapping of tags to assign to the resource.
interface GetProfileArgs
interface GetProfileArgsA collection of arguments for invoking getProfile.
property name
name: string;The name of the CDN Profile.
property resourceGroupName
resourceGroupName: string;The name of the resource group in which the CDN Profile exists.
interface GetProfileResult
interface GetProfileResultA collection of values returned by getProfile.
property id
id: string;The provider-assigned unique ID for this managed resource.
property location
location: string;The Azure Region where the resource exists.
property name
name: string;property resourceGroupName
resourceGroupName: string;property sku
sku: string;The pricing related information of current CDN profile.
property tags
tags: {[key: string]: string};A mapping of tags assigned to the resource.
interface ProfileArgs
interface ProfileArgsThe set of arguments for constructing a Profile resource.
property location
location?: pulumi.Input<string>;Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property name
name?: pulumi.Input<string>;Specifies the name of the CDN Profile. Changing this forces a new resource to be created.
property resourceGroupName
resourceGroupName: pulumi.Input<string>;The name of the resource group in which to create the CDN Profile.
property sku
sku: pulumi.Input<string>;The pricing related information of current CDN profile. Accepted values are Standard_Akamai, Standard_ChinaCdn, Standard_Microsoft, Standard_Verizon or Premium_Verizon.
property tags
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A mapping of tags to assign to the resource.
interface ProfileState
interface ProfileStateInput properties used for looking up and filtering Profile resources.
property location
location?: pulumi.Input<string>;Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property name
name?: pulumi.Input<string>;Specifies the name of the CDN Profile. Changing this forces a new resource to be created.
property resourceGroupName
resourceGroupName?: pulumi.Input<string>;The name of the resource group in which to create the CDN Profile.
property sku
sku?: pulumi.Input<string>;The pricing related information of current CDN profile. Accepted values are Standard_Akamai, Standard_ChinaCdn, Standard_Microsoft, Standard_Verizon or Premium_Verizon.
property tags
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A mapping of tags to assign to the resource.