AWS SDK Version 2 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.

.NET Framework 4.5
 
A principal is an AWS account which is being allowed or denied access to a resource through an access control policy. The principal is a property of the Statement object, not directly the Policy object.

The principal is A in the statement "A has permission to do B to C where D applies."

In an access control policy statement, you can set the principal to all authenticated AWS users through the Amazon.Auth.AccessControlPolicy.Principal.AllUsers member. This is useful when you don't want to restrict access based on the identity of the requester, but instead on other identifying characteristics such as the requester's IP address.

Inheritance Hierarchy

System.Object
  Amazon.Auth.AccessControlPolicy.Principal

Namespace: Amazon.Auth.AccessControlPolicy
Assembly: AWSSDK.dll
Version: (assembly version)

Syntax

C#
public class Principal : Object

The Principal type exposes the following members

Constructors

NameDescription
Public Method Principal(string) Constructs a new principal with the specified AWS account ID.
Public Method Principal(string, string) Constructs a new principal with the specified provider and id

Properties

NameTypeDescription
Public Property Id System.String Gets the unique ID for this principal.
Public Property Provider System.String Gets and sets the provider for this principal, which indicates in what group of users this principal resides.

Fields

NameTypeDescription
Field Static Field AllUsers Amazon.Auth.AccessControlPolicy.Principal Principal instance that includes all users, including anonymous users.

This is useful when you don't want to restrict access based on the identity of the requester, but instead on other identifying characteristics such as the requester's IP address.

Field Static Field AWS_PROVIDER System.String The default Principal provider for AWS accounts.
Field Static Field CANONICAL_USER_PROVIDER System.String Principal provider for Canonical User IDs.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5