AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Represents an access control list (ACL) for S3. An AccessControlList is represented by an Owner, and a List of Grants, where each Grant is a Grantee and a Permission.

Inheritance Hierarchy

System.Object
  Amazon.S3.Model.S3AccessControlList

Namespace: Amazon.S3.Model
Assembly: AWSSDK.S3.dll
Version: 3.x.y.z

Syntax

C#
public class S3AccessControlList

The S3AccessControlList type exposes the following members

Constructors

NameDescription
Public Method S3AccessControlList()

Properties

NameTypeDescription
Public Property Grants System.Collections.Generic.List<Amazon.S3.Model.S3Grant>

A collection of grants.

Public Property Owner Amazon.S3.Model.Owner

The owner of the bucket or object.

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method AddGrant(S3Grantee, S3Permission)

Creates a S3Grant and adds it to the list of grants.

Public Method RemoveGrant(S3Grantee, S3Permission)

Removes a specific permission for the given grantee.

Public Method RemoveGrant(S3Grantee)

Removes all permissions for the given grantee.

Remarks

Each bucket and object in Amazon S3 has an ACL that defines its access control policy. When a request is made, Amazon S3 authenticates the request using its standard authentication procedure and then checks the ACL to verify the sender was granted access to the bucket or object. If the sender is approved, the request proceeds. Otherwise, Amazon S3 returns an error.

An ACL is a list of grants. A grant consists of one grantee and one permission. ACLs only grant permissions; they do not deny them.

For convenience, some commonly used Access Control Lists are defined in S3CannedACL.

Note: BucketName and object ACLs are completely independent; an object does not inherit the ACL from its bucket. For example, if you create a bucket and grant write access to another user, you will not be able to access the user's objects unless the user explicitly grants access. This also applies if you grant anonymous write access to a bucket. Only the user "anonymous" will be able to access objects the user created unless permission is explicitly granted to the bucket owner.

Important: We highly recommend that you do not grant the anonymous group write access to your buckets as you will have no control over the objects others can store and their associated charges. For more information, see Grantees and Permissions

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5