diff --git a/CHANGELOG.md b/CHANGELOG.md index 364d481dd..713de2db7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,32 @@ Moto Changelog ============== +3.1.10 +----- +Docker Digest for 3.1.10: + + New Methods: + * APIGateway: + * import_rest_api() + * put_rest_api() + * Glue: + * get_tags() + * tag_resource() + * untag_resource() + + Miscellaneous: + * APIGateway:put_integration() now supports the passthroughBehavior-parameter + * APIGatewayV2:create_authorizer() now supports the AuthorizerPayloadFormatVersion-parameter + * AWSLamba:publish_layer_version() now supports the CompatibleArchitectures-parameter + * DAX:create_cluster() now supports the ClusterEndpointEncryptionType-parameter + * EC2:describe_route_tables() now supports the filter `route.gateway-id` + * EC2:run_instances() now validates whether the Placement-parameter has a valid availabilty zone + * ECS:list_services() now supports the launchType-parameter + * ELB:describe_instance_health() now returns the OutOfService-status when appropriate + * Organizations:list_accounts_for_parent() now supports pagination + * Organizations:list_organizational_units_for_parent() now supports pagination + + 3.1.9 ----- Docker Digest for 3.1.9: _sha256:eea31d2f99b2fef16cffb3ea86d21dd911647835a3182bedd8918074292ce552_ diff --git a/IMPLEMENTATION_COVERAGE.md b/IMPLEMENTATION_COVERAGE.md index e08af8d2f..643365cf1 100644 --- a/IMPLEMENTATION_COVERAGE.md +++ b/IMPLEMENTATION_COVERAGE.md @@ -2663,7 +2663,7 @@ ## glue
-10% implemented +12% implemented - [ ] batch_create_partition - [ ] batch_delete_connection @@ -2776,7 +2776,7 @@ - [ ] get_table_version - [ ] get_table_versions - [X] get_tables -- [ ] get_tags +- [X] get_tags - [ ] get_trigger - [ ] get_triggers - [ ] get_unfiltered_partition_metadata @@ -2828,8 +2828,8 @@ - [ ] stop_session - [ ] stop_trigger - [ ] stop_workflow_run -- [ ] tag_resource -- [ ] untag_resource +- [X] tag_resource +- [X] untag_resource - [ ] update_blueprint - [ ] update_classifier - [ ] update_column_statistics_for_partition @@ -4194,6 +4194,7 @@ - [X] update_group - [ ] update_iam_policy_assignment - [ ] update_ip_restriction +- [ ] update_public_sharing_settings - [ ] update_template - [ ] update_template_alias - [ ] update_template_permissions diff --git a/docs/docs/services/cloudformation.rst b/docs/docs/services/cloudformation.rst index 9d9a43a17..41d114097 100644 --- a/docs/docs/services/cloudformation.rst +++ b/docs/docs/services/cloudformation.rst @@ -12,6 +12,8 @@ cloudformation ============== +.. autoclass:: moto.cloudformation.models.CloudFormationBackend + |start-h3| Example usage |end-h3| .. sourcecode:: python diff --git a/docs/docs/services/cognito-idp.rst b/docs/docs/services/cognito-idp.rst index 466fc46cb..5f9265ad6 100644 --- a/docs/docs/services/cognito-idp.rst +++ b/docs/docs/services/cognito-idp.rst @@ -81,7 +81,9 @@ cognito-idp - [X] describe_user_pool_domain - [ ] forget_device - [X] forgot_password - The ForgotPassword operation is partially broken in AWS. If the input is 100% correct it works fine. + + The ForgotPassword operation is partially broken in AWS. If the input is 100% correct it works fine. + Otherwise you get semi-random garbage and HTTP 200 OK, for example: - recovery for username which is not registered in any cognito pool - recovery for username belonging to a different user pool than the client id is registered to diff --git a/docs/docs/services/dax.rst b/docs/docs/services/dax.rst index df7771e1b..bd10c023f 100644 --- a/docs/docs/services/dax.rst +++ b/docs/docs/services/dax.rst @@ -28,7 +28,7 @@ dax - [X] create_cluster The following parameters are not yet processed: - AvailabilityZones, SubnetGroupNames, SecurityGroups, PreferredMaintenanceWindow, NotificationTopicArn, ParameterGroupName, ClusterEndpointEncryptionType + AvailabilityZones, SubnetGroupNames, SecurityGroups, PreferredMaintenanceWindow, NotificationTopicArn, ParameterGroupName - [ ] create_parameter_group diff --git a/docs/docs/services/ec2.rst b/docs/docs/services/ec2.rst index 555f9feee..0cf688f81 100644 --- a/docs/docs/services/ec2.rst +++ b/docs/docs/services/ec2.rst @@ -563,6 +563,13 @@ ec2 - [X] revoke_security_group_egress - [X] revoke_security_group_ingress - [X] run_instances + + The Placement-parameter is validated to verify the availability-zone exists for the current region. + + The InstanceType-parameter can be validated, to see if it is a known instance-type. + This validation can be enabled by setting the environment variable `MOTO_EC2_ENABLE_INSTANCE_TYPE_VALIDATION=true` + + - [ ] run_scheduled_instances - [ ] search_local_gateway_routes - [ ] search_transit_gateway_multicast_groups diff --git a/docs/docs/services/events.rst b/docs/docs/services/events.rst index cf459b4e9..b74823e12 100644 --- a/docs/docs/services/events.rst +++ b/docs/docs/services/events.rst @@ -30,6 +30,7 @@ events - [X] create_api_destination Creates an API destination, which is an HTTP invocation endpoint configured as a target for events. + Docs: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_CreateApiDestination.html @@ -47,6 +48,7 @@ events - [X] delete_api_destination Deletes the specified API destination. + Docs: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeleteApiDestination.html @@ -65,6 +67,7 @@ events - [X] delete_connection Deletes a connection. + Docs: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeleteConnection.html @@ -85,6 +88,7 @@ events - [X] describe_api_destination Retrieves details about an API destination. + Docs: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DescribeApiDestination.html Args: @@ -98,6 +102,7 @@ events - [X] describe_connection Retrieves details about a connection. + Docs: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DescribeConnection.html @@ -146,6 +151,7 @@ events - [X] update_api_destination Creates an API destination, which is an HTTP invocation endpoint configured as a target for events. + Docs: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_UpdateApiDestination.html diff --git a/docs/docs/services/glue.rst b/docs/docs/services/glue.rst index 611ae3732..134671c62 100644 --- a/docs/docs/services/glue.rst +++ b/docs/docs/services/glue.rst @@ -136,7 +136,7 @@ glue - [ ] get_table_version - [ ] get_table_versions - [X] get_tables -- [ ] get_tags +- [X] get_tags - [ ] get_trigger - [ ] get_triggers - [ ] get_unfiltered_partition_metadata @@ -188,8 +188,8 @@ glue - [ ] stop_session - [ ] stop_trigger - [ ] stop_workflow_run -- [ ] tag_resource -- [ ] untag_resource +- [X] tag_resource +- [X] untag_resource - [ ] update_blueprint - [ ] update_classifier - [ ] update_column_statistics_for_partition diff --git a/docs/docs/services/iot-data.rst b/docs/docs/services/iot-data.rst index ba4b2a1db..146a5d599 100644 --- a/docs/docs/services/iot-data.rst +++ b/docs/docs/services/iot-data.rst @@ -26,10 +26,6 @@ iot-data |start-h3| Implemented features for this service |end-h3| - [X] delete_thing_shadow - after deleting, get_thing_shadow will raise ResourceNotFound. - But version of the shadow keep increasing... - - - [ ] get_retained_message - [X] get_thing_shadow - [ ] list_named_shadows_for_thing diff --git a/docs/docs/services/quicksight.rst b/docs/docs/services/quicksight.rst index 9c4885362..a1c6c4df0 100644 --- a/docs/docs/services/quicksight.rst +++ b/docs/docs/services/quicksight.rst @@ -154,6 +154,7 @@ quicksight - [X] update_group - [ ] update_iam_policy_assignment - [ ] update_ip_restriction +- [ ] update_public_sharing_settings - [ ] update_template - [ ] update_template_alias - [ ] update_template_permissions diff --git a/docs/docs/services/secretsmanager.rst b/docs/docs/services/secretsmanager.rst index d04e3542c..c913c3ca2 100644 --- a/docs/docs/services/secretsmanager.rst +++ b/docs/docs/services/secretsmanager.rst @@ -35,33 +35,6 @@ secretsmanager - [X] get_secret_value - [X] list_secret_version_ids - [X] list_secrets - - Returns secrets from secretsmanager. - The result is paginated and page items depends on the token value, because token contains start element - number of secret list. - Response example: - { - SecretList: [ - { - ARN: 'arn:aws:secretsmanager:us-east-1:1234567890:secret:test1-gEcah', - Name: 'test1', - ... - }, - { - ARN: 'arn:aws:secretsmanager:us-east-1:1234567890:secret:test2-KZwml', - Name: 'test2', - ... - } - ], - NextToken: '2' - } - - :param filters: (List) Filter parameters. - :param max_results: (int) Max number of results per page. - :param next_token: (str) Page token. - :return: (Tuple[List,str]) Returns result list and next token. - - - [ ] put_resource_policy - [X] put_secret_value - [ ] remove_regions_from_replication diff --git a/docs/requirements.txt b/docs/requirements.txt index b9567f03a..a12d5bd7f 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,3 +4,5 @@ readthedocs-sphinx-search==0.1.1 # Modules necessary to import individual classes and read the docstrings docker +openapi_spec_validator +PyYAML>=5.1 diff --git a/moto/cognitoidp/models.py b/moto/cognitoidp/models.py index 0fb33d618..7c8a8e5cc 100644 --- a/moto/cognitoidp/models.py +++ b/moto/cognitoidp/models.py @@ -1384,7 +1384,9 @@ class CognitoIdpBackend(BaseBackend): raise ResourceNotFoundError(client_id) def forgot_password(self, client_id, username): - """The ForgotPassword operation is partially broken in AWS. If the input is 100% correct it works fine. + """ + The ForgotPassword operation is partially broken in AWS. If the input is 100% correct it works fine. + Otherwise you get semi-random garbage and HTTP 200 OK, for example: - recovery for username which is not registered in any cognito pool - recovery for username belonging to a different user pool than the client id is registered to diff --git a/moto/ec2/models/instances.py b/moto/ec2/models/instances.py index 90a98942e..ef5b3ba37 100644 --- a/moto/ec2/models/instances.py +++ b/moto/ec2/models/instances.py @@ -652,6 +652,12 @@ class InstanceBackend(object): return new_reservation def run_instances(self): + """ + The Placement-parameter is validated to verify the availability-zone exists for the current region. + + The InstanceType-parameter can be validated, to see if it is a known instance-type. + This validation can be enabled by setting the environment variable `MOTO_EC2_ENABLE_INSTANCE_TYPE_VALIDATION=true` + """ # Logic resides in add_instances # Fake method here to make implementation coverage script aware that this method is implemented pass diff --git a/moto/events/models.py b/moto/events/models.py index 922ee5c30..2a6e572cd 100644 --- a/moto/events/models.py +++ b/moto/events/models.py @@ -785,6 +785,7 @@ class Destination(BaseModel): def describe(self): """ Describes the Destination object as a dict + Docs: Response Syntax in https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DescribeApiDestination.html @@ -1676,6 +1677,7 @@ class EventsBackend(BaseBackend): def describe_connection(self, name): """ Retrieves details about a connection. + Docs: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DescribeConnection.html @@ -1699,6 +1701,7 @@ class EventsBackend(BaseBackend): def delete_connection(self, name): """ Deletes a connection. + Docs: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeleteConnection.html @@ -1730,6 +1733,7 @@ class EventsBackend(BaseBackend): ): """ Creates an API destination, which is an HTTP invocation endpoint configured as a target for events. + Docs: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_CreateApiDestination.html @@ -1755,6 +1759,7 @@ class EventsBackend(BaseBackend): def describe_api_destination(self, name): """ Retrieves details about an API destination. + Docs: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DescribeApiDestination.html Args: @@ -1773,6 +1778,7 @@ class EventsBackend(BaseBackend): def update_api_destination(self, *, name, **kwargs): """ Creates an API destination, which is an HTTP invocation endpoint configured as a target for events. + Docs: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_UpdateApiDestination.html @@ -1793,6 +1799,7 @@ class EventsBackend(BaseBackend): def delete_api_destination(self, name): """ Deletes the specified API destination. + Docs: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_DeleteApiDestination.html diff --git a/moto/iotdata/models.py b/moto/iotdata/models.py index 60f0c3e24..fe60401da 100644 --- a/moto/iotdata/models.py +++ b/moto/iotdata/models.py @@ -186,9 +186,6 @@ class IoTDataPlaneBackend(BaseBackend): return thing.thing_shadow def delete_thing_shadow(self, thing_name): - """after deleting, get_thing_shadow will raise ResourceNotFound. - But version of the shadow keep increasing... - """ thing = iot_backends[self.region_name].describe_thing(thing_name) if thing.thing_shadow is None: raise ResourceNotFoundException() diff --git a/moto/secretsmanager/models.py b/moto/secretsmanager/models.py index 1109d4c13..b0237729c 100644 --- a/moto/secretsmanager/models.py +++ b/moto/secretsmanager/models.py @@ -636,32 +636,6 @@ class SecretsManagerBackend(BaseBackend): def list_secrets( self, filters: List, max_results: int = 100, next_token: str = None ) -> Tuple[List, str]: - """ - Returns secrets from secretsmanager. - The result is paginated and page items depends on the token value, because token contains start element - number of secret list. - Response example: - { - SecretList: [ - { - ARN: 'arn:aws:secretsmanager:us-east-1:1234567890:secret:test1-gEcah', - Name: 'test1', - ... - }, - { - ARN: 'arn:aws:secretsmanager:us-east-1:1234567890:secret:test2-KZwml', - Name: 'test2', - ... - } - ], - NextToken: '2' - } - - :param filters: (List) Filter parameters. - :param max_results: (int) Max number of results per page. - :param next_token: (str) Page token. - :return: (Tuple[List,str]) Returns result list and next token. - """ secret_list = [] for secret in self.secrets.values(): if _matches(secret, filters):