diff --git a/CHANGELOG.md b/CHANGELOG.md index 96ed897f05e..3adc7ba7573 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,63 @@ Moto Changelog ============== +5.0.6 +----- +Docker Digest for 5.0.6: + + New Services: + * Bedrock: + * create_model_customization_job() + * delete_custom_model() + * delete_model_invocation_logging_configuration() + * get_custom_model() + * get_model_customization_job() + * get_model_invocation_logging_configuration() + * list_custom_models() + * list_model_customization_jobs() + * list_tags_for_resource() + * put_model_invocation_logging_configuration() + * stop_model_customization_job() + * tag_resource() + * untag_resource() + + * BedrockAgent: + * create_agent() + * create_knowledge_base() + * delete_agent() + * delete_knowledge_base() + * get_agent() + * get_knowledge_base() + * list_agents() + * list_knowledge_bases() + * list_tags_for_resource() + * tag_resource() + * untag_resource() + + New Methods: + * EC2: + * describe_addresses_attributes() + + * Rekognition: + * detect_custom_labels() + + * Sagemaker: + * update_trial_component() + + Miscellaneous: + * CloudFront: update_distribution() now supports the CacheBehaviours-parameter + * DynamoDB: query() now acts correctly when paginating GSI tables without range keys + * EC2: RouteTables can now have multiple propagations + * EC2: describe_instances() now now filter by product-code and product-code.type + * EC2: describe_security_group_rules() now validates the format of the incoming security group id's + * ECS: update_service() now supports the loadBalancers-parameter + * Logs: describe_metric_filter() now has the correct validation for metricNamespaces + * IOT: search_index() now supports thingTypeName + * SFN: send_task_failure()/send_task_success() now work correctly when using the Parser + * SNS: subscribe() now throws an exception if the endpoint doesn't exist + * SQS: Improved queue name validation + + 5.0.5 ----- Docker Digest for 5.0.5: _sha256:b95cf0d65557475f29e7256938028eef352e23acafe8e07c071cd58b67c44708_ diff --git a/IMPLEMENTATION_COVERAGE.md b/IMPLEMENTATION_COVERAGE.md index ee6d58a468d..8e67b6741b6 100644 --- a/IMPLEMENTATION_COVERAGE.md +++ b/IMPLEMENTATION_COVERAGE.md @@ -704,6 +704,78 @@ - [X] update_scheduling_policy +## bedrock +
+65% implemented + +- [X] create_model_customization_job +- [ ] create_provisioned_model_throughput +- [X] delete_custom_model +- [X] delete_model_invocation_logging_configuration +- [ ] delete_provisioned_model_throughput +- [X] get_custom_model +- [ ] get_foundation_model +- [X] get_model_customization_job +- [X] get_model_invocation_logging_configuration +- [ ] get_provisioned_model_throughput +- [X] list_custom_models +- [ ] list_foundation_models +- [X] list_model_customization_jobs +- [ ] list_provisioned_model_throughputs +- [X] list_tags_for_resource +- [X] put_model_invocation_logging_configuration +- [X] stop_model_customization_job +- [X] tag_resource +- [X] untag_resource +- [ ] update_provisioned_model_throughput +
+ +## bedrock-agent +
+27% implemented + +- [ ] associate_agent_knowledge_base +- [X] create_agent +- [ ] create_agent_action_group +- [ ] create_agent_alias +- [ ] create_data_source +- [X] create_knowledge_base +- [X] delete_agent +- [ ] delete_agent_action_group +- [ ] delete_agent_alias +- [ ] delete_agent_version +- [ ] delete_data_source +- [X] delete_knowledge_base +- [ ] disassociate_agent_knowledge_base +- [X] get_agent +- [ ] get_agent_action_group +- [ ] get_agent_alias +- [ ] get_agent_knowledge_base +- [ ] get_agent_version +- [ ] get_data_source +- [ ] get_ingestion_job +- [X] get_knowledge_base +- [ ] list_agent_action_groups +- [ ] list_agent_aliases +- [ ] list_agent_knowledge_bases +- [ ] list_agent_versions +- [X] list_agents +- [ ] list_data_sources +- [ ] list_ingestion_jobs +- [X] list_knowledge_bases +- [X] list_tags_for_resource +- [ ] prepare_agent +- [ ] start_ingestion_job +- [X] tag_resource +- [X] untag_resource +- [ ] update_agent +- [ ] update_agent_action_group +- [ ] update_agent_alias +- [ ] update_agent_knowledge_base +- [ ] update_data_source +- [ ] update_knowledge_base +
+ ## budgets
30% implemented @@ -2255,7 +2327,7 @@ - [ ] describe_account_attributes - [ ] describe_address_transfers - [X] describe_addresses -- [ ] describe_addresses_attribute +- [X] describe_addresses_attribute - [ ] describe_aggregate_id_format - [X] describe_availability_zones - [ ] describe_aws_network_performance_metric_subscriptions @@ -4630,7 +4702,7 @@ ## lambda
-62% implemented +65% implemented - [ ] add_layer_version_permission - [X] add_permission @@ -4651,10 +4723,10 @@ - [ ] delete_provisioned_concurrency_config - [ ] get_account_settings - [X] get_alias -- [X] get_code_signing_config +- [ ] get_code_signing_config - [X] get_event_source_mapping - [X] get_function -- [ ] get_function_code_signing_config +- [X] get_function_code_signing_config - [X] get_function_concurrency - [ ] get_function_configuration - [X] get_function_event_invoke_config @@ -4675,13 +4747,13 @@ - [ ] list_function_url_configs - [X] list_functions - [ ] list_functions_by_code_signing_config -- [ ] list_layer_versions +- [X] list_layer_versions - [X] list_layers - [ ] list_provisioned_concurrency_configs - [X] list_tags - [X] list_versions_by_function - [X] publish_layer_version -- [ ] publish_version +- [X] publish_version - [ ] put_function_code_signing_config - [X] put_function_concurrency - [X] put_function_event_invoke_config @@ -6137,7 +6209,7 @@ ## rekognition
-9% implemented +10% implemented - [ ] associate_faces - [X] compare_faces @@ -7092,7 +7164,7 @@ - [ ] update_space - [ ] update_training_job - [ ] update_trial -- [ ] update_trial_component +- [X] update_trial_component - [ ] update_user_profile - [ ] update_workforce - [ ] update_workteam @@ -8120,8 +8192,6 @@ - backup-gateway - backupstorage - bcm-data-exports -- bedrock -- bedrock-agent - bedrock-agent-runtime - bedrock-runtime - billingconductor diff --git a/docs/docs/services/bedrock-agent.rst b/docs/docs/services/bedrock-agent.rst new file mode 100644 index 00000000000..dbf3f6b3136 --- /dev/null +++ b/docs/docs/services/bedrock-agent.rst @@ -0,0 +1,59 @@ +.. _implementedservice_bedrock-agent: + +.. |start-h3| raw:: html + +

