Repository: getmoto/moto (python)

Issue:
put_public_access_block marked as unimplemented for s3
In http://docs.getmoto.org/en/latest/docs/services/s3.html, `put_public_access_block` is marked as unimplemented.  `get_public_access_block` and `delete_public_access_block` are marked as implemented.

I notice that all three are marked as implemented for `s3control`.  (If I understand correctly, `S3Control.Client.put_public_access_block` is for setting *account-wide* restrictions, whereas `S3.Client.put_public_access_block` is for *per-bucket* restrictions.)

According to CHANGELOG.md, all three methods were implemented for both `s3` and `s3control` in version 1.3.16.


Pull request:
Docs: mark S3:put_public_access_block() as implemented
Fixes #7034 

Patch:
diff --git a/IMPLEMENTATION_COVERAGE.md b/IMPLEMENTATION_COVERAGE.md
index 104eeb140..5d8ba44d1 100644
--- a/IMPLEMENTATION_COVERAGE.md
+++ b/IMPLEMENTATION_COVERAGE.md
@@ -6173,7 +6173,7 @@
 
 ## s3
 <details>
-<summary>64% implemented</summary>
+<summary>65% implemented</summary>
 
 - [X] abort_multipart_upload
 - [X] complete_multipart_upload
@@ -6266,7 +6266,7 @@
 - [X] put_object_lock_configuration
 - [X] put_object_retention
 - [ ] put_object_tagging
-- [ ] put_public_access_block
+- [X] put_public_access_block
 - [ ] restore_object
 - [X] select_object_content
 - [X] upload_part
diff --git a/docs/docs/services/s3.rst b/docs/docs/services/s3.rst
index 963946db5..c6c12a224 100644
--- a/docs/docs/services/s3.rst
+++ b/docs/docs/services/s3.rst
@@ -143,7 +143,7 @@ s3
 - [X] put_object_lock_configuration
 - [X] put_object_retention
 - [ ] put_object_tagging
-- [ ] put_public_access_block
+- [X] put_public_access_block
 - [ ] restore_object
 - [X] select_object_content
   
diff --git a/moto/s3/models.py b/moto/s3/models.py
index a1fee0a4d..63adababf 100644
--- a/moto/s3/models.py
+++ b/moto/s3/models.py
@@ -2235,7 +2235,7 @@ class S3Backend(BaseBackend, CloudWatchMetricProvider):
             raise InvalidRequest("PutBucketAccelerateConfiguration")
         bucket.set_accelerate_configuration(accelerate_configuration)
 
-    def put_bucket_public_access_block(
+    def put_public_access_block(
         self, bucket_name: str, pub_block_config: Optional[Dict[str, Any]]
     ) -> None:
         bucket = self.get_bucket(bucket_name)
diff --git a/moto/s3/responses.py b/moto/s3/responses.py
index 99f73e067..1d8eb6eb7 100644
--- a/moto/s3/responses.py
+++ b/moto/s3/responses.py
@@ -922,7 +922,7 @@ class S3Response(BaseResponse):
 
         elif "publicAccessBlock" in querystring:
             pab_config = self._parse_pab_config()
-            self.backend.put_bucket_public_access_block(
+            self.backend.put_public_access_block(
                 bucket_name, pab_config["PublicAccessBlockConfiguration"]
             )
             return ""


Test patch:
diff --git a/tests/test_s3/test_s3_config.py b/tests/test_s3/test_s3_config.py
index b40289848..040984ed0 100644
--- a/tests/test_s3/test_s3_config.py
+++ b/tests/test_s3/test_s3_config.py
@@ -22,9 +22,7 @@ def test_s3_public_access_block_to_config_dict():
     }
 
     # Add a public access block:
-    s3_config_query_backend.put_bucket_public_access_block(
-        "bucket1", public_access_block
-    )
+    s3_config_query_backend.put_public_access_block("bucket1", public_access_block)
 
     result = s3_config_query_backend.buckets[
         "bucket1"