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.

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 Amazon.Auth.AccessControlPolicy.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.Core.dll
Version: 3.x.y.z

Syntax

C#
public class Principal

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

Public Method Principal(string, string, bool)

Constructs a new principal with the specified provider and id and optionally strips hyphens from the 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 authenticated AWS 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 Anonymous Amazon.Auth.AccessControlPolicy.Principal

The anonymous Principal.

Field Static Field ANONYMOUS_PROVIDER System.String

Dummy principal provider for anonynous.

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.

Field Static Field FEDERATED_PROVIDER System.String

Principal provider for federated users (using a SAML identity provider)

Field Static Field SERVICE_PROVIDER System.String

Principal provider for assume role policies that will be assumed by an AWS service (e.g. "ec2.amazonaws.com").

Version Information

.NET Standard:
Supported in: 1.3

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

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

Unity:
Supported Versions: 4.6 and above
Supported Platforms: Android, iOS, Standalone