Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This SDK enables you to interact with Scaleway APIs.

## Getting Started

You'll need a pair of access and secret keys to connect to Scaleway API. Please check the [documentation](https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/) on how to retrieve them.
You'll need a pair of access and secret keys to connect to Scaleway API. Please check the [documentation](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/) on how to retrieve them.

**A minimal setup** would look like this:

Expand Down
2 changes: 1 addition & 1 deletion packages/clients/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This SDK enables you to interact with Scaleway APIs.

## Getting Started

You'll need a pair of access and secret keys to connect to Scaleway API. Please check the [documentation](https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/) on how to retrieve them.
You'll need a pair of access and secret keys to connect to Scaleway API. Please check the [documentation](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/) on how to retrieve them.

**A minimal setup** would look like this:

Expand Down
6 changes: 3 additions & 3 deletions packages/clients/src/scw/__tests__/client-ini-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('assertValidAuthenticationSecrets', () => {
assertValidAuthenticationSecrets(value)
}).toThrow(
new Error(
`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/`,
`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`,
),
)
})
Expand All @@ -59,7 +59,7 @@ describe('assertValidAuthenticationSecrets', () => {
})
}).toThrow(
new Error(
`Invalid access key format 'SCW0123', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/`,
`Invalid access key format 'SCW0123', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`,
),
)
})
Expand All @@ -72,7 +72,7 @@ describe('assertValidAuthenticationSecrets', () => {
})
}).toThrow(
new Error(
`Invalid secret key format 'e4b83996-4c60-449a-98d2', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/`,
`Invalid secret key format 'e4b83996-4c60-449a-98d2', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`,
),
)
})
Expand Down
6 changes: 3 additions & 3 deletions packages/clients/src/scw/client-ini-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@ export function assertValidAuthenticationSecrets(
): asserts obj is AuthenticationSecrets {
if (!(obj.accessKey && obj.secretKey)) {
throw new Error(
`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/`,
`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`,
)
}
if (!isAccessKey(obj.accessKey)) {
throw new Error(
`Invalid access key format '${obj.accessKey}', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/`,
`Invalid access key format '${obj.accessKey}', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`,
)
}
if (!isSecretKey(obj.secretKey)) {
throw new Error(
`Invalid secret key format '${obj.secretKey}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/`,
`Invalid secret key format '${obj.secretKey}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/`,
)
}
}
4 changes: 2 additions & 2 deletions packages/clients/src/scw/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const createAdvancedClient = (...configs: ClientConfig[]): Client => {
* Creates a Scaleway client with a profile.
*
* @example
* Creates a client with credentials & default values (see https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/):
* 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'
*
Expand All @@ -82,7 +82,7 @@ export const createAdvancedClient = (...configs: ClientConfig[]): Client => {
* ```
*
* @example
* Creates a client by loading values from the environment (see https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/#how-to-use-your-api-key)
* 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/):
* ```
* import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader'
Expand Down