try {
const input = {
origin: '', // string
ttl: 0, // number
certificate_id: '', // string
custom_domain: '', // string
};
const {data:{endpoint}} = await dots.cdnEndpoint.createCdnEndpoint(input);
console.log(endpoint);
} catch (error) {
console.log(error);
}
try {
const input = {
cdn_endpoint_id: '', // string
};
const {data:{endpoint}} = await dots.cdnEndpoint.getCdnEndpoint(input);
console.log(endpoint);
} catch (error) {
console.log(error);
}
try {
const input = {
page: 1, // number
per_page: 100, // number
};
const {data:{endpoints}} = await dots.cdnEdnpoint.listCdnEndpoints(input);
console.log(endpoints);
} catch (error) {
console.log(error);
}
try {
const input = {
cdn_endpoint_id: '', // string
};
const {status} = await dots.cdnEdnpoint.deleteCdnEndpoint(input);
console.log(status);
} catch (error) {
console.log(error);
}
try {
const input = {
cdn_endpoint_id: '', // string
ttl: 0, // number
certificate_id: '', // string
custom_domain: '', // string
};
const {data:{endpoint}} = await dots.cdnEndpoint.updateCdnEndpoint(input);
console.log(endpoint);
} catch (error) {
console.log(error);
}
try {
const input = {
cdn_endpoint_id: '', // string
};
const {status} = await dots.cdnEdnpoint.purgeCache(input);
console.log(status);
} catch (error) {
console.log(error);
}