Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Bedrock and Bedrock Agents #7597

Merged
merged 6 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions moto/backend_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
("backup", re.compile("https?://backup\\.(.+)\\.amazonaws\\.com")),
("batch", re.compile("https?://batch\\.(.+)\\.amazonaws.com")),
("budgets", re.compile("https?://budgets\\.amazonaws\\.com")),
("bedrock", re.compile("https?://bedrock\\.(.+)\\.amazonaws\\.com")),
("bedrockagent", re.compile("https?://bedrock-agent\\.(.+)\\.amazonaws\\.com")),
("ce", re.compile("https?://ce\\.(.+)\\.amazonaws\\.com")),
("cloudformation", re.compile("https?://cloudformation\\.(.+)\\.amazonaws\\.com")),
("cloudfront", re.compile("https?://cloudfront\\.amazonaws\\.com")),
Expand Down
1 change: 1 addition & 0 deletions moto/bedrock/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .models import bedrock_backends # noqa: F401
33 changes: 33 additions & 0 deletions moto/bedrock/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""Exceptions raised by the bedrock service."""

from moto.core.exceptions import JsonRESTError

# Bedrock.Client.exceptions.ResourceNotFoundException


class BedrockClientError(JsonRESTError):
code = 400


class ResourceNotFoundException(BedrockClientError):
def __init__(self, msg: str):
super().__init__("ResourceNotFoundException", f"{msg}")


class ResourceInUseException(BedrockClientError):
def __init__(self, msg: str):
super().__init__("ResourceInUseException", f"{msg}")


class ValidationException(BedrockClientError):
def __init__(self, msg: str):
super().__init__(
"ValidationException",
"Input validation failed. Check your request parameters and retry the request.",
f"{msg}",
)


class TooManyTagsException(BedrockClientError):
def __init__(self, msg: str):
super().__init__("TooManyTagsException", f"{msg}")