vserver object-store-server bucket policy statement modify
Modify a bucket policy statement
Availability: This command is available to cluster and Vserver administrators at the admin privilege level.
Description
The vserver object-store-server bucket policy statement modify
command modifies a bucket policy statement.
Parameters
-vserver <Vserver Name>
- Vserver Name-
This parameter specifies the name of the Vserver for the object store server bucket for which the bucket policy statement needs to be modified.
-bucket <TextNoCase>
- Object Store Server Bucket Name-
This parameter specifies the name of the object store server bucket for which policy statement needs to be modified.
-index <integer>
- Statement Index-
This parameter specifies the index of the object store server bucket policy statement.
[-effect {deny|allow}]
- Allow or Deny Access-
Use this parameter to specify whether access is allowed or denied when a user requests the specific action.
[-action <Action>,…]
- Bucket Policy Action Allowed or Denied-
Use this parameter to specify resource operations. The set of resource operations that the object store server supports are GetObject, PutObject, DeleteObject, ListBucket, GetBucketAcl, GetObjectAcl, ListBucketMultipartUploads, ListMultipartUploadParts, GetObjectTagging, PutObjectTagging, DeleteObjectTagging, GetBucketLocation, PutBucketPolicy, GetBucketPolicy, DeleteBucketPolicy, GetBucketVersioning, PutBucketVersioning, and ListBucketVersions.
[-principal <Objectstore Principal>,…]
- List of Users to Be Allowed or Denied Access-
Validate the user requesting access against the object store server users or groups or NAS groups specified in this parameter. To gain access, the user in the context should either match one of the users or belong to one of the groups specified in this principle parameter. An object store server group is specified by adding a prefix "group/" to the group name. A NAS group is specified by adding a prefix "nasgroup/" to the group name.
[-resource <text>,…]
- Bucket or Objects to Be Allowed or Denied Access-
Use this parameter to specify the bucket, folder, or object for which allow or deny permissions are set. The user name policy variables '${aws:username}' can be specified here, serving as placeholders that are dynamically replaced with the actual user name during run time based on the request context.
[-sid <SID>]
- Statement Identifier-
This optional parameter specifies a text comment for the object store server bucket policy statement.
Examples
The following example modifies an object store server bucket policy statement for storage virtual machine (SVM) vs1 and bucket1 which specifies allowed access to a readme folder for the object store server user user1.
cluster1::> vserver object-store-server bucket policy statement modify -vserver vs1 -bucket bucket1 -index 1 -effect allow -action GetObject,PutObject,DeleteObject,ListBucket -principal user1 -resource bucket1/readme/* -sid "fullAccessToReadmeForUser1"
The following example modifies an object store server bucket policy statement for storage virtual machine (SVM) and bucket1 which specifies allowed access to the corresponding user home directory by specifying the user name policy variable in the resource field.
cluster1::> vserver object-store-server bucket policy statement modify -vserver vs1 -bucket bucket1 -index 1 -effect allow -action * -principal * -resource bucket1,bucket1/${aws:username}/* -sid "fullAccessToUsersHomeDirectory"