From 447216c6f0387f690faaabef20da04b740711c87 Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Sun, 7 Aug 2022 09:35:11 +0000 Subject: [PATCH] Prepare release 3.1.17 (#5364) --- CHANGELOG.md | 81 +++++++++++++++++ IMPLEMENTATION_COVERAGE.md | 120 ++++++++++++++++++-------- docs/docs/services/appsync.rst | 1 + docs/docs/services/athena.rst | 2 + docs/docs/services/autoscaling.rst | 8 +- docs/docs/services/ce.rst | 81 +++++++++++++++++ docs/docs/services/codebuild.rst | 2 - docs/docs/services/config.rst | 1 + docs/docs/services/datasync.rst | 2 + docs/docs/services/dms.rst | 1 + docs/docs/services/ec2.rst | 10 +++ docs/docs/services/emr-serverless.rst | 10 +-- docs/docs/services/glue.rst | 31 +++++-- docs/docs/services/greengrass.rst | 14 +-- docs/docs/services/guardduty.rst | 3 + docs/docs/services/iot.rst | 2 +- docs/docs/services/kms.rst | 2 +- docs/docs/services/mediaconnect.rst | 4 +- docs/docs/services/medialive.rst | 2 + docs/docs/services/quicksight.rst | 2 + docs/docs/services/rds.rst | 1 + docs/docs/services/sagemaker.rst | 12 +++ docs/docs/services/sso-admin.rst | 6 ++ moto/glue/models.py | 36 ++++---- moto/glue/responses.py | 8 +- 25 files changed, 353 insertions(+), 89 deletions(-) create mode 100644 docs/docs/services/ce.rst diff --git a/CHANGELOG.md b/CHANGELOG.md index f56c011018c5..30242fc001e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,87 @@ Moto Changelog ============== +3.1.17 +----- +Docker Digest for 3.1.17: + + General: + * Werkzeug has been pinned to 2.1.x, as the latest 2.2.x releases cause some issues + + New Services: + + * CodeBuild: + * batch_get_builds() + * delete_project() + * list_builds() + * list_builds_for_project() + * start_build() + * stop_build() + + * Cost Explorer: + * create_cost_category_definition() + * delete_cost_category_definition() + * describe_cost_category_definition() + * update_cost_category_definition() + + * EMR Serverless: + * create_application() + * delete_application() + * get_application() + * list_applications() + * start_application() + * start_job_run() + * stop_application() + * update_application() + + New Methods: + + * Autoscaling: + * delete_scheduled_action() + * describe_scheduled_actions() + * put_scheduled_update_group_action() + + * CloudFront: + * create_distribution_with_tags() + * create_invalidation() + * list_tags_for_resource() + + * Glue: + * create_schema() + * delete_schema() + * get_schema_by_definition() + * get_schema_version() + * put_schema_version_metadata() + * register_schema_version() + + * Greengrass: + * associate_role_to_group() + * create_deployment() + * disassociate_role_from_group() + * get_associated_role() + * get_deployment_status() + * list_deployments() + * reset_deployments() + + * IAM: + * update_assume_role_policy() + + * IOT: + * list_targets_for_policy() + + * KMS: + * replicate_key() + + * MediaConnect: + * add_flow_sources() + * update_flow_source() + + Miscellaneous: + * CloudFormation now supports the creation of AWS::AutoScaling::ScheduledAction + * CognitoIDP now supports pagination for list_groups() and list_users_in_group() + * EC2:describe_instances() now supports the filter 'key-name' + * IAM:create_access_key() now limits the number of keys per user to 2 + 3.1.16 ----- Docker Digest for 3.1.16: _sha256:e7d79262fac1553966fb8c894dc81a750c4a18745977da6a15dffc35c596f8c4_ diff --git a/IMPLEMENTATION_COVERAGE.md b/IMPLEMENTATION_COVERAGE.md index b63966d7643f..6bfe877b1402 100644 --- a/IMPLEMENTATION_COVERAGE.md +++ b/IMPLEMENTATION_COVERAGE.md @@ -262,6 +262,7 @@ - [ ] delete_resolver - [ ] delete_type - [ ] disassociate_api +- [ ] evaluate_mapping_template - [ ] flush_api_cache - [ ] get_api_association - [ ] get_api_cache @@ -297,9 +298,10 @@ ## athena
-28% implemented +27% implemented - [ ] batch_get_named_query +- [ ] batch_get_prepared_statement - [ ] batch_get_query_execution - [X] create_data_catalog - [X] create_named_query @@ -315,6 +317,7 @@ - [ ] get_prepared_statement - [ ] get_query_execution - [ ] get_query_results +- [ ] get_query_runtime_statistics - [ ] get_table_metadata - [X] get_work_group - [X] list_data_catalogs @@ -338,7 +341,7 @@ ## autoscaling
-50% implemented +55% implemented - [X] attach_instances - [X] attach_load_balancer_target_groups @@ -355,7 +358,7 @@ - [X] delete_lifecycle_hook - [ ] delete_notification_configuration - [X] delete_policy -- [ ] delete_scheduled_action +- [X] delete_scheduled_action - [X] delete_tags - [ ] delete_warm_pool - [ ] describe_account_limits @@ -374,7 +377,7 @@ - [X] describe_policies - [ ] describe_scaling_activities - [ ] describe_scaling_process_types -- [ ] describe_scheduled_actions +- [X] describe_scheduled_actions - [X] describe_tags - [ ] describe_termination_policy_types - [ ] describe_warm_pool @@ -390,7 +393,7 @@ - [ ] put_lifecycle_hook - [ ] put_notification_configuration - [X] put_scaling_policy -- [ ] put_scheduled_update_group_action +- [X] put_scheduled_update_group_action - [ ] put_warm_pool - [ ] record_lifecycle_action_heartbeat - [X] resume_processes @@ -1067,7 +1070,7 @@ ## config
-36% implemented +35% implemented - [X] batch_get_aggregate_resource_config - [X] batch_get_resource_config @@ -1131,6 +1134,7 @@ - [X] get_resource_config_history - [ ] get_stored_query - [X] list_aggregate_discovered_resources +- [ ] list_conformance_pack_compliance_scores - [X] list_discovered_resources - [ ] list_stored_queries - [X] list_tags_for_resource @@ -1236,12 +1240,13 @@ ## datasync
-14% implemented +13% implemented - [X] cancel_task_execution - [ ] create_agent - [ ] create_location_efs - [ ] create_location_fsx_lustre +- [ ] create_location_fsx_ontap - [ ] create_location_fsx_open_zfs - [ ] create_location_fsx_windows - [ ] create_location_hdfs @@ -1256,6 +1261,7 @@ - [ ] describe_agent - [ ] describe_location_efs - [ ] describe_location_fsx_lustre +- [ ] describe_location_fsx_ontap - [ ] describe_location_fsx_open_zfs - [ ] describe_location_fsx_windows - [ ] describe_location_hdfs @@ -1377,11 +1383,12 @@ - [ ] start_replication_task_assessment_run - [X] stop_replication_task - [ ] test_connection +- [ ] update_subscriptions_to_event_bridge
## ds
-19% implemented +18% implemented - [ ] accept_shared_directory - [ ] add_ip_routes @@ -1412,6 +1419,7 @@ - [ ] describe_event_topics - [ ] describe_ldaps_settings - [ ] describe_regions +- [ ] describe_settings - [ ] describe_shared_directories - [ ] describe_snapshots - [ ] describe_trusts @@ -1444,6 +1452,7 @@ - [ ] update_conditional_forwarder - [ ] update_number_of_domain_controllers - [ ] update_radius +- [ ] update_settings - [ ] update_trust - [ ] verify_trust
@@ -1552,6 +1561,7 @@ - [X] associate_route_table - [X] associate_subnet_cidr_block - [ ] associate_transit_gateway_multicast_domain +- [ ] associate_transit_gateway_policy_table - [X] associate_transit_gateway_route_table - [ ] associate_trunk_interface - [X] associate_vpc_cidr_block @@ -1634,9 +1644,11 @@ - [ ] create_transit_gateway_connect_peer - [ ] create_transit_gateway_multicast_domain - [X] create_transit_gateway_peering_attachment +- [ ] create_transit_gateway_policy_table - [ ] create_transit_gateway_prefix_list_reference - [X] create_transit_gateway_route - [X] create_transit_gateway_route_table +- [ ] create_transit_gateway_route_table_announcement - [X] create_transit_gateway_vpc_attachment - [X] create_volume - [X] create_vpc @@ -1696,9 +1708,11 @@ - [ ] delete_transit_gateway_connect_peer - [ ] delete_transit_gateway_multicast_domain - [X] delete_transit_gateway_peering_attachment +- [ ] delete_transit_gateway_policy_table - [ ] delete_transit_gateway_prefix_list_reference - [X] delete_transit_gateway_route - [X] delete_transit_gateway_route_table +- [ ] delete_transit_gateway_route_table_announcement - [X] delete_transit_gateway_vpc_attachment - [X] delete_volume - [X] delete_vpc @@ -1828,6 +1842,8 @@ - [ ] describe_transit_gateway_connects - [ ] describe_transit_gateway_multicast_domains - [X] describe_transit_gateway_peering_attachments +- [ ] describe_transit_gateway_policy_tables +- [ ] describe_transit_gateway_route_table_announcements - [ ] describe_transit_gateway_route_tables - [X] describe_transit_gateway_vpc_attachments - [X] describe_transit_gateways @@ -1872,6 +1888,7 @@ - [X] disassociate_route_table - [X] disassociate_subnet_cidr_block - [ ] disassociate_transit_gateway_multicast_domain +- [ ] disassociate_transit_gateway_policy_table - [X] disassociate_transit_gateway_route_table - [ ] disassociate_trunk_interface - [X] disassociate_vpc_cidr_block @@ -1920,6 +1937,8 @@ - [ ] get_subnet_cidr_reservations - [ ] get_transit_gateway_attachment_propagations - [ ] get_transit_gateway_multicast_domain_associations +- [ ] get_transit_gateway_policy_table_associations +- [ ] get_transit_gateway_policy_table_entries - [ ] get_transit_gateway_prefix_list_references - [ ] get_transit_gateway_route_table_associations - [ ] get_transit_gateway_route_table_propagations @@ -2790,7 +2809,7 @@ ## glue
-13% implemented +16% implemented - [ ] batch_create_partition - [ ] batch_delete_connection @@ -2822,7 +2841,7 @@ - [ ] create_partition - [ ] create_partition_index - [X] create_registry -- [ ] create_schema +- [X] create_schema - [ ] create_script - [ ] create_security_configuration - [ ] create_session @@ -2845,7 +2864,7 @@ - [ ] delete_partition_index - [ ] delete_registry - [ ] delete_resource_policy -- [ ] delete_schema +- [X] delete_schema - [ ] delete_schema_versions - [ ] delete_security_configuration - [ ] delete_session @@ -2886,14 +2905,14 @@ - [ ] get_ml_transforms - [ ] get_partition - [ ] get_partition_indexes -- [ ] get_partitions +- [X] get_partitions - [ ] get_plan - [ ] get_registry - [ ] get_resource_policies - [ ] get_resource_policy - [ ] get_schema -- [ ] get_schema_by_definition -- [ ] get_schema_version +- [X] get_schema_by_definition +- [X] get_schema_version - [ ] get_schema_versions_diff - [ ] get_security_configuration - [ ] get_security_configurations @@ -2918,6 +2937,7 @@ - [ ] import_catalog_to_glue - [ ] list_blueprints - [X] list_crawlers +- [ ] list_crawls - [ ] list_custom_entity_types - [ ] list_dev_endpoints - [X] list_jobs @@ -2931,10 +2951,10 @@ - [ ] list_workflows - [ ] put_data_catalog_encryption_settings - [ ] put_resource_policy -- [ ] put_schema_version_metadata +- [X] put_schema_version_metadata - [ ] put_workflow_run_properties - [ ] query_schema_version_metadata -- [ ] register_schema_version +- [X] register_schema_version - [ ] remove_schema_version_metadata - [ ] reset_job_bookmark - [ ] resume_workflow_run @@ -2979,15 +2999,15 @@ ## greengrass
-52% implemented +59% implemented -- [ ] associate_role_to_group +- [X] associate_role_to_group - [ ] associate_service_role_to_account - [ ] create_connector_definition - [ ] create_connector_definition_version - [X] create_core_definition - [X] create_core_definition_version -- [ ] create_deployment +- [X] create_deployment - [X] create_device_definition - [X] create_device_definition_version - [X] create_function_definition @@ -3010,16 +3030,16 @@ - [ ] delete_logger_definition - [X] delete_resource_definition - [X] delete_subscription_definition -- [ ] disassociate_role_from_group +- [X] disassociate_role_from_group - [ ] disassociate_service_role_from_account -- [ ] get_associated_role +- [X] get_associated_role - [ ] get_bulk_deployment_status - [ ] get_connectivity_info - [ ] get_connector_definition - [ ] get_connector_definition_version - [X] get_core_definition - [X] get_core_definition_version -- [ ] get_deployment_status +- [X] get_deployment_status - [X] get_device_definition - [X] get_device_definition_version - [X] get_function_definition @@ -3042,7 +3062,7 @@ - [ ] list_connector_definitions - [X] list_core_definition_versions - [X] list_core_definitions -- [ ] list_deployments +- [X] list_deployments - [X] list_device_definition_versions - [X] list_device_definitions - [X] list_function_definition_versions @@ -3057,7 +3077,7 @@ - [X] list_subscription_definition_versions - [X] list_subscription_definitions - [ ] list_tags_for_resource -- [ ] reset_deployments +- [X] reset_deployments - [ ] start_bulk_deployment - [ ] stop_bulk_deployment - [ ] tag_resource @@ -3077,7 +3097,7 @@ ## guardduty
-17% implemented +16% implemented - [ ] accept_administrator_invitation - [ ] accept_invitation @@ -3097,6 +3117,7 @@ - [ ] delete_members - [ ] delete_publishing_destination - [ ] delete_threat_intel_set +- [ ] describe_malware_scans - [ ] describe_organization_configuration - [ ] describe_publishing_destination - [ ] disable_organization_admin_account @@ -3111,6 +3132,7 @@ - [ ] get_findings_statistics - [ ] get_invitations_count - [ ] get_ip_set +- [ ] get_malware_scan_settings - [ ] get_master_account - [ ] get_member_detectors - [ ] get_members @@ -3137,6 +3159,7 @@ - [X] update_filter - [ ] update_findings_feedback - [ ] update_ip_set +- [ ] update_malware_scan_settings - [ ] update_member_detectors - [ ] update_organization_configuration - [ ] update_publishing_destination @@ -3145,7 +3168,7 @@ ## iam
-73% implemented +74% implemented - [ ] add_client_id_to_open_id_connect_provider - [X] add_role_to_instance_profile @@ -3483,7 +3506,7 @@ - [ ] list_security_profiles_for_target - [ ] list_streams - [ ] list_tags_for_resource -- [x] list_targets_for_policy +- [X] list_targets_for_policy - [ ] list_targets_for_security_profile - [X] list_thing_groups - [X] list_thing_groups_for_thing @@ -3641,7 +3664,7 @@ ## kms
-56% implemented +58% implemented - [X] cancel_key_deletion - [ ] connect_custom_key_store @@ -3680,7 +3703,7 @@ - [X] list_retirable_grants - [X] put_key_policy - [X] re_encrypt -- [ ] replicate_key +- [X] replicate_key - [X] retire_grant - [X] revoke_grant - [X] schedule_key_deletion @@ -3847,7 +3870,7 @@ - [ ] add_flow_media_streams - [X] add_flow_outputs -- [x] add_flow_sources +- [X] add_flow_sources - [X] add_flow_vpc_interfaces - [X] create_flow - [X] delete_flow @@ -3874,12 +3897,12 @@ - [ ] update_flow_entitlement - [ ] update_flow_media_stream - [ ] update_flow_output -- [x] update_flow_source +- [X] update_flow_source
## medialive
-21% implemented +20% implemented - [ ] accept_input_device_transfer - [ ] batch_delete @@ -3924,8 +3947,10 @@ - [ ] list_reservations - [ ] list_tags_for_resource - [ ] purchase_offering +- [ ] reboot_input_device - [ ] reject_input_device_transfer - [X] start_channel +- [ ] start_input_device_maintenance_window - [ ] start_multiplex - [X] stop_channel - [ ] stop_multiplex @@ -4315,6 +4340,7 @@ - [ ] cancel_ingestion - [ ] create_account_customization +- [ ] create_account_subscription - [ ] create_analysis - [ ] create_dashboard - [X] create_data_set @@ -4349,6 +4375,7 @@ - [ ] delete_user_by_principal_id - [ ] describe_account_customization - [ ] describe_account_settings +- [ ] describe_account_subscription - [ ] describe_analysis - [ ] describe_analysis_permissions - [ ] describe_dashboard @@ -4556,6 +4583,7 @@ - [ ] failover_db_cluster - [ ] failover_global_cluster - [X] list_tags_for_resource +- [ ] modify_activity_stream - [ ] modify_certificates - [ ] modify_current_db_cluster_capacity - [ ] modify_custom_db_engine_version @@ -5160,7 +5188,7 @@ ## sagemaker
-16% implemented +15% implemented - [ ] add_association - [X] add_tags @@ -5178,6 +5206,8 @@ - [ ] create_data_quality_job_definition - [ ] create_device_fleet - [ ] create_domain +- [ ] create_edge_deployment_plan +- [ ] create_edge_deployment_stage - [ ] create_edge_packaging_job - [X] create_endpoint - [X] create_endpoint_config @@ -5223,6 +5253,8 @@ - [ ] delete_data_quality_job_definition - [ ] delete_device_fleet - [ ] delete_domain +- [ ] delete_edge_deployment_plan +- [ ] delete_edge_deployment_stage - [X] delete_endpoint - [X] delete_endpoint_config - [X] delete_experiment @@ -5264,11 +5296,13 @@ - [ ] describe_device - [ ] describe_device_fleet - [ ] describe_domain +- [ ] describe_edge_deployment_plan - [ ] describe_edge_packaging_job - [X] describe_endpoint - [X] describe_endpoint_config - [X] describe_experiment - [ ] describe_feature_group +- [ ] describe_feature_metadata - [ ] describe_flow_definition - [ ] describe_human_task_ui - [ ] describe_hyper_parameter_tuning_job @@ -5323,6 +5357,7 @@ - [ ] list_device_fleets - [ ] list_devices - [ ] list_domains +- [ ] list_edge_deployment_plans - [ ] list_edge_packaging_jobs - [ ] list_endpoint_configs - [ ] list_endpoints @@ -5354,6 +5389,7 @@ - [ ] list_pipelines - [X] list_processing_jobs - [ ] list_projects +- [ ] list_stage_devices - [ ] list_studio_lifecycle_configs - [ ] list_subscribed_workteams - [X] list_tags @@ -5373,11 +5409,13 @@ - [X] search - [ ] send_pipeline_execution_step_failure - [ ] send_pipeline_execution_step_success +- [ ] start_edge_deployment_stage - [ ] start_monitoring_schedule - [X] start_notebook_instance - [ ] start_pipeline_execution - [ ] stop_auto_ml_job - [ ] stop_compilation_job +- [ ] stop_edge_deployment_stage - [ ] stop_edge_packaging_job - [ ] stop_hyper_parameter_tuning_job - [ ] stop_inference_recommendations_job @@ -5399,6 +5437,8 @@ - [ ] update_endpoint - [X] update_endpoint_weights_and_capacities - [ ] update_experiment +- [ ] update_feature_group +- [ ] update_feature_metadata - [ ] update_image - [ ] update_model_package - [ ] update_monitoring_schedule @@ -5783,8 +5823,9 @@ ## sso-admin
-25% implemented +21% implemented +- [ ] attach_customer_managed_policy_reference_to_permission_set - [ ] attach_managed_policy_to_permission_set - [X] create_account_assignment - [ ] create_instance_access_control_attribute_configuration @@ -5793,17 +5834,21 @@ - [ ] delete_inline_policy_from_permission_set - [ ] delete_instance_access_control_attribute_configuration - [X] delete_permission_set +- [ ] delete_permissions_boundary_from_permission_set - [ ] describe_account_assignment_creation_status - [ ] describe_account_assignment_deletion_status - [ ] describe_instance_access_control_attribute_configuration - [X] describe_permission_set - [ ] describe_permission_set_provisioning_status +- [ ] detach_customer_managed_policy_reference_from_permission_set - [ ] detach_managed_policy_from_permission_set - [ ] get_inline_policy_for_permission_set +- [ ] get_permissions_boundary_for_permission_set - [ ] list_account_assignment_creation_status - [ ] list_account_assignment_deletion_status - [X] list_account_assignments - [ ] list_accounts_for_provisioned_permission_set +- [ ] list_customer_managed_policy_references_in_permission_set - [ ] list_instances - [ ] list_managed_policies_in_permission_set - [ ] list_permission_set_provisioning_status @@ -5812,6 +5857,7 @@ - [ ] list_tags_for_resource - [ ] provision_permission_set - [ ] put_inline_policy_to_permission_set +- [ ] put_permissions_boundary_to_permission_set - [ ] tag_resource - [ ] untag_resource - [ ] update_instance_access_control_attribute_configuration @@ -6178,6 +6224,7 @@ - lexv2-models - lexv2-runtime - license-manager +- license-manager-user-subscriptions - lightsail - location - lookoutequipment @@ -6224,9 +6271,10 @@ - qldb-session - rbin - rds-data -- redshiftserverless +- redshift-serverless - resiliencehub - robomaker +- rolesanywhere - route53-recovery-cluster - route53-recovery-control-config - route53-recovery-readiness @@ -6272,4 +6320,4 @@ - workspaces - workspaces-web - xray -
+
\ No newline at end of file diff --git a/docs/docs/services/appsync.rst b/docs/docs/services/appsync.rst index 207fbeb34e3f..eb98f44b45db 100644 --- a/docs/docs/services/appsync.rst +++ b/docs/docs/services/appsync.rst @@ -45,6 +45,7 @@ appsync - [ ] delete_resolver - [ ] delete_type - [ ] disassociate_api +- [ ] evaluate_mapping_template - [ ] flush_api_cache - [ ] get_api_association - [ ] get_api_cache diff --git a/docs/docs/services/athena.rst b/docs/docs/services/athena.rst index 28b2db86ca23..5fe5ccf364f0 100644 --- a/docs/docs/services/athena.rst +++ b/docs/docs/services/athena.rst @@ -26,6 +26,7 @@ athena |start-h3| Implemented features for this service |end-h3| - [ ] batch_get_named_query +- [ ] batch_get_prepared_statement - [ ] batch_get_query_execution - [X] create_data_catalog - [X] create_named_query @@ -41,6 +42,7 @@ athena - [ ] get_prepared_statement - [ ] get_query_execution - [ ] get_query_results +- [ ] get_query_runtime_statistics - [ ] get_table_metadata - [X] get_work_group - [X] list_data_catalogs diff --git a/docs/docs/services/autoscaling.rst b/docs/docs/services/autoscaling.rst index d46b0010d327..032b6743accd 100644 --- a/docs/docs/services/autoscaling.rst +++ b/docs/docs/services/autoscaling.rst @@ -40,7 +40,7 @@ autoscaling - [X] delete_lifecycle_hook - [ ] delete_notification_configuration - [X] delete_policy -- [ ] delete_scheduled_action +- [X] delete_scheduled_action - [X] delete_tags - [ ] delete_warm_pool - [ ] describe_account_limits @@ -59,7 +59,7 @@ autoscaling - [X] describe_policies - [ ] describe_scaling_activities - [ ] describe_scaling_process_types -- [ ] describe_scheduled_actions +- [X] describe_scheduled_actions - [X] describe_tags Pagination is not yet implemented. @@ -72,7 +72,7 @@ autoscaling - [X] detach_load_balancer_target_groups - [X] detach_load_balancers - [ ] disable_metrics_collection -- [ ] enable_metrics_collection +- [X] enable_metrics_collection - [ ] enter_standby - [X] execute_policy - [ ] exit_standby @@ -80,7 +80,7 @@ autoscaling - [ ] put_lifecycle_hook - [ ] put_notification_configuration - [X] put_scaling_policy -- [ ] put_scheduled_update_group_action +- [X] put_scheduled_update_group_action - [ ] put_warm_pool - [ ] record_lifecycle_action_heartbeat - [X] resume_processes diff --git a/docs/docs/services/ce.rst b/docs/docs/services/ce.rst new file mode 100644 index 000000000000..75c909a69e41 --- /dev/null +++ b/docs/docs/services/ce.rst @@ -0,0 +1,81 @@ +.. _implementedservice_ce: + +.. |start-h3| raw:: html + +

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

+ +== +ce +== + +.. autoclass:: moto.ce.models.CostExplorerBackend + +|start-h3| Example usage |end-h3| + +.. sourcecode:: python + + @mock_ce + def test_ce_behaviour: + boto3.client("ce") + ... + + + +|start-h3| Implemented features for this service |end-h3| + +- [ ] create_anomaly_monitor +- [ ] create_anomaly_subscription +- [X] create_cost_category_definition + + The EffectiveOn and ResourceTags-parameters are not yet implemented + + +- [ ] delete_anomaly_monitor +- [ ] delete_anomaly_subscription +- [X] delete_cost_category_definition + + The EffectiveOn-parameter is not yet implemented + + +- [X] describe_cost_category_definition + + The EffectiveOn-parameter is not yet implemented + + +- [ ] get_anomalies +- [ ] get_anomaly_monitors +- [ ] get_anomaly_subscriptions +- [ ] get_cost_and_usage +- [ ] get_cost_and_usage_with_resources +- [ ] get_cost_categories +- [ ] get_cost_forecast +- [ ] get_dimension_values +- [ ] get_reservation_coverage +- [ ] get_reservation_purchase_recommendation +- [ ] get_reservation_utilization +- [ ] get_rightsizing_recommendation +- [ ] get_savings_plans_coverage +- [ ] get_savings_plans_purchase_recommendation +- [ ] get_savings_plans_utilization +- [ ] get_savings_plans_utilization_details +- [ ] get_tags +- [ ] get_usage_forecast +- [ ] list_cost_allocation_tags +- [ ] list_cost_category_definitions +- [ ] list_tags_for_resource +- [ ] provide_anomaly_feedback +- [ ] tag_resource +- [ ] untag_resource +- [ ] update_anomaly_monitor +- [ ] update_anomaly_subscription +- [ ] update_cost_allocation_tags_status +- [X] update_cost_category_definition + + The EffectiveOn-parameter is not yet implemented + + + diff --git a/docs/docs/services/codebuild.rst b/docs/docs/services/codebuild.rst index 79d8f104ed54..bab3d904d7c7 100644 --- a/docs/docs/services/codebuild.rst +++ b/docs/docs/services/codebuild.rst @@ -12,8 +12,6 @@ codebuild ========= -.. autoclass:: moto.codebuild.models.CodeBuildBackend - |start-h3| Example usage |end-h3| .. sourcecode:: python diff --git a/docs/docs/services/config.rst b/docs/docs/services/config.rst index cf627508ecda..613345078d9c 100644 --- a/docs/docs/services/config.rst +++ b/docs/docs/services/config.rst @@ -138,6 +138,7 @@ config :return: +- [ ] list_conformance_pack_compliance_scores - [X] list_discovered_resources Queries against AWS Config (non-aggregated) listing function. diff --git a/docs/docs/services/datasync.rst b/docs/docs/services/datasync.rst index ad3282fb54eb..816741248d24 100644 --- a/docs/docs/services/datasync.rst +++ b/docs/docs/services/datasync.rst @@ -29,6 +29,7 @@ datasync - [ ] create_agent - [ ] create_location_efs - [ ] create_location_fsx_lustre +- [ ] create_location_fsx_ontap - [ ] create_location_fsx_open_zfs - [ ] create_location_fsx_windows - [ ] create_location_hdfs @@ -43,6 +44,7 @@ datasync - [ ] describe_agent - [ ] describe_location_efs - [ ] describe_location_fsx_lustre +- [ ] describe_location_fsx_ontap - [ ] describe_location_fsx_open_zfs - [ ] describe_location_fsx_windows - [ ] describe_location_hdfs diff --git a/docs/docs/services/dms.rst b/docs/docs/services/dms.rst index 6a617d723319..e86a0c48655b 100644 --- a/docs/docs/services/dms.rst +++ b/docs/docs/services/dms.rst @@ -103,4 +103,5 @@ dms - [ ] start_replication_task_assessment_run - [X] stop_replication_task - [ ] test_connection +- [ ] update_subscriptions_to_event_bridge diff --git a/docs/docs/services/ec2.rst b/docs/docs/services/ec2.rst index 71cccee9a2cd..89052cfc7c53 100644 --- a/docs/docs/services/ec2.rst +++ b/docs/docs/services/ec2.rst @@ -49,6 +49,7 @@ ec2 - [X] associate_route_table - [X] associate_subnet_cidr_block - [ ] associate_transit_gateway_multicast_domain +- [ ] associate_transit_gateway_policy_table - [X] associate_transit_gateway_route_table - [ ] associate_trunk_interface - [X] associate_vpc_cidr_block @@ -135,9 +136,11 @@ ec2 - [ ] create_transit_gateway_connect_peer - [ ] create_transit_gateway_multicast_domain - [X] create_transit_gateway_peering_attachment +- [ ] create_transit_gateway_policy_table - [ ] create_transit_gateway_prefix_list_reference - [X] create_transit_gateway_route - [X] create_transit_gateway_route_table +- [ ] create_transit_gateway_route_table_announcement - [X] create_transit_gateway_vpc_attachment - [X] create_volume - [X] create_vpc @@ -197,9 +200,11 @@ ec2 - [ ] delete_transit_gateway_connect_peer - [ ] delete_transit_gateway_multicast_domain - [X] delete_transit_gateway_peering_attachment +- [ ] delete_transit_gateway_policy_table - [ ] delete_transit_gateway_prefix_list_reference - [X] delete_transit_gateway_route - [X] delete_transit_gateway_route_table +- [ ] delete_transit_gateway_route_table_announcement - [X] delete_transit_gateway_vpc_attachment - [X] delete_volume - [X] delete_vpc @@ -333,6 +338,8 @@ ec2 - [ ] describe_transit_gateway_connects - [ ] describe_transit_gateway_multicast_domains - [X] describe_transit_gateway_peering_attachments +- [ ] describe_transit_gateway_policy_tables +- [ ] describe_transit_gateway_route_table_announcements - [ ] describe_transit_gateway_route_tables - [X] describe_transit_gateway_vpc_attachments - [X] describe_transit_gateways @@ -396,6 +403,7 @@ ec2 - [X] disassociate_route_table - [X] disassociate_subnet_cidr_block - [ ] disassociate_transit_gateway_multicast_domain +- [ ] disassociate_transit_gateway_policy_table - [X] disassociate_transit_gateway_route_table - [ ] disassociate_trunk_interface - [X] disassociate_vpc_cidr_block @@ -444,6 +452,8 @@ ec2 - [ ] get_subnet_cidr_reservations - [ ] get_transit_gateway_attachment_propagations - [ ] get_transit_gateway_multicast_domain_associations +- [ ] get_transit_gateway_policy_table_associations +- [ ] get_transit_gateway_policy_table_entries - [ ] get_transit_gateway_prefix_list_references - [ ] get_transit_gateway_route_table_associations - [ ] get_transit_gateway_route_table_propagations diff --git a/docs/docs/services/emr-serverless.rst b/docs/docs/services/emr-serverless.rst index 831fa43f8ca4..a4f4b4ebe2e2 100644 --- a/docs/docs/services/emr-serverless.rst +++ b/docs/docs/services/emr-serverless.rst @@ -27,18 +27,18 @@ emr-serverless |start-h3| Implemented features for this service |end-h3| -- [X] cancel_job_run +- [ ] cancel_job_run - [X] create_application - [X] delete_application - [X] get_application -- [X] get_job_run +- [ ] get_job_run - [X] list_applications -- [X] list_job_runs +- [ ] list_job_runs - [ ] list_tags_for_resource - [X] start_application -- [X] start_job_run +- [ ] start_job_run - [X] stop_application - [ ] tag_resource - [ ] untag_resource -- [ ] update_application +- [X] update_application diff --git a/docs/docs/services/glue.rst b/docs/docs/services/glue.rst index 20cc994770c7..d8c76eb34874 100644 --- a/docs/docs/services/glue.rst +++ b/docs/docs/services/glue.rst @@ -55,7 +55,11 @@ glue - [ ] create_partition - [ ] create_partition_index - [X] create_registry -- [ ] create_schema +- [X] create_schema + + The following parameters/features are not yet implemented: Glue Schema Registry: compatibility checks NONE | BACKWARD | BACKWARD_ALL | FORWARD | FORWARD_ALL | FULL | FULL_ALL and Data format parsing and syntax validation. + + - [ ] create_script - [ ] create_security_configuration - [ ] create_session @@ -78,7 +82,7 @@ glue - [ ] delete_partition_index - [ ] delete_registry - [ ] delete_resource_policy -- [ ] delete_schema +- [X] delete_schema - [ ] delete_schema_versions - [ ] delete_security_configuration - [ ] delete_session @@ -119,14 +123,27 @@ glue - [ ] get_ml_transforms - [ ] get_partition - [ ] get_partition_indexes -- [ ] get_partitions +- [X] get_partitions + + See https://docs.aws.amazon.com/glue/latest/webapi/API_GetPartitions.html + for supported expressions. + + Expression caveats: + + - Column names must consist of UPPERCASE, lowercase, dots and underscores only. + - Nanosecond expressions on timestamp columns are rounded to microseconds. + - Literal dates and timestamps must be valid, i.e. no support for February 31st. + - LIKE expressions are converted to Python regexes, escaping special characters. + Only % and _ wildcards are supported, and SQL escaping using [] does not work. + + - [ ] get_plan - [ ] get_registry - [ ] get_resource_policies - [ ] get_resource_policy - [ ] get_schema -- [ ] get_schema_by_definition -- [ ] get_schema_version +- [X] get_schema_by_definition +- [X] get_schema_version - [ ] get_schema_versions_diff - [ ] get_security_configuration - [ ] get_security_configurations @@ -165,10 +182,10 @@ glue - [ ] list_workflows - [ ] put_data_catalog_encryption_settings - [ ] put_resource_policy -- [ ] put_schema_version_metadata +- [X] put_schema_version_metadata - [ ] put_workflow_run_properties - [ ] query_schema_version_metadata -- [ ] register_schema_version +- [X] register_schema_version - [ ] remove_schema_version_metadata - [ ] reset_job_bookmark - [ ] resume_workflow_run diff --git a/docs/docs/services/greengrass.rst b/docs/docs/services/greengrass.rst index eb049bcd1f9b..e524226d6fae 100644 --- a/docs/docs/services/greengrass.rst +++ b/docs/docs/services/greengrass.rst @@ -25,13 +25,13 @@ greengrass |start-h3| Implemented features for this service |end-h3| -- [ ] associate_role_to_group +- [X] associate_role_to_group - [ ] associate_service_role_to_account - [ ] create_connector_definition - [ ] create_connector_definition_version - [X] create_core_definition - [X] create_core_definition_version -- [ ] create_deployment +- [X] create_deployment - [X] create_device_definition - [X] create_device_definition_version - [X] create_function_definition @@ -54,16 +54,16 @@ greengrass - [ ] delete_logger_definition - [X] delete_resource_definition - [X] delete_subscription_definition -- [ ] disassociate_role_from_group +- [X] disassociate_role_from_group - [ ] disassociate_service_role_from_account -- [ ] get_associated_role +- [X] get_associated_role - [ ] get_bulk_deployment_status - [ ] get_connectivity_info - [ ] get_connector_definition - [ ] get_connector_definition_version - [X] get_core_definition - [X] get_core_definition_version -- [ ] get_deployment_status +- [X] get_deployment_status - [X] get_device_definition - [X] get_device_definition_version - [X] get_function_definition @@ -86,7 +86,7 @@ greengrass - [ ] list_connector_definitions - [X] list_core_definition_versions - [X] list_core_definitions -- [ ] list_deployments +- [X] list_deployments - [X] list_device_definition_versions - [X] list_device_definitions - [X] list_function_definition_versions @@ -101,7 +101,7 @@ greengrass - [X] list_subscription_definition_versions - [X] list_subscription_definitions - [ ] list_tags_for_resource -- [ ] reset_deployments +- [X] reset_deployments - [ ] start_bulk_deployment - [ ] stop_bulk_deployment - [ ] tag_resource diff --git a/docs/docs/services/guardduty.rst b/docs/docs/services/guardduty.rst index 3bb95e38aa52..844e750289fc 100644 --- a/docs/docs/services/guardduty.rst +++ b/docs/docs/services/guardduty.rst @@ -43,6 +43,7 @@ guardduty - [ ] delete_members - [ ] delete_publishing_destination - [ ] delete_threat_intel_set +- [ ] describe_malware_scans - [ ] describe_organization_configuration - [ ] describe_publishing_destination - [ ] disable_organization_admin_account @@ -57,6 +58,7 @@ guardduty - [ ] get_findings_statistics - [ ] get_invitations_count - [ ] get_ip_set +- [ ] get_malware_scan_settings - [ ] get_master_account - [ ] get_member_detectors - [ ] get_members @@ -91,6 +93,7 @@ guardduty - [X] update_filter - [ ] update_findings_feedback - [ ] update_ip_set +- [ ] update_malware_scan_settings - [ ] update_member_detectors - [ ] update_organization_configuration - [ ] update_publishing_destination diff --git a/docs/docs/services/iot.rst b/docs/docs/services/iot.rst index 4d4e0395001c..8f71f60b14d5 100644 --- a/docs/docs/services/iot.rst +++ b/docs/docs/services/iot.rst @@ -225,7 +225,7 @@ iot - [ ] list_security_profiles_for_target - [ ] list_streams - [ ] list_tags_for_resource -- [ ] list_targets_for_policy +- [X] list_targets_for_policy - [ ] list_targets_for_security_profile - [X] list_thing_groups - [X] list_thing_groups_for_thing diff --git a/docs/docs/services/kms.rst b/docs/docs/services/kms.rst index a123a1656154..0667f308282e 100644 --- a/docs/docs/services/kms.rst +++ b/docs/docs/services/kms.rst @@ -64,7 +64,7 @@ kms - [X] list_retirable_grants - [X] put_key_policy - [X] re_encrypt -- [ ] replicate_key +- [X] replicate_key - [X] retire_grant - [X] revoke_grant - [X] schedule_key_deletion diff --git a/docs/docs/services/mediaconnect.rst b/docs/docs/services/mediaconnect.rst index 05420924ba1e..311121e841f0 100644 --- a/docs/docs/services/mediaconnect.rst +++ b/docs/docs/services/mediaconnect.rst @@ -27,7 +27,7 @@ mediaconnect - [ ] add_flow_media_streams - [X] add_flow_outputs -- [ ] add_flow_sources +- [X] add_flow_sources - [X] add_flow_vpc_interfaces - [X] create_flow - [X] delete_flow @@ -54,5 +54,5 @@ mediaconnect - [ ] update_flow_entitlement - [ ] update_flow_media_stream - [ ] update_flow_output -- [ ] update_flow_source +- [X] update_flow_source diff --git a/docs/docs/services/medialive.rst b/docs/docs/services/medialive.rst index 538f34f90c04..d7574a94dbaf 100644 --- a/docs/docs/services/medialive.rst +++ b/docs/docs/services/medialive.rst @@ -76,8 +76,10 @@ medialive - [ ] list_reservations - [ ] list_tags_for_resource - [ ] purchase_offering +- [ ] reboot_input_device - [ ] reject_input_device_transfer - [X] start_channel +- [ ] start_input_device_maintenance_window - [ ] start_multiplex - [X] stop_channel - [ ] stop_multiplex diff --git a/docs/docs/services/quicksight.rst b/docs/docs/services/quicksight.rst index a1c6c4df0eea..27722097de1b 100644 --- a/docs/docs/services/quicksight.rst +++ b/docs/docs/services/quicksight.rst @@ -29,6 +29,7 @@ quicksight - [ ] cancel_ingestion - [ ] create_account_customization +- [ ] create_account_subscription - [ ] create_analysis - [ ] create_dashboard - [X] create_data_set @@ -63,6 +64,7 @@ quicksight - [ ] delete_user_by_principal_id - [ ] describe_account_customization - [ ] describe_account_settings +- [ ] describe_account_subscription - [ ] describe_analysis - [ ] describe_analysis_permissions - [ ] describe_dashboard diff --git a/docs/docs/services/rds.rst b/docs/docs/services/rds.rst index 06d1a4994501..01458fb45425 100644 --- a/docs/docs/services/rds.rst +++ b/docs/docs/services/rds.rst @@ -113,6 +113,7 @@ rds - [ ] failover_db_cluster - [ ] failover_global_cluster - [X] list_tags_for_resource +- [ ] modify_activity_stream - [ ] modify_certificates - [ ] modify_current_db_cluster_capacity - [ ] modify_custom_db_engine_version diff --git a/docs/docs/services/sagemaker.rst b/docs/docs/services/sagemaker.rst index a5089f1a8450..3896315fbc3c 100644 --- a/docs/docs/services/sagemaker.rst +++ b/docs/docs/services/sagemaker.rst @@ -41,6 +41,8 @@ sagemaker - [ ] create_data_quality_job_definition - [ ] create_device_fleet - [ ] create_domain +- [ ] create_edge_deployment_plan +- [ ] create_edge_deployment_stage - [ ] create_edge_packaging_job - [X] create_endpoint - [X] create_endpoint_config @@ -86,6 +88,8 @@ sagemaker - [ ] delete_data_quality_job_definition - [ ] delete_device_fleet - [ ] delete_domain +- [ ] delete_edge_deployment_plan +- [ ] delete_edge_deployment_stage - [X] delete_endpoint - [X] delete_endpoint_config - [X] delete_experiment @@ -127,11 +131,13 @@ sagemaker - [ ] describe_device - [ ] describe_device_fleet - [ ] describe_domain +- [ ] describe_edge_deployment_plan - [ ] describe_edge_packaging_job - [X] describe_endpoint - [X] describe_endpoint_config - [X] describe_experiment - [ ] describe_feature_group +- [ ] describe_feature_metadata - [ ] describe_flow_definition - [ ] describe_human_task_ui - [ ] describe_hyper_parameter_tuning_job @@ -186,6 +192,7 @@ sagemaker - [ ] list_device_fleets - [ ] list_devices - [ ] list_domains +- [ ] list_edge_deployment_plans - [ ] list_edge_packaging_jobs - [ ] list_endpoint_configs - [ ] list_endpoints @@ -217,6 +224,7 @@ sagemaker - [ ] list_pipelines - [X] list_processing_jobs - [ ] list_projects +- [ ] list_stage_devices - [ ] list_studio_lifecycle_configs - [ ] list_subscribed_workteams - [X] list_tags @@ -236,11 +244,13 @@ sagemaker - [X] search - [ ] send_pipeline_execution_step_failure - [ ] send_pipeline_execution_step_success +- [ ] start_edge_deployment_stage - [ ] start_monitoring_schedule - [X] start_notebook_instance - [ ] start_pipeline_execution - [ ] stop_auto_ml_job - [ ] stop_compilation_job +- [ ] stop_edge_deployment_stage - [ ] stop_edge_packaging_job - [ ] stop_hyper_parameter_tuning_job - [ ] stop_inference_recommendations_job @@ -262,6 +272,8 @@ sagemaker - [ ] update_endpoint - [X] update_endpoint_weights_and_capacities - [ ] update_experiment +- [ ] update_feature_group +- [ ] update_feature_metadata - [ ] update_image - [ ] update_model_package - [ ] update_monitoring_schedule diff --git a/docs/docs/services/sso-admin.rst b/docs/docs/services/sso-admin.rst index f241125df35e..07eb000e2a80 100644 --- a/docs/docs/services/sso-admin.rst +++ b/docs/docs/services/sso-admin.rst @@ -27,6 +27,7 @@ sso-admin |start-h3| Implemented features for this service |end-h3| +- [ ] attach_customer_managed_policy_reference_to_permission_set - [ ] attach_managed_policy_to_permission_set - [X] create_account_assignment - [ ] create_instance_access_control_attribute_configuration @@ -35,13 +36,16 @@ sso-admin - [ ] delete_inline_policy_from_permission_set - [ ] delete_instance_access_control_attribute_configuration - [X] delete_permission_set +- [ ] delete_permissions_boundary_from_permission_set - [ ] describe_account_assignment_creation_status - [ ] describe_account_assignment_deletion_status - [ ] describe_instance_access_control_attribute_configuration - [X] describe_permission_set - [ ] describe_permission_set_provisioning_status +- [ ] detach_customer_managed_policy_reference_from_permission_set - [ ] detach_managed_policy_from_permission_set - [ ] get_inline_policy_for_permission_set +- [ ] get_permissions_boundary_for_permission_set - [ ] list_account_assignment_creation_status - [ ] list_account_assignment_deletion_status - [X] list_account_assignments @@ -50,6 +54,7 @@ sso-admin - [ ] list_accounts_for_provisioned_permission_set +- [ ] list_customer_managed_policy_references_in_permission_set - [ ] list_instances - [ ] list_managed_policies_in_permission_set - [ ] list_permission_set_provisioning_status @@ -58,6 +63,7 @@ sso-admin - [ ] list_tags_for_resource - [ ] provision_permission_set - [ ] put_inline_policy_to_permission_set +- [ ] put_permissions_boundary_to_permission_set - [ ] tag_resource - [ ] untag_resource - [ ] update_instance_access_control_attribute_configuration diff --git a/moto/glue/models.py b/moto/glue/models.py index 9dc2f96a9434..3948e1c337fb 100644 --- a/moto/glue/models.py +++ b/moto/glue/models.py @@ -137,6 +137,22 @@ def delete_table(self, database_name, table_name): raise TableNotFoundException(table_name) return {} + def get_partitions(self, database_name, table_name, expression): + """ + See https://docs.aws.amazon.com/glue/latest/webapi/API_GetPartitions.html + for supported expressions. + + Expression caveats: + + - Column names must consist of UPPERCASE, lowercase, dots and underscores only. + - Nanosecond expressions on timestamp columns are rounded to microseconds. + - Literal dates and timestamps must be valid, i.e. no support for February 31st. + - LIKE expressions are converted to Python regexes, escaping special characters. + Only % and _ wildcards are supported, and SQL escaping using [] does not work. + """ + table = self.get_table(database_name, table_name) + return table.get_partitions(expression) + def create_crawler( self, name, @@ -278,7 +294,6 @@ def untag_resource(self, resource_arn, tag_keys): self.tagger.untag_resource_using_names(resource_arn, tag_keys) def create_registry(self, registry_name, description=None, tags=None): - """CreateRegistry API""" # If registry name id default-registry, create default-registry if registry_name == DEFAULT_REGISTRY_NAME: registry = FakeRegistry(registry_name, description, tags) @@ -302,10 +317,8 @@ def create_schema( description=None, tags=None, ): - """CrateSchema API""" """ The following parameters/features are not yet implemented: Glue Schema Registry: compatibility checks NONE | BACKWARD | BACKWARD_ALL | FORWARD | FORWARD_ALL | FULL | FULL_ALL and Data format parsing and syntax validation. - .... """ # Validate Registry Id @@ -352,7 +365,6 @@ def create_schema( return schema.as_dict() def register_schema_version(self, schema_id, schema_definition): - """RegisterSchemaVersion API""" # Validate Schema Id registry_name, schema_name, schema_arn = validate_schema_id( schema_id, self.registries @@ -409,8 +421,6 @@ def register_schema_version(self, schema_id, schema_definition): def get_schema_version( self, schema_id=None, schema_version_id=None, schema_version_number=None ): - """GetSchemaVersion API""" - # Validate Schema Parameters ( schema_version_id, @@ -456,7 +466,6 @@ def get_schema_version( ) def get_schema_by_definition(self, schema_id, schema_definition): - """GetSchemaByDefinition API""" # Validate SchemaId validate_schema_definition_length(schema_definition) registry_name, schema_name, schema_arn = validate_schema_id( @@ -480,7 +489,6 @@ def get_schema_by_definition(self, schema_id, schema_definition): def put_schema_version_metadata( self, schema_id, schema_version_number, schema_version_id, metadata_key_value ): - """PutSchemaVersionMetadata API""" # Validate metadata_key_value and schema version params ( metadata_key, @@ -551,7 +559,6 @@ def put_schema_version_metadata( ) def delete_schema(self, schema_id): - """DeleteSchema API""" # Validate schema_id registry_name, schema_name, _ = validate_schema_id(schema_id, self.registries) @@ -635,17 +642,6 @@ def create_partition(self, partiton_input): self.partitions[str(partition.values)] = partition def get_partitions(self, expression): - """See https://docs.aws.amazon.com/glue/latest/webapi/API_GetPartitions.html - for supported expressions. - - Expression caveats: - - - Column names must consist of UPPERCASE, lowercase, dots and underscores only. - - Nanosecond expressions on timestamp columns are rounded to microseconds. - - Literal dates and timestamps must be valid, i.e. no support for February 31st. - - LIKE expressions are converted to Python regexes, escaping special characters. - Only % and _ wildcards are supported, and SQL escaping using [] does not work. - """ return list(filter(PartitionFilter(expression, self), self.partitions.values())) def get_partition(self, values): diff --git a/moto/glue/responses.py b/moto/glue/responses.py index 636a629d785d..6d96358b0168 100644 --- a/moto/glue/responses.py +++ b/moto/glue/responses.py @@ -132,12 +132,12 @@ def get_partitions(self): database_name = self.parameters.get("DatabaseName") table_name = self.parameters.get("TableName") expression = self.parameters.get("Expression") - table = self.glue_backend.get_table(database_name, table_name) - - return json.dumps( - {"Partitions": [p.as_dict() for p in table.get_partitions(expression)]} + partitions = self.glue_backend.get_partitions( + database_name, table_name, expression ) + return json.dumps({"Partitions": [p.as_dict() for p in partitions]}) + def get_partition(self): database_name = self.parameters.get("DatabaseName") table_name = self.parameters.get("TableName")