cloudflare
Version:
The official TypeScript library for the Cloudflare API
366 lines • 13.4 kB
TypeScript
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as IPSECTunnelsAPI from 'cloudflare/resources/magic-transit/ipsec-tunnels';
import * as MagicTransitAPI from 'cloudflare/resources/magic-transit/magic-transit';
export declare class IPSECTunnels extends APIResource {
/**
* Creates new IPsec tunnels associated with an account. Use `?validate_only=true`
* as an optional query parameter to only run validation without persisting
* changes.
*/
create(params: IPSECTunnelCreateParams, options?: Core.RequestOptions): Core.APIPromise<IPSECTunnelCreateResponse>;
/**
* Updates a specific IPsec tunnel associated with an account. Use
* `?validate_only=true` as an optional query parameter to only run validation
* without persisting changes.
*/
update(tunnelIdentifier: string, params: IPSECTunnelUpdateParams, options?: Core.RequestOptions): Core.APIPromise<IPSECTunnelUpdateResponse>;
/**
* Lists IPsec tunnels associated with an account.
*/
list(params: IPSECTunnelListParams, options?: Core.RequestOptions): Core.APIPromise<IPSECTunnelListResponse>;
/**
* Disables and removes a specific static IPsec Tunnel associated with an account.
* Use `?validate_only=true` as an optional query parameter to only run validation
* without persisting changes.
*/
delete(tunnelIdentifier: string, params: IPSECTunnelDeleteParams, options?: Core.RequestOptions): Core.APIPromise<IPSECTunnelDeleteResponse>;
/**
* Lists details for a specific IPsec tunnel.
*/
get(tunnelIdentifier: string, params: IPSECTunnelGetParams, options?: Core.RequestOptions): Core.APIPromise<IPSECTunnelGetResponse>;
/**
* Generates a Pre Shared Key for a specific IPsec tunnel used in the IKE session.
* Use `?validate_only=true` as an optional query parameter to only run validation
* without persisting changes. After a PSK is generated, the PSK is immediately
* persisted to Cloudflare's edge and cannot be retrieved later. Note the PSK in a
* safe place.
*/
pskGenerate(tunnelIdentifier: string, params: IPSECTunnelPSKGenerateParams, options?: Core.RequestOptions): Core.APIPromise<IPSECTunnelPSKGenerateResponse>;
}
/**
* The PSK metadata that includes when the PSK was generated.
*/
export interface PSKMetadata {
/**
* The date and time the tunnel was last modified.
*/
last_generated_on?: string;
}
export interface IPSECTunnelCreateResponse {
ipsec_tunnels?: Array<IPSECTunnelCreateResponse.IPSECTunnel>;
}
export declare namespace IPSECTunnelCreateResponse {
interface IPSECTunnel {
/**
* The IP address assigned to the Cloudflare side of the IPsec tunnel.
*/
cloudflare_endpoint: string;
/**
* A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
* of the tunnel. Select the subnet from the following private IP space:
* 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
*/
interface_address: string;
/**
* The name of the IPsec tunnel. The name cannot share a name with other tunnels.
*/
name: string;
/**
* Tunnel identifier tag.
*/
id?: string;
/**
* When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel
* (Phase 2).
*/
allow_null_cipher?: boolean;
/**
* The date and time the tunnel was created.
*/
created_on?: string;
/**
* The IP address assigned to the customer side of the IPsec tunnel. Not required,
* but must be set for proactive traceroutes to work.
*/
customer_endpoint?: string;
/**
* An optional description forthe IPsec tunnel.
*/
description?: string;
/**
* The date and time the tunnel was last modified.
*/
modified_on?: string;
/**
* The PSK metadata that includes when the PSK was generated.
*/
psk_metadata?: IPSECTunnelsAPI.PSKMetadata;
/**
* If `true`, then IPsec replay protection will be supported in the
* Cloudflare-to-customer direction.
*/
replay_protection?: boolean;
tunnel_health_check?: IPSECTunnel.TunnelHealthCheck;
}
namespace IPSECTunnel {
interface TunnelHealthCheck {
/**
* Determines whether to run healthchecks for a tunnel.
*/
enabled?: boolean;
/**
* How frequent the health check is run. The default value is `mid`.
*/
rate?: MagicTransitAPI.HealthCheckRate;
/**
* The destination address in a request type health check. After the healthcheck is
* decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
* to this address. This field defaults to `customer_gre_endpoint address`.
*/
target?: string;
/**
* The type of healthcheck to run, reply or request. The default value is `reply`.
*/
type?: MagicTransitAPI.HealthCheckType;
}
}
}
export interface IPSECTunnelUpdateResponse {
modified?: boolean;
modified_ipsec_tunnel?: unknown;
}
export interface IPSECTunnelListResponse {
ipsec_tunnels?: Array<IPSECTunnelListResponse.IPSECTunnel>;
}
export declare namespace IPSECTunnelListResponse {
interface IPSECTunnel {
/**
* The IP address assigned to the Cloudflare side of the IPsec tunnel.
*/
cloudflare_endpoint: string;
/**
* A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
* of the tunnel. Select the subnet from the following private IP space:
* 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
*/
interface_address: string;
/**
* The name of the IPsec tunnel. The name cannot share a name with other tunnels.
*/
name: string;
/**
* Tunnel identifier tag.
*/
id?: string;
/**
* When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel
* (Phase 2).
*/
allow_null_cipher?: boolean;
/**
* The date and time the tunnel was created.
*/
created_on?: string;
/**
* The IP address assigned to the customer side of the IPsec tunnel. Not required,
* but must be set for proactive traceroutes to work.
*/
customer_endpoint?: string;
/**
* An optional description forthe IPsec tunnel.
*/
description?: string;
/**
* The date and time the tunnel was last modified.
*/
modified_on?: string;
/**
* The PSK metadata that includes when the PSK was generated.
*/
psk_metadata?: IPSECTunnelsAPI.PSKMetadata;
/**
* If `true`, then IPsec replay protection will be supported in the
* Cloudflare-to-customer direction.
*/
replay_protection?: boolean;
tunnel_health_check?: IPSECTunnel.TunnelHealthCheck;
}
namespace IPSECTunnel {
interface TunnelHealthCheck {
/**
* Determines whether to run healthchecks for a tunnel.
*/
enabled?: boolean;
/**
* How frequent the health check is run. The default value is `mid`.
*/
rate?: MagicTransitAPI.HealthCheckRate;
/**
* The destination address in a request type health check. After the healthcheck is
* decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
* to this address. This field defaults to `customer_gre_endpoint address`.
*/
target?: string;
/**
* The type of healthcheck to run, reply or request. The default value is `reply`.
*/
type?: MagicTransitAPI.HealthCheckType;
}
}
}
export interface IPSECTunnelDeleteResponse {
deleted?: boolean;
deleted_ipsec_tunnel?: unknown;
}
export interface IPSECTunnelGetResponse {
ipsec_tunnel?: unknown;
}
export interface IPSECTunnelPSKGenerateResponse {
/**
* Identifier
*/
ipsec_tunnel_id?: string;
/**
* A randomly generated or provided string for use in the IPsec tunnel.
*/
psk?: string;
/**
* The PSK metadata that includes when the PSK was generated.
*/
psk_metadata?: PSKMetadata;
}
export interface IPSECTunnelCreateParams {
/**
* Path param: Identifier
*/
account_id: string;
/**
* Body param: The IP address assigned to the Cloudflare side of the IPsec tunnel.
*/
cloudflare_endpoint: string;
/**
* Body param: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for
* each side of the tunnel. Select the subnet from the following private IP space:
* 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
*/
interface_address: string;
/**
* Body param: The name of the IPsec tunnel. The name cannot share a name with
* other tunnels.
*/
name: string;
/**
* Body param: The IP address assigned to the customer side of the IPsec tunnel.
* Not required, but must be set for proactive traceroutes to work.
*/
customer_endpoint?: string;
/**
* Body param: An optional description forthe IPsec tunnel.
*/
description?: string;
/**
* Body param:
*/
health_check?: MagicTransitAPI.HealthCheck;
/**
* Body param: A randomly generated or provided string for use in the IPsec tunnel.
*/
psk?: string;
/**
* Body param: If `true`, then IPsec replay protection will be supported in the
* Cloudflare-to-customer direction.
*/
replay_protection?: boolean;
}
export interface IPSECTunnelUpdateParams {
/**
* Path param: Identifier
*/
account_id: string;
/**
* Body param: The IP address assigned to the Cloudflare side of the IPsec tunnel.
*/
cloudflare_endpoint: string;
/**
* Body param: A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for
* each side of the tunnel. Select the subnet from the following private IP space:
* 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
*/
interface_address: string;
/**
* Body param: The name of the IPsec tunnel. The name cannot share a name with
* other tunnels.
*/
name: string;
/**
* Body param: The IP address assigned to the customer side of the IPsec tunnel.
* Not required, but must be set for proactive traceroutes to work.
*/
customer_endpoint?: string;
/**
* Body param: An optional description forthe IPsec tunnel.
*/
description?: string;
/**
* Body param:
*/
health_check?: MagicTransitAPI.HealthCheck;
/**
* Body param: A randomly generated or provided string for use in the IPsec tunnel.
*/
psk?: string;
/**
* Body param: If `true`, then IPsec replay protection will be supported in the
* Cloudflare-to-customer direction.
*/
replay_protection?: boolean;
}
export interface IPSECTunnelListParams {
/**
* Identifier
*/
account_id: string;
}
export interface IPSECTunnelDeleteParams {
/**
* Path param: Identifier
*/
account_id: string;
/**
* Body param:
*/
body: unknown;
}
export interface IPSECTunnelGetParams {
/**
* Identifier
*/
account_id: string;
}
export interface IPSECTunnelPSKGenerateParams {
/**
* Path param: Identifier
*/
account_id: string;
/**
* Body param:
*/
body: unknown;
}
export declare namespace IPSECTunnels {
export import PSKMetadata = IPSECTunnelsAPI.PSKMetadata;
export import IPSECTunnelCreateResponse = IPSECTunnelsAPI.IPSECTunnelCreateResponse;
export import IPSECTunnelUpdateResponse = IPSECTunnelsAPI.IPSECTunnelUpdateResponse;
export import IPSECTunnelListResponse = IPSECTunnelsAPI.IPSECTunnelListResponse;
export import IPSECTunnelDeleteResponse = IPSECTunnelsAPI.IPSECTunnelDeleteResponse;
export import IPSECTunnelGetResponse = IPSECTunnelsAPI.IPSECTunnelGetResponse;
export import IPSECTunnelPSKGenerateResponse = IPSECTunnelsAPI.IPSECTunnelPSKGenerateResponse;
export import IPSECTunnelCreateParams = IPSECTunnelsAPI.IPSECTunnelCreateParams;
export import IPSECTunnelUpdateParams = IPSECTunnelsAPI.IPSECTunnelUpdateParams;
export import IPSECTunnelListParams = IPSECTunnelsAPI.IPSECTunnelListParams;
export import IPSECTunnelDeleteParams = IPSECTunnelsAPI.IPSECTunnelDeleteParams;
export import IPSECTunnelGetParams = IPSECTunnelsAPI.IPSECTunnelGetParams;
export import IPSECTunnelPSKGenerateParams = IPSECTunnelsAPI.IPSECTunnelPSKGenerateParams;
}
//# sourceMappingURL=ipsec-tunnels.d.ts.map