AmazonBedrockSigV4Fetch
Namespace: Vercel.AI.AmazonBedrock
public sealed class AmazonBedrockSigV4FetchSigV4 fetch wrapper. The credentials are read when each call is sent.
Inheritance: object
Constructors
Section titled “Constructors”AmazonBedrockSigV4Fetch(Func<CancellationToken, Task<AmazonBedrockCredentials>>, string)
Section titled “AmazonBedrockSigV4Fetch(Func<CancellationToken, Task<AmazonBedrockCredentials>>, string)”public AmazonBedrockSigV4Fetch(Func<CancellationToken, Task<AmazonBedrockCredentials>> getCredentials, string service = "bedrock")Creates a wrapper that signs for <code class=“paramref”>service</code>.
Parameters
| Name | Type | Description |
|---|---|---|
getCredentials |
Func<CancellationToken, Task<AmazonBedrockCredentials>> | |
service |
string |
Properties
Section titled “Properties”Transport
Section titled “Transport”public Func<AmazonBedrockPreparedCall, AmazonBedrockPreparedCall>? Transport { get; set; }Optional transport. When unset, the prepared call is returned directly.
Value: Func<AmazonBedrockPreparedCall, AmazonBedrockPreparedCall>
UtcNow
Section titled “UtcNow”public Func<DateTimeOffset>? UtcNow { get; set; }Clock used for signing. Tests can pin this.
Value: Func<DateTimeOffset>
Methods
Section titled “Methods”SendAsync(string, string?, string?, IReadOnlyDictionary<string, string?>?, CancellationToken)
Section titled “SendAsync(string, string?, string?, IReadOnlyDictionary<string, string?>?, CancellationToken)”public Task<AmazonBedrockPreparedCall> SendAsync(string url, string? method, string? body, IReadOnlyDictionary<string, string?>? headers, CancellationToken cancellationToken = default)Resolves the credentials, signs the call, then invokes Transport if one is set. Calls that are not signed never read the credentials. A credential failure propagates and the transport is not called.
Parameters
| Name | Type | Description |
|---|---|---|
url |
string | |
method |
string | |
body |
string | |
headers |
IReadOnlyDictionary<string, string> | |
cancellationToken |
CancellationToken |
Returns: Task<AmazonBedrockPreparedCall>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product