cloudflare
Version:
The official TypeScript library for the Cloudflare API
194 lines • 5.45 kB
TypeScript
import { APIResource } from "../../../core/resource.js";
import * as SippyAPI from "../buckets/sippy.js";
import { APIPromise } from "../../../core/api-promise.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class BaseConnectivityPrecheck extends APIResource {
static readonly _key: readonly ['r2', 'superSlurper', 'connectivityPrecheck'];
/**
* Check whether tokens are valid against the source bucket
*
* @example
* ```ts
* const response =
* await client.r2.superSlurper.connectivityPrecheck.source({
* account_id: 'account_id',
* bucket: 'bucket',
* secret: {
* accessKeyId: 'accessKeyId',
* secretAccessKey: 'secretAccessKey',
* },
* vendor: 's3',
* });
* ```
*/
source(params: ConnectivityPrecheckSourceParams, options?: RequestOptions): APIPromise<ConnectivityPrecheckSourceResponse>;
/**
* Check whether tokens are valid against the target bucket
*
* @example
* ```ts
* const response =
* await client.r2.superSlurper.connectivityPrecheck.target({
* account_id: 'account_id',
* bucket: 'bucket',
* secret: {
* accessKeyId: 'accessKeyId',
* secretAccessKey: 'secretAccessKey',
* },
* vendor: 'r2',
* });
* ```
*/
target(params: ConnectivityPrecheckTargetParams, options?: RequestOptions): APIPromise<ConnectivityPrecheckTargetResponse>;
}
export declare class ConnectivityPrecheck extends BaseConnectivityPrecheck {
}
export interface ConnectivityPrecheckSourceResponse {
connectivityStatus?: 'success' | 'error';
}
export interface ConnectivityPrecheckTargetResponse {
connectivityStatus?: 'success' | 'error';
}
export type ConnectivityPrecheckSourceParams = ConnectivityPrecheckSourceParams.R2SlurperS3SourceSchema | ConnectivityPrecheckSourceParams.R2SlurperGcsSourceSchema | ConnectivityPrecheckSourceParams.R2SlurperR2SourceSchema;
export declare namespace ConnectivityPrecheckSourceParams {
interface R2SlurperS3SourceSchema {
/**
* Path param
*/
account_id: string;
/**
* Body param
*/
bucket: string;
/**
* Body param
*/
secret: R2SlurperS3SourceSchema.Secret;
/**
* Body param
*/
vendor: 's3';
/**
* Body param: Custom S3-compatible endpoint that must use https://.
*/
endpoint?: string | null;
/**
* Body param
*/
keys?: Array<string> | null;
/**
* Body param
*/
pathPrefix?: string | null;
/**
* Body param
*/
region?: string | null;
}
namespace R2SlurperS3SourceSchema {
interface Secret {
accessKeyId: string;
secretAccessKey: string;
}
}
interface R2SlurperGcsSourceSchema {
/**
* Path param
*/
account_id: string;
/**
* Body param
*/
bucket: string;
/**
* Body param
*/
secret: R2SlurperGcsSourceSchema.Secret;
/**
* Body param
*/
vendor: 'gcs';
/**
* Body param
*/
keys?: Array<string> | null;
/**
* Body param
*/
pathPrefix?: string | null;
}
namespace R2SlurperGcsSourceSchema {
interface Secret {
clientEmail: string;
privateKey: string;
}
}
interface R2SlurperR2SourceSchema {
/**
* Path param
*/
account_id: string;
/**
* Body param
*/
bucket: string;
/**
* Body param
*/
secret: R2SlurperR2SourceSchema.Secret;
/**
* Body param
*/
vendor: SippyAPI.ProviderParam;
/**
* Body param
*/
jurisdiction?: 'default' | 'eu' | 'us' | 'fedramp';
/**
* Body param
*/
keys?: Array<string> | null;
/**
* Body param
*/
pathPrefix?: string | null;
}
namespace R2SlurperR2SourceSchema {
interface Secret {
accessKeyId: string;
secretAccessKey: string;
}
}
}
export interface ConnectivityPrecheckTargetParams {
/**
* Path param
*/
account_id: string;
/**
* Body param
*/
bucket: string;
/**
* Body param
*/
secret: ConnectivityPrecheckTargetParams.Secret;
/**
* Body param
*/
vendor: SippyAPI.ProviderParam;
/**
* Body param
*/
jurisdiction?: 'default' | 'eu' | 'us' | 'fedramp';
}
export declare namespace ConnectivityPrecheckTargetParams {
interface Secret {
accessKeyId: string;
secretAccessKey: string;
}
}
export declare namespace ConnectivityPrecheck {
export { type ConnectivityPrecheckSourceResponse as ConnectivityPrecheckSourceResponse, type ConnectivityPrecheckTargetResponse as ConnectivityPrecheckTargetResponse, type ConnectivityPrecheckSourceParams as ConnectivityPrecheckSourceParams, type ConnectivityPrecheckTargetParams as ConnectivityPrecheckTargetParams, };
}
//# sourceMappingURL=connectivity-precheck.d.ts.map