Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Latest commit

 

History

History
169 lines (98 loc) · 4.25 KB

_modules_cdn_.cdn.md

File metadata and controls

169 lines (98 loc) · 4.25 KB

do-wrapper

Globals / "modules/cdn" / CDN

Class: CDN

Hierarchy

Index

Constructors

Methods

Constructors

constructor

+ new CDN(pageSize: number, requestHelper: RequestHelper): CDN

Overrides BaseModule.constructor

Defined in modules/cdn.ts:6

Parameters:

Name Type
pageSize number
requestHelper RequestHelper

Returns: CDN

Methods

createEndpoint

createEndpoint(origin: string, ttl: number): Promise<any>

Defined in modules/cdn.ts:52

Create a new CDN Endpoint

Parameters:

Name Type Description
origin string The origin server address (FQDN) which provides the content for the CDN
ttl number The amount of time (seconds) the content is cached by the CDN's edge servers. Defaults to 3600 (one hour)

Returns: Promise<any>

Promise


deleteEndpoint

deleteEndpoint(endpointId: string): Promise<any>

Defined in modules/cdn.ts:85

Delete an existing CDN Endpoint

Parameters:

Name Type Description
endpointId string the identifier of the CDN Endpoint you wish to update

Returns: Promise<any>


getAllEndpoints

getAllEndpoints(tagName: string, includeAll?: boolean, page?: number, pageSize?: number): Promise<any>

Defined in modules/cdn.ts:20

Get all CDN Endpoints

Parameters:

Name Type Default value Description
tagName string - filter to only return CDN Endpoints with a given tag
includeAll boolean false -
page number 1 -
pageSize number this.pageSize -

Returns: Promise<any>

Promise


getEndpointById

getEndpointById(endpointId: string): Promise<any>

Defined in modules/cdn.ts:39

Get a CDN Endpoint via its Id

Parameters:

Name Type Description
endpointId string the identifier of the endpoint to retrieve

Returns: Promise<any>

Promise


purgeEndpointCache

purgeEndpointCache(endpointId: string, fileNames: string[]): Promise<any>

Defined in modules/cdn.ts:99

Purge cached content from an existing CDN Endpoint

Parameters:

Name Type Description
endpointId string the identifier of the CDN Endpoint to purge the cache on
fileNames string[] an array of path strings to clear purge from the cache

Returns: Promise<any>

Promise


updateEndpointTtl

updateEndpointTtl(endpointId: string, ttl: number): Promise<any>

Defined in modules/cdn.ts:70

Update the TTL of an existing CDN Endpoint

Parameters:

Name Type Description
endpointId string the identifier of the CDN Endpoint you wish to update
ttl number the amount of time (seconds) the content is cached by the CDN's edge servers

Returns: Promise<any>

Promise