You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cache/develop/index.md
+15-3Lines changed: 15 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,16 +22,28 @@ Here is an example of how to construct a `CacheClient`:
22
22
23
23
## Instantiating credential providers using Momento API keys
24
24
25
-
You need to provide a Momento API key when instantiating a Momento client. If you don't have one yet, you can get one from the [Momento Web Console](https://console.gomomento.com/). Once you have a token, provide it to Momento SDKs when you create an instance of `CredentialProvider`. There are convenient factory methods provided to construct a `CredentialProvider` object, either from an environment variable or from a String. Below is an example of how to instantiate `CredentialProvider` from an environment variable:
25
+
You need to provide a Momento API key when instantiating a Momento client. If you don't have one yet, you can get one from the [Momento Web Console](https://console.gomomento.com/).
You also need to provide a Momento service endpoint. You can find a [list of them here](https://docs.momentohq.com/platform/regions).
28
+
29
+
Once you have an API key and an endpoint, provide it to Momento SDKs when you create an instance of `CredentialProvider`. There are convenient factory methods provided to construct a `CredentialProvider` object, either from an environment variable or from a String. Below is an example of how to instantiate `CredentialProvider` from the default environment variables `MOMENTO_API_KEY` and `MOMENTO_ENDPOINT`:
If you're storing your Momento auth token in a secret manager such as [AWS Secret Manager](https://aws.amazon.com/secrets-manager/), [GCP Secret Manager](https://cloud.google.com/secret-manager), or a local config file, you must first retrieve the credentials from there and then instantiate a `CredentialProvider` from a string, like this:
For an example of how to retrieve credentials from AWS Secrets Manager, see [Retrieving a Momento auth token from AWS Secrets Manager](/cache/integrations/aws-secrets-manager).
34
42
43
+
If you have a disposable auth token or a v1 API key, you can instantiate a `CredentialProvider` like this:
For general information on Momento authentication, see [our auth page](../authentication/index.mdx).
36
48
37
49
For more information, see our [Response Objects](./develop/api-reference/response-objects) page, and the docs for the specific SDK that you are using (under `Develop`->`SDKs` in the left nav).
Copy file name to clipboardExpand all lines: docs/platform/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ keywords:
19
19
20
20
# The Momento Platform
21
21
22
-
Ship better products, faster with a platform designed for mission-critical workloads. Momento makes infrastructure easy at enterprise scale with [caching](/cache), [unrivaled event messaging](/topics), and soon, *storage*!
22
+
Ship better products, faster with a platform designed for mission-critical workloads. Momento makes infrastructure easy at enterprise scale with [caching](/cache) and [unrivaled event messaging](/topics)!
Copy file name to clipboardExpand all lines: docs/platform/sdks/dart/cache.mdx
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,15 @@ export MOMENTO_API_KEY=<your api key here>
64
64
65
65
**Note**: it is best practice to put the API key into something like AWS Secret Manager or GCP Secret Manager instead of an environment variable for enhanced security, but we are using one here for demo purposes.
66
66
67
+
## Get your Momento service endpoint
68
+
69
+
You'll also need a Momento service endpoint. You can find a [list of them here](https://docs.momentohq.com/platform/regions).
70
+
Once you have selected an endpoint, store it in an environment variable so that the Momento client can consume it:
71
+
72
+
```
73
+
export MOMENTO_ENDPOINT=<your service endpoint here>
74
+
```
75
+
67
76
## Set up a CacheClient
68
77
This code creates the CacheClient that you will use to call the other methods.
Copy file name to clipboardExpand all lines: docs/platform/sdks/dart/topics.mdx
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,15 @@ export MOMENTO_API_KEY=<your api key here>
65
65
66
66
**Note**: it is best practice to put the API key into something like AWS Secret Manager or GCP Secret Manager instead of an environment variable for enhanced security, but we are using one here for demo purposes.
67
67
68
+
## Get your Momento service endpoint
69
+
70
+
You'll also need a Momento service endpoint. You can find a [list of them here](https://docs.momentohq.com/platform/regions).
71
+
Once you have selected an endpoint, store it in an environment variable so that the Momento client can consume it:
72
+
73
+
```
74
+
export MOMENTO_ENDPOINT=<your service endpoint here>
75
+
```
76
+
68
77
## Set up a TopicClient
69
78
This code creates the TopicClient that you will use to interact with your pub/sub topic.
Copy file name to clipboardExpand all lines: docs/platform/sdks/dotnet/cache.mdx
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,15 @@ export MOMENTO_API_KEY=<your Momento API key here>
55
55
56
56
**Note**: it is best practice to put the API key into something like AWS Secret Manager or GCP Secret Manager instead of an environment variable for enhanced security, but we are using one here for demo purposes.
57
57
58
+
## Set up your Momento service endpoint
59
+
60
+
You'll also need a Momento service endpoint. You can find a [list of them here](https://docs.momentohq.com/platform/regions).
61
+
Once you have selected an endpoint, store it in an environment variable so that the Momento client can consume it:
62
+
63
+
```
64
+
export MOMENTO_ENDPOINT=<your service endpoint here>
65
+
```
66
+
58
67
## Import libraries and create a CacheClient object
59
68
[This example file](https://github.com/momentohq/client-sdk-dotnet/blob/main/examples/MomentoUsage/Program.cs) pulls in the necessary imports, reads the API key from an environment variable, and instantiates the CacheClient that is used to interact with a cache.
Copy file name to clipboardExpand all lines: docs/platform/sdks/dotnet/index.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ The source code can be found on GitHub: [momentohq/client-sdk-dotnet](https://gi
39
39
40
40
-[`dotnet` runtime and command line tools](https://dotnet.microsoft.com/en-us/download); after installing them, you should have the `dotnet` command on your PATH.
41
41
- A Momento API Key is required; you can get one from the [Momento Web Console](https://console.gomomento.com/).
42
+
- A Momento service endpoint is required. You can find a [list of them here](https://docs.momentohq.com/platform/regions).
42
43
- You will most likely want an IDE that supports .NET development, such as [Microsoft Visual Studio](https://visualstudio.microsoft.com/vs), [JetBrains Rider](https://www.jetbrains.com/rider/), or [Microsoft Visual Studio Code](https://code.visualstudio.com/).
Copy file name to clipboardExpand all lines: docs/platform/sdks/dotnet/topics.mdx
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,15 @@ export MOMENTO_API_KEY=<your api key here>
55
55
56
56
**Note**: it is best practice to put the API key into something like AWS Secret Manager or GCP Secret Manager instead of an environment variable for enhanced security, but we are using one here for demo purposes.
57
57
58
+
## Get your Momento service endpoint
59
+
60
+
You'll also need a Momento service endpoint. You can find a [list of them here](https://docs.momentohq.com/platform/regions).
61
+
Once you have selected an endpoint, store it in an environment variable so that the Momento client can consume it:
62
+
63
+
```
64
+
export MOMENTO_ENDPOINT=<your service endpoint here>
65
+
```
66
+
58
67
## Set up a TopicClient
59
68
This code creates the TopicClient that you will use to interact with your pub/sub topic.
0 commit comments