Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

@salesforce/b2c-tooling-sdk / clients / CdnZonesClient

Type Alias: CdnZonesClient

CdnZonesClient = Client<paths>

Defined in: packages/b2c-tooling-sdk/src/clients/cdn-zones.ts:71

The typed CDN Zones client for eCDN management.

Common Endpoints

MethodPathDescription
GET/organizations/{organizationId}/zones/infoList all zones
GET/organizations/{organizationId}/zones/{zoneId}/certificatesGet zone certificates
POST/organizations/{organizationId}/zones/{zoneId}/cachepurgePurge cache
GET/organizations/{organizationId}/zones/{zoneId}/firewall/wafGet WAF settings
GET/organizations/{organizationId}/zones/{zoneId}/speedGet speed settings

Example

typescript
import { createCdnZonesClient, toOrganizationId } from '@salesforce/b2c-tooling-sdk/clients';
import { OAuthStrategy } from '@salesforce/b2c-tooling-sdk/auth';

const auth = new OAuthStrategy({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
});

const client = createCdnZonesClient(
  { shortCode: 'kv7kzm78', tenantId: 'zzxy_prd' },
  auth
);

// List all zones
const { data, error } = await client.GET('/organizations/{organizationId}/zones/info', {
  params: { path: { organizationId: toOrganizationId('zzxy_prd') } }
});

See

Released under the Apache-2.0 License.