cloudflare
Version:
The official TypeScript library for the Cloudflare API
399 lines • 11 kB
TypeScript
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as WANsAPI from 'cloudflare/resources/magic-transit/sites/wans';
export declare class WANs extends APIResource {
/**
* Creates a new WAN.
*/
create(siteId: string, params: WANCreateParams, options?: Core.RequestOptions): Core.APIPromise<WANCreateResponse>;
/**
* Update a specific WAN.
*/
update(siteId: string, wanId: string, params: WANUpdateParams, options?: Core.RequestOptions): Core.APIPromise<WANUpdateResponse>;
/**
* Lists WANs associated with an account and site.
*/
list(siteId: string, params: WANListParams, options?: Core.RequestOptions): Core.APIPromise<WANListResponse>;
/**
* Remove a specific WAN.
*/
delete(siteId: string, wanId: string, params: WANDeleteParams, options?: Core.RequestOptions): Core.APIPromise<WANDeleteResponse>;
/**
* Get a specific WAN.
*/
get(siteId: string, wanId: string, params: WANGetParams, options?: Core.RequestOptions): Core.APIPromise<WANGetResponse>;
}
export interface WANCreateResponse {
wans?: Array<WANCreateResponse.WAN>;
}
export declare namespace WANCreateResponse {
interface WAN {
/**
* Identifier
*/
id?: string;
description?: string;
physport?: number;
/**
* Priority of WAN for traffic loadbalancing.
*/
priority?: number;
/**
* Identifier
*/
site_id?: string;
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
static_addressing?: WAN.StaticAddressing;
/**
* VLAN port number.
*/
vlan_tag?: number;
}
namespace WAN {
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
interface StaticAddressing {
/**
* A valid CIDR notation representing an IP range.
*/
address: string;
/**
* A valid IPv4 address.
*/
gateway_address: string;
/**
* A valid CIDR notation representing an IP range.
*/
secondary_address?: string;
}
}
}
export interface WANUpdateResponse {
wan?: WANUpdateResponse.WAN;
}
export declare namespace WANUpdateResponse {
interface WAN {
/**
* Identifier
*/
id?: string;
description?: string;
physport?: number;
/**
* Priority of WAN for traffic loadbalancing.
*/
priority?: number;
/**
* Identifier
*/
site_id?: string;
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
static_addressing?: WAN.StaticAddressing;
/**
* VLAN port number.
*/
vlan_tag?: number;
}
namespace WAN {
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
interface StaticAddressing {
/**
* A valid CIDR notation representing an IP range.
*/
address: string;
/**
* A valid IPv4 address.
*/
gateway_address: string;
/**
* A valid CIDR notation representing an IP range.
*/
secondary_address?: string;
}
}
}
export interface WANListResponse {
wans?: Array<WANListResponse.WAN>;
}
export declare namespace WANListResponse {
interface WAN {
/**
* Identifier
*/
id?: string;
description?: string;
physport?: number;
/**
* Priority of WAN for traffic loadbalancing.
*/
priority?: number;
/**
* Identifier
*/
site_id?: string;
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
static_addressing?: WAN.StaticAddressing;
/**
* VLAN port number.
*/
vlan_tag?: number;
}
namespace WAN {
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
interface StaticAddressing {
/**
* A valid CIDR notation representing an IP range.
*/
address: string;
/**
* A valid IPv4 address.
*/
gateway_address: string;
/**
* A valid CIDR notation representing an IP range.
*/
secondary_address?: string;
}
}
}
export interface WANDeleteResponse {
deleted?: boolean;
deleted_wan?: WANDeleteResponse.DeletedWAN;
}
export declare namespace WANDeleteResponse {
interface DeletedWAN {
/**
* Identifier
*/
id?: string;
description?: string;
physport?: number;
/**
* Priority of WAN for traffic loadbalancing.
*/
priority?: number;
/**
* Identifier
*/
site_id?: string;
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
static_addressing?: DeletedWAN.StaticAddressing;
/**
* VLAN port number.
*/
vlan_tag?: number;
}
namespace DeletedWAN {
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
interface StaticAddressing {
/**
* A valid CIDR notation representing an IP range.
*/
address: string;
/**
* A valid IPv4 address.
*/
gateway_address: string;
/**
* A valid CIDR notation representing an IP range.
*/
secondary_address?: string;
}
}
}
export interface WANGetResponse {
wan?: WANGetResponse.WAN;
}
export declare namespace WANGetResponse {
interface WAN {
/**
* Identifier
*/
id?: string;
description?: string;
physport?: number;
/**
* Priority of WAN for traffic loadbalancing.
*/
priority?: number;
/**
* Identifier
*/
site_id?: string;
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
static_addressing?: WAN.StaticAddressing;
/**
* VLAN port number.
*/
vlan_tag?: number;
}
namespace WAN {
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
interface StaticAddressing {
/**
* A valid CIDR notation representing an IP range.
*/
address: string;
/**
* A valid IPv4 address.
*/
gateway_address: string;
/**
* A valid CIDR notation representing an IP range.
*/
secondary_address?: string;
}
}
}
export interface WANCreateParams {
/**
* Path param: Identifier
*/
account_id: string;
/**
* Body param:
*/
wan?: WANCreateParams.WAN;
}
export declare namespace WANCreateParams {
interface WAN {
physport: number;
/**
* VLAN port number.
*/
vlan_tag: number;
description?: string;
priority?: number;
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
static_addressing?: WAN.StaticAddressing;
}
namespace WAN {
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
interface StaticAddressing {
/**
* A valid CIDR notation representing an IP range.
*/
address: string;
/**
* A valid IPv4 address.
*/
gateway_address: string;
/**
* A valid CIDR notation representing an IP range.
*/
secondary_address?: string;
}
}
}
export interface WANUpdateParams {
/**
* Path param: Identifier
*/
account_id: string;
/**
* Body param:
*/
wan?: WANUpdateParams.WAN;
}
export declare namespace WANUpdateParams {
interface WAN {
description?: string;
physport?: number;
priority?: number;
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
static_addressing?: WAN.StaticAddressing;
/**
* VLAN port number.
*/
vlan_tag?: number;
}
namespace WAN {
/**
* (optional) if omitted, use DHCP. Submit secondary_address when site is in high
* availability mode.
*/
interface StaticAddressing {
/**
* A valid CIDR notation representing an IP range.
*/
address: string;
/**
* A valid IPv4 address.
*/
gateway_address: string;
/**
* A valid CIDR notation representing an IP range.
*/
secondary_address?: string;
}
}
}
export interface WANListParams {
/**
* Identifier
*/
account_id: string;
}
export interface WANDeleteParams {
/**
* Identifier
*/
account_id: string;
}
export interface WANGetParams {
/**
* Identifier
*/
account_id: string;
}
export declare namespace WANs {
export import WANCreateResponse = WANsAPI.WANCreateResponse;
export import WANUpdateResponse = WANsAPI.WANUpdateResponse;
export import WANListResponse = WANsAPI.WANListResponse;
export import WANDeleteResponse = WANsAPI.WANDeleteResponse;
export import WANGetResponse = WANsAPI.WANGetResponse;
export import WANCreateParams = WANsAPI.WANCreateParams;
export import WANUpdateParams = WANsAPI.WANUpdateParams;
export import WANListParams = WANsAPI.WANListParams;
export import WANDeleteParams = WANsAPI.WANDeleteParams;
export import WANGetParams = WANsAPI.WANGetParams;
}
//# sourceMappingURL=wans.d.ts.map