Module cdn
@pulumi/azure > cdn
Index ▹
class Endpoint
extends CustomResource
A CDN Endpoint is the entity within a CDN Profile containing configuration information regarding caching behaviors 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";
import * as random from "@pulumi/random";
const testResourceGroup = new azure.core.ResourceGroup("test", {
location: "West US",
});
const server = new random.RandomId("server", {
byteLength: 8,
keepers: {
azi_id: 1,
},
});
const testProfile = new azure.cdn.Profile("test", {
location: testResourceGroup.location,
resourceGroupName: testResourceGroup.name,
sku: "Standard_Verizon",
});
const testEndpoint = new azure.cdn.Endpoint("test", {
location: testResourceGroup.location,
origins: [{
hostName: "www.example.com",
name: "exampleCdnOrigin",
}],
profileName: testProfile.name,
resourceGroupName: testResourceGroup.name,
});
constructor
new Endpoint(name: string, args: EndpointArgs, opts?: pulumi.CustomResourceOptions)
Create a Endpoint resource with the given unique name, arguments, and options.
name
The unique name of the resource.args
The arguments to use to populate this resource's properties.opts
A 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): Endpoint
Get an existing Endpoint resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
method isInstance
static isInstance(obj: any): boolean
Returns true if the given object is an instance of CustomResource. 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 geoFilters
public geoFilters: pulumi.Output<{ action: string; countryCodes: string[]; relativePath: string; }[] | undefined>;
A set of Geo Filters for this CDN Endpoint. Each geo_filter
block supports fields documented below.
property hostName
public hostName: pulumi.Output<string>;
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>;
Specifies the name of the CDN 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>;
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<{ hostName: string; httpPort: number; httpsPort: number; name: string; }[]>;
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 origin_path
.
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]: any}>;
A mapping of tags to assign to the resource.
property urn
class Profile
extends CustomResource
Manage 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 testResourceGroup = new azure.core.ResourceGroup("test", {
location: "West US",
});
const testProfile = new azure.cdn.Profile("test", {
location: "West US",
resourceGroupName: testResourceGroup.name,
sku: "Standard_Verizon",
tags: {
cost_center: "MSFT",
environment: "Production",
},
});
constructor
new Profile(name: string, args: ProfileArgs, opts?: pulumi.CustomResourceOptions)
Create a Profile resource with the given unique name, arguments, and options.
name
The unique name of the resource.args
The arguments to use to populate this resource's properties.opts
A 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): Profile
Get an existing Profile resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
method isInstance
static isInstance(obj: any): boolean
Returns true if the given object is an instance of CustomResource. 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]: any}>;
A mapping of tags to assign to the resource.
property urn
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 test = pulumi.output(azure.cdn.getProfile({
name: "myfirstcdnprofile",
resourceGroupName: "example-resources",
}));
export const cdnProfileId = test.apply(test => test.id);
interface EndpointArgs
The 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 geoFilters
geoFilters?: pulumi.Input<pulumi.Input<{ action: pulumi.Input<string>; countryCodes: pulumi.Input<pulumi.Input<string>[]>; relativePath: pulumi.Input<string>; }>[]>;
A set of Geo Filters for this CDN Endpoint. Each geo_filter
block supports fields documented 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>;
Specifies the name of the CDN 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<{ hostName: pulumi.Input<string>; httpPort: pulumi.Input<number>; httpsPort: pulumi.Input<number>; name: pulumi.Input<string>; }>[]>;
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 origin_path
.
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]: any}>;
A mapping of tags to assign to the resource.
interface EndpointState
Input 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 geoFilters
geoFilters?: pulumi.Input<pulumi.Input<{ action: pulumi.Input<string>; countryCodes: pulumi.Input<pulumi.Input<string>[]>; relativePath: pulumi.Input<string>; }>[]>;
A set of Geo Filters for this CDN Endpoint. Each geo_filter
block supports fields documented below.
property hostName
hostName?: pulumi.Input<string>;
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>;
Specifies the name of the CDN 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<{ hostName: pulumi.Input<string>; httpPort: pulumi.Input<number>; httpsPort: pulumi.Input<number>; name: pulumi.Input<string>; }>[]>;
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 origin_path
.
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]: any}>;
A mapping of tags to assign to the resource.
interface GetProfileArgs
A 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
A collection of values returned by getProfile.
property id
id: string;
id is the provider-assigned unique ID for this managed resource.
property location
location: string;
The Azure Region where the resource exists.
property sku
sku: string;
The pricing related information of current CDN profile.
property tags
interface ProfileArgs
The 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]: any}>;
A mapping of tags to assign to the resource.
interface ProfileState
Input 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]: any}>;
A mapping of tags to assign to the resource.