Settings hold the values of all client options.

interface Settings {
    apiURL: string;
    defaultOrganizationId?: string;
    defaultPageSize?: number;
    defaultProjectId?: string;
    defaultRegion?: Region;
    defaultZone?: Zone;
    httpClient: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | Request | URL, init?: RequestInit): Promise<Response>;
    };
    interceptors: NetworkInterceptors[];
    requestInterceptors?: RequestInterceptor[];
    responseInterceptors?: ResponseInterceptor[];
    userAgent: string;
}

Hierarchy (view full)

Properties

apiURL: string

APIURL overrides the API URL of the Scaleway API to the given URL. Change that if you want to direct requests to a different endpoint.

https://api.scaleway.com

defaultOrganizationId?: string

Your organization ID is the identifier of your account inside Scaleway infrastructure.

defaultPageSize?: number

The default number of results when requesting a paginated resource.

defaultProjectId?: string

Your project ID is the identifier of the project your resources are attached to.

defaultRegion?: Region

A region is represented as a geographical area such as France (Paris) or the Netherlands (Amsterdam). It can contain multiple availability zones.

Examples: fr-par, nl-ams.

defaultZone?: Zone

A region can be split into many availability zones (AZ). Latency between multiple AZ of the same region are low as they have a common network layer.

Examples: fr-par-1, nl-ams-1

httpClient: {
    (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
    (input: string | Request | URL, init?: RequestInit): Promise<Response>;
}

HTTP Client doing the requests.

Type declaration

    • (input, init?): Promise<Response>
    • Parameters

      • input: URL | RequestInfo
      • Optionalinit: RequestInit

      Returns Promise<Response>

    • (input, init?): Promise<Response>
    • Parameters

      • input: string | Request | URL
      • Optionalinit: RequestInit

      Returns Promise<Response>

interceptors: NetworkInterceptors[]

The Network interceptors.

requestInterceptors?: RequestInterceptor[]

The Request interceptors.

Please use interceptors instead.

responseInterceptors?: ResponseInterceptor[]

The Response interceptors.

Please use interceptors instead.

userAgent: string

The User-Agent sent with each request.

scaleway-sdk-js/version