Skip to content

Commit 0090493

Browse files
authored
Fix client naming in dev-guide (#2)
1 parent 14e3dd9 commit 0090493

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

dev-guide/credential-providers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ Not all credential providers are supported yet by the experimental Amazon Bedroc
2525
To use a specific credentials identity resolver, set the `aws_credentials_identity_resolver` property on the service client's `Config` object to an instance of the credentials identity resolver class you want to use. The following example specifically uses the `EnvironmentCredentialsResolver()`, which fetches credentials from the standard environment variables `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN`.
2626

2727
```
28-
service_client = BedrockRuntime(
28+
service_client = BedrockRuntimeClient(
2929
config=Config(
3030
aws_credentials_identity_resolver=EnvironmentCredentialsResolver(),
3131
region = "us-east-1",
3232
)
3333
)
34-
```
34+
```

dev-guide/region.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Most resources reside in a specific AWS Region and you must supply the correct R
1010
The Region is specified by setting the `region` property of the `Config` object to a string giving the name of the Region. For example, to specify the region `us-east-1` when creating an Amazon Bedrock Runtime client:
1111

1212
```
13-
service_client = BedrockRuntime(
13+
service_client = BedrockRuntimeClient(
1414
config=Config(
1515
aws_credentials_identity_resolver=EnvironmentCredentialsResolver(),
1616
region = "us-east-1",
@@ -31,12 +31,12 @@ import os
3131
...
3232
region = os.getenv('AWS_REGION', default="us-east-1")
3333
34-
service_client = BedrockRuntime(
34+
service_client = BedrockRuntimeClient(
3535
config=Config(
3636
aws_credentials_identity_resolver=EnvironmentCredentialsResolver(),
3737
region = region,
3838
)
3939
)
4040
```
4141

42-
This uses the value of `AWS_REGION`, falling back to `us-east-1` if the variable isn't found in the environment.
42+
This uses the value of `AWS_REGION`, falling back to `us-east-1` if the variable isn't found in the environment.

dev-guide/service-clients.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
To make a request to an AWS service, you first instantiate a client for that service. You can configure common settings for service clients such as timeouts, the HTTP client, and retry configuration. To create a client for Amazon Bedrock Runtime:
44

55
```
6-
service_client = BedrockRuntime(
6+
service_client = BedrockRuntimeClient(
77
config=Config(
88
aws_credentials_identity_resolver=EnvironmentCredentialsResolver(),
99
region = "us-east-1",
@@ -22,4 +22,4 @@ The SDK has a series of places (or sources) that it checks in order to find a va
2222
+ For details on setting environment variables, see [environment variables](https://docs.aws.amazon.com/sdkref/latest/guide/environment-variables.html) in the *AWS SDKs and Tools Reference Guide*.
2323

2424
1. Any default value provided by the SDK source code itself is used last.
25-
+ Some properties, such as Region, don't have a default. You must specify them either explicitly in code or in an environment setting. If the SDK can't resolve required configuration, API requests can fail at runtime.
25+
+ Some properties, such as Region, don't have a default. You must specify them either explicitly in code or in an environment setting. If the SDK can't resolve required configuration, API requests can fail at runtime.

dev-guide/simple-app.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This chapter features a short example that asks the Amazon Titan Text Express ge
77
The first thing our program does is import the service and the types we need from it:
88

99
```
10-
from aws_sdk_bedrock_runtime.client import BedrockRuntime, ConverseInput
10+
from aws_sdk_bedrock_runtime.client import BedrockRuntimeClient, ConverseInput
1111
from aws_sdk_bedrock_runtime.models import Message, ContentBlockText, StopReason
1212
from aws_sdk_bedrock_runtime.config import Config
1313
@@ -18,7 +18,7 @@ import asyncio
1818

1919
This imports the following from the Bedrock client:
2020

21-
1. `BedrockRuntime`, which is the class representing the Amazon Bedrock Runtime client.
21+
1. `BedrockRuntimeClient`, which is the class representing the Amazon Bedrock Runtime client.
2222

2323
1. The `ConverseInput` class, which is used to specify the input values when calling the client's `converse()` function.
2424

@@ -38,11 +38,11 @@ Also imported is the `asyncio` package, which is used to manage the asynchronous
3838

3939
## Creating the Amazon Bedrock Runtime client<a name="simple-app-create-client"></a>
4040

41-
To create the Amazon Bedrock Runtime client, create a `BedrockRuntime` instance using a `Config` object providing the AWS Region to use. In this example, a credentials identity resolver is provided that uses the standard AWS [access keys in environment variables](https://docs.aws.amazon.com/sdkref/latest/guide/access-users.html) are used to specify credentials.
41+
To create the Amazon Bedrock Runtime client, create a `BedrockRuntimeClient` instance using a `Config` object providing the AWS Region to use. In this example, a credentials identity resolver is provided that uses the standard AWS [access keys in environment variables](https://docs.aws.amazon.com/sdkref/latest/guide/access-users.html) are used to specify credentials.
4242

4343
```
4444
def get_service_client():
45-
service_client = BedrockRuntime(
45+
service_client = BedrockRuntimeClient(
4646
config=Config(
4747
aws_credentials_identity_resolver=EnvironmentCredentialsResolver(),
4848
region = "us-east-1",
@@ -146,4 +146,4 @@ async def app_run():
146146
147147
if __name__ == "__main__":
148148
asyncio.run(app_run())
149-
```
149+
```

0 commit comments

Comments
 (0)