UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

807 lines 25.5 kB
import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as LANsAPI from 'cloudflare/resources/magic-transit/sites/lans'; export declare class LANs extends APIResource { /** * Creates a new LAN. If the site is in high availability mode, static_addressing * is required along with secondary and virtual address. */ create(siteId: string, params: LANCreateParams, options?: Core.RequestOptions): Core.APIPromise<LANCreateResponse>; /** * Update a specific LAN. */ update(siteId: string, lanId: string, params: LANUpdateParams, options?: Core.RequestOptions): Core.APIPromise<LANUpdateResponse>; /** * Lists LANs associated with an account and site. */ list(siteId: string, params: LANListParams, options?: Core.RequestOptions): Core.APIPromise<LANListResponse>; /** * Remove a specific LAN. */ delete(siteId: string, lanId: string, params: LANDeleteParams, options?: Core.RequestOptions): Core.APIPromise<LANDeleteResponse>; /** * Get a specific LAN. */ get(siteId: string, lanId: string, params: LANGetParams, options?: Core.RequestOptions): Core.APIPromise<LANGetResponse>; } export interface LANCreateResponse { lans?: Array<LANCreateResponse.LAN>; } export declare namespace LANCreateResponse { interface LAN { /** * Identifier */ id?: string; description?: string; /** * mark true to use this LAN for HA probing. only works for site with HA turned on. * only one LAN can be set as the ha_link. */ ha_link?: boolean; nat?: LAN.Nat; physport?: number; routed_subnets?: Array<LAN.RoutedSubnet>; /** * Identifier */ site_id?: string; /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ static_addressing?: LAN.StaticAddressing; /** * VLAN port number. */ vlan_tag?: number; } namespace LAN { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } interface RoutedSubnet { /** * A valid IPv4 address. */ next_hop: string; /** * A valid CIDR notation representing an IP range. */ prefix: string; nat?: RoutedSubnet.Nat; } namespace RoutedSubnet { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } } /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ interface StaticAddressing { /** * A valid CIDR notation representing an IP range. */ address: string; dhcp_relay?: StaticAddressing.DhcpRelay; dhcp_server?: StaticAddressing.DhcpServer; /** * A valid CIDR notation representing an IP range. */ secondary_address?: string; /** * A valid CIDR notation representing an IP range. */ virtual_address?: string; } namespace StaticAddressing { interface DhcpRelay { /** * List of DHCP server IPs. */ server_addresses?: Array<string>; } interface DhcpServer { /** * A valid IPv4 address. */ dhcp_pool_end?: string; /** * A valid IPv4 address. */ dhcp_pool_start?: string; /** * A valid IPv4 address. */ dns_server?: string; /** * Mapping of MAC addresses to IP addresses */ reservations?: Record<string, string>; } } } } export interface LANUpdateResponse { lan?: LANUpdateResponse.LAN; } export declare namespace LANUpdateResponse { interface LAN { /** * Identifier */ id?: string; description?: string; /** * mark true to use this LAN for HA probing. only works for site with HA turned on. * only one LAN can be set as the ha_link. */ ha_link?: boolean; nat?: LAN.Nat; physport?: number; routed_subnets?: Array<LAN.RoutedSubnet>; /** * Identifier */ site_id?: string; /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ static_addressing?: LAN.StaticAddressing; /** * VLAN port number. */ vlan_tag?: number; } namespace LAN { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } interface RoutedSubnet { /** * A valid IPv4 address. */ next_hop: string; /** * A valid CIDR notation representing an IP range. */ prefix: string; nat?: RoutedSubnet.Nat; } namespace RoutedSubnet { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } } /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ interface StaticAddressing { /** * A valid CIDR notation representing an IP range. */ address: string; dhcp_relay?: StaticAddressing.DhcpRelay; dhcp_server?: StaticAddressing.DhcpServer; /** * A valid CIDR notation representing an IP range. */ secondary_address?: string; /** * A valid CIDR notation representing an IP range. */ virtual_address?: string; } namespace StaticAddressing { interface DhcpRelay { /** * List of DHCP server IPs. */ server_addresses?: Array<string>; } interface DhcpServer { /** * A valid IPv4 address. */ dhcp_pool_end?: string; /** * A valid IPv4 address. */ dhcp_pool_start?: string; /** * A valid IPv4 address. */ dns_server?: string; /** * Mapping of MAC addresses to IP addresses */ reservations?: Record<string, string>; } } } } export interface LANListResponse { lans?: Array<LANListResponse.LAN>; } export declare namespace LANListResponse { interface LAN { /** * Identifier */ id?: string; description?: string; /** * mark true to use this LAN for HA probing. only works for site with HA turned on. * only one LAN can be set as the ha_link. */ ha_link?: boolean; nat?: LAN.Nat; physport?: number; routed_subnets?: Array<LAN.RoutedSubnet>; /** * Identifier */ site_id?: string; /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ static_addressing?: LAN.StaticAddressing; /** * VLAN port number. */ vlan_tag?: number; } namespace LAN { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } interface RoutedSubnet { /** * A valid IPv4 address. */ next_hop: string; /** * A valid CIDR notation representing an IP range. */ prefix: string; nat?: RoutedSubnet.Nat; } namespace RoutedSubnet { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } } /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ interface StaticAddressing { /** * A valid CIDR notation representing an IP range. */ address: string; dhcp_relay?: StaticAddressing.DhcpRelay; dhcp_server?: StaticAddressing.DhcpServer; /** * A valid CIDR notation representing an IP range. */ secondary_address?: string; /** * A valid CIDR notation representing an IP range. */ virtual_address?: string; } namespace StaticAddressing { interface DhcpRelay { /** * List of DHCP server IPs. */ server_addresses?: Array<string>; } interface DhcpServer { /** * A valid IPv4 address. */ dhcp_pool_end?: string; /** * A valid IPv4 address. */ dhcp_pool_start?: string; /** * A valid IPv4 address. */ dns_server?: string; /** * Mapping of MAC addresses to IP addresses */ reservations?: Record<string, string>; } } } } export interface LANDeleteResponse { deleted?: boolean; deleted_lan?: LANDeleteResponse.DeletedLAN; } export declare namespace LANDeleteResponse { interface DeletedLAN { /** * Identifier */ id?: string; description?: string; /** * mark true to use this LAN for HA probing. only works for site with HA turned on. * only one LAN can be set as the ha_link. */ ha_link?: boolean; nat?: DeletedLAN.Nat; physport?: number; routed_subnets?: Array<DeletedLAN.RoutedSubnet>; /** * Identifier */ site_id?: string; /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ static_addressing?: DeletedLAN.StaticAddressing; /** * VLAN port number. */ vlan_tag?: number; } namespace DeletedLAN { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } interface RoutedSubnet { /** * A valid IPv4 address. */ next_hop: string; /** * A valid CIDR notation representing an IP range. */ prefix: string; nat?: RoutedSubnet.Nat; } namespace RoutedSubnet { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } } /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ interface StaticAddressing { /** * A valid CIDR notation representing an IP range. */ address: string; dhcp_relay?: StaticAddressing.DhcpRelay; dhcp_server?: StaticAddressing.DhcpServer; /** * A valid CIDR notation representing an IP range. */ secondary_address?: string; /** * A valid CIDR notation representing an IP range. */ virtual_address?: string; } namespace StaticAddressing { interface DhcpRelay { /** * List of DHCP server IPs. */ server_addresses?: Array<string>; } interface DhcpServer { /** * A valid IPv4 address. */ dhcp_pool_end?: string; /** * A valid IPv4 address. */ dhcp_pool_start?: string; /** * A valid IPv4 address. */ dns_server?: string; /** * Mapping of MAC addresses to IP addresses */ reservations?: Record<string, string>; } } } } export interface LANGetResponse { lan?: LANGetResponse.LAN; } export declare namespace LANGetResponse { interface LAN { /** * Identifier */ id?: string; description?: string; /** * mark true to use this LAN for HA probing. only works for site with HA turned on. * only one LAN can be set as the ha_link. */ ha_link?: boolean; nat?: LAN.Nat; physport?: number; routed_subnets?: Array<LAN.RoutedSubnet>; /** * Identifier */ site_id?: string; /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ static_addressing?: LAN.StaticAddressing; /** * VLAN port number. */ vlan_tag?: number; } namespace LAN { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } interface RoutedSubnet { /** * A valid IPv4 address. */ next_hop: string; /** * A valid CIDR notation representing an IP range. */ prefix: string; nat?: RoutedSubnet.Nat; } namespace RoutedSubnet { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } } /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ interface StaticAddressing { /** * A valid CIDR notation representing an IP range. */ address: string; dhcp_relay?: StaticAddressing.DhcpRelay; dhcp_server?: StaticAddressing.DhcpServer; /** * A valid CIDR notation representing an IP range. */ secondary_address?: string; /** * A valid CIDR notation representing an IP range. */ virtual_address?: string; } namespace StaticAddressing { interface DhcpRelay { /** * List of DHCP server IPs. */ server_addresses?: Array<string>; } interface DhcpServer { /** * A valid IPv4 address. */ dhcp_pool_end?: string; /** * A valid IPv4 address. */ dhcp_pool_start?: string; /** * A valid IPv4 address. */ dns_server?: string; /** * Mapping of MAC addresses to IP addresses */ reservations?: Record<string, string>; } } } } export interface LANCreateParams { /** * Path param: Identifier */ account_id: string; /** * Body param: */ lan?: LANCreateParams.LAN; } export declare namespace LANCreateParams { interface LAN { physport: number; /** * VLAN port number. */ vlan_tag: number; description?: string; /** * mark true to use this LAN for HA probing. only works for site with HA turned on. * only one LAN can be set as the ha_link. */ ha_link?: boolean; nat?: LAN.Nat; routed_subnets?: Array<LAN.RoutedSubnet>; /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ static_addressing?: LAN.StaticAddressing; } namespace LAN { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } interface RoutedSubnet { /** * A valid IPv4 address. */ next_hop: string; /** * A valid CIDR notation representing an IP range. */ prefix: string; nat?: RoutedSubnet.Nat; } namespace RoutedSubnet { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } } /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ interface StaticAddressing { /** * A valid CIDR notation representing an IP range. */ address: string; dhcp_relay?: StaticAddressing.DhcpRelay; dhcp_server?: StaticAddressing.DhcpServer; /** * A valid CIDR notation representing an IP range. */ secondary_address?: string; /** * A valid CIDR notation representing an IP range. */ virtual_address?: string; } namespace StaticAddressing { interface DhcpRelay { /** * List of DHCP server IPs. */ server_addresses?: Array<string>; } interface DhcpServer { /** * A valid IPv4 address. */ dhcp_pool_end?: string; /** * A valid IPv4 address. */ dhcp_pool_start?: string; /** * A valid IPv4 address. */ dns_server?: string; /** * Mapping of MAC addresses to IP addresses */ reservations?: Record<string, string>; } } } } export interface LANUpdateParams { /** * Path param: Identifier */ account_id: string; /** * Body param: */ lan?: LANUpdateParams.LAN; } export declare namespace LANUpdateParams { interface LAN { description?: string; nat?: LAN.Nat; physport?: number; routed_subnets?: Array<LAN.RoutedSubnet>; /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ static_addressing?: LAN.StaticAddressing; /** * VLAN port number. */ vlan_tag?: number; } namespace LAN { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } interface RoutedSubnet { /** * A valid IPv4 address. */ next_hop: string; /** * A valid CIDR notation representing an IP range. */ prefix: string; nat?: RoutedSubnet.Nat; } namespace RoutedSubnet { interface Nat { /** * A valid CIDR notation representing an IP range. */ static_prefix?: string; } } /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ interface StaticAddressing { /** * A valid CIDR notation representing an IP range. */ address: string; dhcp_relay?: StaticAddressing.DhcpRelay; dhcp_server?: StaticAddressing.DhcpServer; /** * A valid CIDR notation representing an IP range. */ secondary_address?: string; /** * A valid CIDR notation representing an IP range. */ virtual_address?: string; } namespace StaticAddressing { interface DhcpRelay { /** * List of DHCP server IPs. */ server_addresses?: Array<string>; } interface DhcpServer { /** * A valid IPv4 address. */ dhcp_pool_end?: string; /** * A valid IPv4 address. */ dhcp_pool_start?: string; /** * A valid IPv4 address. */ dns_server?: string; /** * Mapping of MAC addresses to IP addresses */ reservations?: Record<string, string>; } } } } export interface LANListParams { /** * Identifier */ account_id: string; } export interface LANDeleteParams { /** * Identifier */ account_id: string; } export interface LANGetParams { /** * Identifier */ account_id: string; } export declare namespace LANs { export import LANCreateResponse = LANsAPI.LANCreateResponse; export import LANUpdateResponse = LANsAPI.LANUpdateResponse; export import LANListResponse = LANsAPI.LANListResponse; export import LANDeleteResponse = LANsAPI.LANDeleteResponse; export import LANGetResponse = LANsAPI.LANGetResponse; export import LANCreateParams = LANsAPI.LANCreateParams; export import LANUpdateParams = LANsAPI.LANUpdateParams; export import LANListParams = LANsAPI.LANListParams; export import LANDeleteParams = LANsAPI.LANDeleteParams; export import LANGetParams = LANsAPI.LANGetParams; } //# sourceMappingURL=lans.d.ts.map