Creates a Scaleway client with a profile.
Creates a client with credentials & default values (see https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/):
import { createClient } from '@scaleway/sdk'createClient({ accessKey: 'SCWXXXXXXXXXXXXXXXXX', secretKey: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', defaultProjectId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', defaultRegion: 'fr-par', defaultZone: 'fr-par-1',}) Copy
import { createClient } from '@scaleway/sdk'createClient({ accessKey: 'SCWXXXXXXXXXXXXXXXXX', secretKey: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', defaultProjectId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', defaultRegion: 'fr-par', defaultZone: 'fr-par-1',})
Creates a client by loading values from the environment (see https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/) or the config file created by CLI scw init (see https://www.scaleway.com/en/cli/):
scw init
import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader'import { createClient } from '@scaleway/sdk'createClient({ ...await loadProfileFromConfigurationFile(), defaultZone: 'fr-par-3',}) Copy
import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader'import { createClient } from '@scaleway/sdk'createClient({ ...await loadProfileFromConfigurationFile(), defaultZone: 'fr-par-3',})
Error Thrown if the setup fails.
Creates a Scaleway client with a profile.
Example
Creates a client with credentials & default values (see https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/):
Example
Creates a client by loading values from the environment (see https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/) or the config file created by CLI
scw init
(see https://www.scaleway.com/en/cli/):Throws
Error Thrown if the setup fails.