@aws/amazon-location-client 1.2.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -53,6 +53,20 @@ const command = new amazonLocationClient.routes.CalculateRoutesCommand(input);
53
53
  const response = await client.send(command);
54
54
  ```
55
55
 
56
+ ### Custom Credential Provider
57
+
58
+ For most use cases, API Key or Cognito authentication above will be sufficient. If you need to use a custom [credential provider](https://www.npmjs.com/package/@aws-sdk/credential-providers#credentials-provider) (e.g. credentials from a custom backend or a different AWS authentication mechanism), you can use `withCredentialProvider`.
59
+
60
+ ```javascript
61
+ // Create an authentication helper instance using a custom credential provider
62
+ const authHelper = amazonLocationClient.withCredentialProvider(credentialProvider, "<Region>");
63
+
64
+ const client = new amazonLocationClient.GeoRoutesClient(authHelper.getClientConfig());
65
+ const input = { ... };
66
+ const command = new amazonLocationClient.routes.CalculateRoutesCommand(input);
67
+ const response = await client.send(command);
68
+ ```
69
+
56
70
  ## Documentation
57
71
 
58
72
  The APIs for the different client SDKs are grouped separately.