+ +.. |end-h3| raw:: html + +

+ +============= +bedrock-agent +============= + +.. autoclass:: moto.bedrockagent.models.AgentsforBedrockBackend + +|start-h3| Implemented features for this service |end-h3| + +- [ ] associate_agent_knowledge_base +- [X] create_agent +- [ ] create_agent_action_group +- [ ] create_agent_alias +- [ ] create_data_source +- [X] create_knowledge_base +- [X] delete_agent +- [ ] delete_agent_action_group +- [ ] delete_agent_alias +- [ ] delete_agent_version +- [ ] delete_data_source +- [X] delete_knowledge_base +- [ ] disassociate_agent_knowledge_base +- [X] get_agent +- [ ] get_agent_action_group +- [ ] get_agent_alias +- [ ] get_agent_knowledge_base +- [ ] get_agent_version +- [ ] get_data_source +- [ ] get_ingestion_job +- [X] get_knowledge_base +- [ ] list_agent_action_groups +- [ ] list_agent_aliases +- [ ] list_agent_knowledge_bases +- [ ] list_agent_versions +- [X] list_agents +- [ ] list_data_sources +- [ ] list_ingestion_jobs +- [X] list_knowledge_bases +- [X] list_tags_for_resource +- [ ] prepare_agent +- [ ] start_ingestion_job +- [X] tag_resource +- [X] untag_resource +- [ ] update_agent +- [ ] update_agent_action_group +- [ ] update_agent_alias +- [ ] update_agent_knowledge_base +- [ ] update_data_source +- [ ] update_knowledge_base + diff --git a/docs/docs/services/bedrock.rst b/docs/docs/services/bedrock.rst new file mode 100644 index 00000000000..e86d0faf015 --- /dev/null +++ b/docs/docs/services/bedrock.rst @@ -0,0 +1,43 @@ +.. _implementedservice_bedrock: + +.. |start-h3| raw:: html + +

