]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/radosgw: format POST statements 54850/head
authorZac Dover <zac.dover@proton.me>
Sat, 9 Dec 2023 03:46:00 +0000 (04:46 +0100)
committerZac Dover <zac.dover@proton.me>
Sun, 10 Dec 2023 10:55:07 +0000 (11:55 +0100)
Format the POST methods so that they appear in the rendered text as
examples of POST API calls and not as plain old unformatted text, which
is how they looked before this commit. The content of these API calls
remains to be tested and confirmed to work, but this is a first step.

Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit 1c0901cf8503ca8486dee8875ce85adaa464b127)

doc/radosgw/role.rst

index 603b017e2c60113d32796fd475f941b389ab29ac..2e6ca43a07148d010695fee556640c1cbb0ccce4 100644 (file)
@@ -31,7 +31,7 @@ Request Parameters
 :Description: The trust relationship policy document that grants an entity permission to assume the role.
 :Type: String
 
-For example::  
+For example::
        
   radosgw-admin role create --role-name=S3Access1 --path=/application_abc/component_xyz/ --assume-role-policy-doc=\{\"Version\":\"2012-10-17\",\"Statement\":\[\{\"Effect\":\"Allow\",\"Principal\":\{\"AWS\":\[\"arn:aws:iam:::user/TESTER\"\]\},\"Action\":\[\"sts:AssumeRole\"\]\}\]\}
   
@@ -304,6 +304,7 @@ Create a Role
 -------------
 
 Example::
+
   POST "<hostname>?Action=CreateRole&RoleName=S3Access&Path=/application_abc/component_xyz/&AssumeRolePolicyDocument=\{\"Version\":\"2012-10-17\",\"Statement\":\[\{\"Effect\":\"Allow\",\"Principal\":\{\"AWS\":\[\"arn:aws:iam:::user/TESTER\"\]\},\"Action\":\[\"sts:AssumeRole\"\]\}\]\}"
 
 .. code-block:: XML
@@ -323,6 +324,7 @@ Delete a Role
 -------------
 
 Example::
+
   POST "<hostname>?Action=DeleteRole&RoleName=S3Access"
 
 Note: A role can be deleted only when it doesn't have any permission policy attached to it.
@@ -331,6 +333,7 @@ Get a Role
 ----------
 
 Example::
+
   POST "<hostname>?Action=GetRole&RoleName=S3Access"
 
 .. code-block:: XML
@@ -350,6 +353,7 @@ List Roles
 ----------
 
 Example::
+
   POST "<hostname>?Action=ListRoles&RoleName=S3Access&PathPrefix=/application"
 
 .. code-block:: XML
@@ -369,18 +373,21 @@ Update Assume Role Policy Document
 ----------------------------------
 
 Example::
+
   POST "<hostname>?Action=UpdateAssumeRolePolicy&RoleName=S3Access&PolicyDocument=\{\"Version\":\"2012-10-17\",\"Statement\":\[\{\"Effect\":\"Allow\",\"Principal\":\{\"AWS\":\[\"arn:aws:iam:::user/TESTER2\"\]\},\"Action\":\[\"sts:AssumeRole\"\]\}\]\}"
 
 Add/ Update a Policy attached to a Role
 ---------------------------------------
 
 Example::
+
   POST "<hostname>?Action=PutRolePolicy&RoleName=S3Access&PolicyName=Policy1&PolicyDocument=\{\"Version\":\"2012-10-17\",\"Statement\":\[\{\"Effect\":\"Allow\",\"Action\":\[\"s3:CreateBucket\"\],\"Resource\":\"arn:aws:s3:::example_bucket\"\}\]\}"
 
 List Permission Policy Names attached to a Role
 -----------------------------------------------
 
 Example::
+
   POST "<hostname>?Action=ListRolePolicies&RoleName=S3Access"
 
 .. code-block:: XML
@@ -394,6 +401,7 @@ Get Permission Policy attached to a Role
 ----------------------------------------
 
 Example::
+
   POST "<hostname>?Action=GetRolePolicy&RoleName=S3Access&PolicyName=Policy1"
 
 .. code-block:: XML
@@ -409,6 +417,7 @@ Delete Policy attached to a Role
 --------------------------------
 
 Example::
+
   POST "<hostname>?Action=DeleteRolePolicy&RoleName=S3Access&PolicyName=Policy1"
 
 Tag a role
@@ -417,6 +426,7 @@ A role can have multivalued tags attached to it. These tags can be passed in as
 AWS does not support multi-valued role tags.
 
 Example::
+
   POST "<hostname>?Action=TagRole&RoleName=S3Access&Tags.member.1.Key=Department&Tags.member.1.Value=Engineering"
 
 .. code-block:: XML
@@ -433,6 +443,7 @@ List role tags
 Lists the tags attached to a role.
 
 Example::
+
   POST "<hostname>?Action=ListRoleTags&RoleName=S3Access"
 
 .. code-block:: XML
@@ -456,6 +467,7 @@ Delete role tags
 Delete a tag/ tags attached to a role.
 
 Example::
+
   POST "<hostname>?Action=UntagRoles&RoleName=S3Access&TagKeys.member.1=Department"
 
 .. code-block:: XML
@@ -466,6 +478,24 @@ Example::
     </ResponseMetadata>
   </UntagRoleResponse>
 
+Update Role
+-----------
+
+Example::
+
+  POST "<hostname>?Action=UpdateRole&RoleName=S3Access&MaxSessionDuration=43200"
+
+.. code-block:: XML
+
+  <UpdateRoleResponse>
+    <UpdateRoleResult>
+      <ResponseMetadata>
+        <RequestId>tx000000000000000000007-00611f337e-1027-default</RequestId>
+      </ResponseMetadata>
+      </UpdateRoleResult>
+  </UpdateRoleResponse>
+
+Note: This API currently can only be used to update max-session-duration.
 
 Sample code for tagging, listing tags and untagging a role
 ----------------------------------------------------------
@@ -518,6 +548,3 @@ The following is sample code for adding tags to role, listing tags and untagging
             'Department',
         ]
     )
-
-
-