(
self,
*,
api_key: str | None = None,
bedrock_token_provider: BedrockTokenProvider | None = None,
aws_region: str | None = None,
aws_profile: str | None = None,
aws_access_key_id: str | None = None,
aws_secret_access_key: str | None = None,
aws_session_token: str | None = None,
aws_credentials_provider: AwsCredentialsProvider | None = None,
organization: str | None = None,
project: str | None = None,
webhook_secret: str | None = None,
base_url: str | httpx.URL | None = None,
websocket_base_url: str | httpx.URL | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
http_client: httpx.Client | None = None,
_strict_response_validation: bool = False,
_enforce_credentials: bool = True,
_provider: _Provider | None = None,
_state: _LegacyBedrockState | None = None,
_region_was_explicit: bool | None = None,
)
| 393 | aws_region: str | None |
| 394 | |
| 395 | def __init__( |
| 396 | self, |
| 397 | *, |
| 398 | api_key: str | None = None, |
| 399 | bedrock_token_provider: BedrockTokenProvider | None = None, |
| 400 | aws_region: str | None = None, |
| 401 | aws_profile: str | None = None, |
| 402 | aws_access_key_id: str | None = None, |
| 403 | aws_secret_access_key: str | None = None, |
| 404 | aws_session_token: str | None = None, |
| 405 | aws_credentials_provider: AwsCredentialsProvider | None = None, |
| 406 | organization: str | None = None, |
| 407 | project: str | None = None, |
| 408 | webhook_secret: str | None = None, |
| 409 | base_url: str | httpx.URL | None = None, |
| 410 | websocket_base_url: str | httpx.URL | None = None, |
| 411 | timeout: float | Timeout | None | NotGiven = NOT_GIVEN, |
| 412 | max_retries: int = DEFAULT_MAX_RETRIES, |
| 413 | default_headers: Mapping[str, str] | None = None, |
| 414 | default_query: Mapping[str, object] | None = None, |
| 415 | http_client: httpx.Client | None = None, |
| 416 | _strict_response_validation: bool = False, |
| 417 | _enforce_credentials: bool = True, |
| 418 | _provider: _Provider | None = None, |
| 419 | _state: _LegacyBedrockState | None = None, |
| 420 | _region_was_explicit: bool | None = None, |
| 421 | ) -> None: |
| 422 | if _provider is None or _state is None: |
| 423 | _provider, _state, public_api_key = _legacy_provider( |
| 424 | api_key=api_key, |
| 425 | token_provider=bedrock_token_provider, |
| 426 | aws_region=aws_region, |
| 427 | aws_profile=aws_profile, |
| 428 | aws_access_key_id=aws_access_key_id, |
| 429 | aws_secret_access_key=aws_secret_access_key, |
| 430 | aws_session_token=aws_session_token, |
| 431 | aws_credentials_provider=aws_credentials_provider, |
| 432 | base_url=base_url, |
| 433 | region_was_explicit=_region_was_explicit, |
| 434 | ) |
| 435 | else: |
| 436 | public_api_key = ( |
| 437 | _state.explicit_api_key |
| 438 | or (_state.environment_bearer_token if _state.uses_environment_bearer else "") |
| 439 | or "" |
| 440 | ) |
| 441 | |
| 442 | super().__init__( |
| 443 | provider=_provider, |
| 444 | organization=organization, |
| 445 | project=project, |
| 446 | webhook_secret=webhook_secret, |
| 447 | websocket_base_url=websocket_base_url, |
| 448 | timeout=timeout, |
| 449 | max_retries=max_retries, |
| 450 | default_headers=default_headers, |
| 451 | default_query=default_query, |
| 452 | http_client=http_client, |
no test coverage detected