+ +.. |end-h3| raw:: html + +

+ +======= +bedrock +======= + +.. autoclass:: moto.bedrock.models.BedrockBackend + +|start-h3| Implemented features for this service |end-h3| + +- [X] create_model_customization_job +- [ ] create_provisioned_model_throughput +- [X] delete_custom_model +- [X] delete_model_invocation_logging_configuration +- [ ] delete_provisioned_model_throughput +- [X] get_custom_model +- [ ] get_foundation_model +- [X] get_model_customization_job +- [X] get_model_invocation_logging_configuration +- [ ] get_provisioned_model_throughput +- [X] list_custom_models + + The foundation_model_arn_equals-argument is not yet supported + + +- [ ] list_foundation_models +- [X] list_model_customization_jobs +- [ ] list_provisioned_model_throughputs +- [X] list_tags_for_resource +- [X] put_model_invocation_logging_configuration +- [X] stop_model_customization_job +- [X] tag_resource +- [X] untag_resource +- [ ] update_provisioned_model_throughput + diff --git a/docs/docs/services/ec2.rst b/docs/docs/services/ec2.rst index 2750ebd7615..0012bb66302 100644 --- a/docs/docs/services/ec2.rst +++ b/docs/docs/services/ec2.rst @@ -242,7 +242,7 @@ ec2 - [ ] describe_account_attributes - [ ] describe_address_transfers - [X] describe_addresses -- [ ] describe_addresses_attribute +- [X] describe_addresses_attribute - [ ] describe_aggregate_id_format - [X] describe_availability_zones diff --git a/docs/docs/services/lambda.rst b/docs/docs/services/lambda.rst index 40045f6e4e8..f42b297bacc 100644 --- a/docs/docs/services/lambda.rst +++ b/docs/docs/services/lambda.rst @@ -48,10 +48,10 @@ lambda - [ ] delete_provisioned_concurrency_config - [ ] get_account_settings - [X] get_alias -- [X] get_code_signing_config +- [ ] get_code_signing_config - [X] get_event_source_mapping - [X] get_function -- [ ] get_function_code_signing_config +- [X] get_function_code_signing_config - [X] get_function_concurrency - [ ] get_function_configuration - [X] get_function_event_invoke_config @@ -100,13 +100,13 @@ lambda - [ ] list_function_url_configs - [X] list_functions - [ ] list_functions_by_code_signing_config -- [ ] list_layer_versions +- [X] list_layer_versions - [X] list_layers - [ ] list_provisioned_concurrency_configs - [X] list_tags - [X] list_versions_by_function - [X] publish_layer_version -- [ ] publish_version +- [X] publish_version - [ ] put_function_code_signing_config - [X] put_function_concurrency Establish concurrency limit/reservations for a function diff --git a/docs/docs/services/rekognition.rst b/docs/docs/services/rekognition.rst index 9b6243fc8eb..1ab0b78e7c8 100644 --- a/docs/docs/services/rekognition.rst +++ b/docs/docs/services/rekognition.rst @@ -39,7 +39,7 @@ rekognition - [ ] describe_project_versions - [ ] describe_projects - [ ] describe_stream_processor -- [ ] detect_custom_labels +- [X] detect_custom_labels - [ ] detect_faces - [X] detect_labels - [ ] detect_moderation_labels diff --git a/docs/docs/services/sagemaker.rst b/docs/docs/services/sagemaker.rst index 8d3bf1404a6..6b370b25b54 100644 --- a/docs/docs/services/sagemaker.rst +++ b/docs/docs/services/sagemaker.rst @@ -335,7 +335,7 @@ sagemaker - [ ] update_space - [ ] update_training_job - [ ] update_trial -- [ ] update_trial_component +- [X] update_trial_component - [ ] update_user_profile - [ ] update_workforce - [ ] update_workteam diff --git a/tests/test_bedrock/test_bedrock.py b/tests/test_bedrock/test_bedrock.py index d6e93caf5f3..4950053ce59 100644 --- a/tests/test_bedrock/test_bedrock.py +++ b/tests/test_bedrock/test_bedrock.py @@ -23,7 +23,7 @@ def test_create_model_customization_job(): s3_client = boto3.client("s3", region_name=DEFAULT_REGION) s3_client.create_bucket(Bucket="training_bucket") s3_client.create_bucket(Bucket="output_bucket") - # pytest.set_trace() + resp = client.create_model_customization_job( jobName="testjob", customModelName="testmodel", @@ -99,7 +99,6 @@ def test_put_model_invocation_logging_configuration(): "bucketName": "testconfigbucket", }, } - # pytest.set_trace() client.put_model_invocation_logging_configuration(loggingConfig=logging_config) response = client.get_model_invocation_logging_configuration() assert response["loggingConfig"]["cloudWatchConfig"]["logGroupName"] == "Test" @@ -154,7 +153,7 @@ def test_untag_resource(): {"key": "testkey2", "value": "testvalue2"}, ], ) - resp = client.untag_resource(resourceARN=job_arn["jobArn"], tagKeys=["testkey"]) + client.untag_resource(resourceARN=job_arn["jobArn"], tagKeys=["testkey"]) resp = client.list_tags_for_resource(resourceARN=job_arn["jobArn"]) assert resp["tags"][0]["key"] == "testkey2" @@ -163,8 +162,6 @@ def test_untag_resource(): @mock_aws def test_untag_resource_custom_model(): - client = boto3.client("bedrock", region_name=DEFAULT_REGION) - client = boto3.client("bedrock", region_name=DEFAULT_REGION) client = boto3.client("bedrock", region_name=DEFAULT_REGION) s3_client = boto3.client("s3", region_name=DEFAULT_REGION) s3_client.create_bucket(Bucket="training_bucket") @@ -426,7 +423,6 @@ def test_create_model_customization_job_bad_training_data_config(): s3_client = boto3.client("s3", region_name=DEFAULT_REGION) s3_client.create_bucket(Bucket="training_bucket") s3_client.create_bucket(Bucket="output_bucket") - # pytest.set_trace() with pytest.raises(ClientError) as ex: client.create_model_customization_job( jobName="testjob", @@ -447,7 +443,6 @@ def test_create_model_customization_job_bad_validation_data_config(): s3_client = boto3.client("s3", region_name=DEFAULT_REGION) s3_client.create_bucket(Bucket="training_bucket") s3_client.create_bucket(Bucket="output_bucket") - # pytest.set_trace() with pytest.raises(ClientError) as ex: client.create_model_customization_job( jobName="testjob", @@ -471,7 +466,6 @@ def test_create_model_customization_job_bad_output_data_config(): s3_client = boto3.client("s3", region_name=DEFAULT_REGION) s3_client.create_bucket(Bucket="training_bucket") s3_client.create_bucket(Bucket="output_bucket") - # pytest.set_trace() with pytest.raises(ClientError) as ex: client.create_model_customization_job( jobName="testjob", @@ -493,7 +487,6 @@ def test_create_model_customization_job_duplicate_job_name(): s3_client = boto3.client("s3", region_name=DEFAULT_REGION) s3_client.create_bucket(Bucket="training_bucket") s3_client.create_bucket(Bucket="output_bucket") - # pytest.set_trace() client.create_model_customization_job( jobName="testjob", customModelName="testmodel", @@ -525,7 +518,6 @@ def test_create_model_customization_job_duplicate_model_name(): s3_client = boto3.client("s3", region_name=DEFAULT_REGION) s3_client.create_bucket(Bucket="training_bucket") s3_client.create_bucket(Bucket="output_bucket") - # pytest.set_trace() client.create_model_customization_job( jobName="testjob1", customModelName="testmodel", @@ -557,7 +549,6 @@ def test_create_model_customization_job_tags(): s3_client = boto3.client("s3", region_name=DEFAULT_REGION) s3_client.create_bucket(Bucket="training_bucket") s3_client.create_bucket(Bucket="output_bucket") - # pytest.set_trace() resp = client.create_model_customization_job( jobName="testjob1", customModelName="testmodel", @@ -879,38 +870,7 @@ def test_list_model_customization_jobs_descending_sort(): @mock_aws def test_list_model_customization_jobs_bad_sort_order(): - if settings.TEST_SERVER_MODE: - raise SkipTest("Can't freeze time in ServerMode") client = boto3.client("bedrock", region_name=DEFAULT_REGION) - with freeze_time("2022-01-01 12:00:00"): - client.create_model_customization_job( - jobName="testjob", - customModelName="testmodel1", - roleArn="testrole", - baseModelIdentifier="anthropic.claude-3-sonnet-20240229-v1:0", - trainingDataConfig={"s3Uri": "s3://training_bucket"}, - outputDataConfig={"s3Uri": "s3://output_bucket"}, - hyperParameters={"learning_rate": "0.01"}, - ) - client.create_model_customization_job( - jobName="testjob3", - customModelName="testmodel3", - roleArn="testrole", - baseModelIdentifier="anthropic.claude-3-sonnet-20240229-v1:0", - trainingDataConfig={"s3Uri": "s3://training_bucket"}, - outputDataConfig={"s3Uri": "s3://output_bucket"}, - hyperParameters={"learning_rate": "0.01"}, - ) - with freeze_time("2023-01-01 12:00:00"): - client.create_model_customization_job( - jobName="testjob2", - customModelName="testmodel2", - roleArn="testrole", - baseModelIdentifier="anthropic.claude-3-sonnet-20240229-v1:0", - trainingDataConfig={"s3Uri": "s3://training_bucket"}, - outputDataConfig={"s3Uri": "s3://output_bucket"}, - hyperParameters={"learning_rate": "0.01"}, - ) with pytest.raises(ClientError) as ex: client.list_model_customization_jobs( sortBy="CreationTime", sortOrder="decending" diff --git a/tests/test_bedrockagent/test_bedrockagent.py b/tests/test_bedrockagent/test_bedrockagent.py index 3fa9cc36fe0..094c312a193 100644 --- a/tests/test_bedrockagent/test_bedrockagent.py +++ b/tests/test_bedrockagent/test_bedrockagent.py @@ -15,7 +15,6 @@ @mock_aws def test_create_agent(): client = boto3.client("bedrock-agent", region_name=DEFAULT_REGION) - # pytest.set_trace() resp = client.create_agent( agentName="agent_name",