C# Class Amazon.Auth.AccessControlPolicy.Principal

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.

显示文件 Open project: aws/aws-sdk-net

Public Properties

Property Type Description
AllUsers Principal
Anonymous Principal

Public Methods

Method Description
Principal ( string accountId ) : System

Constructs a new principal with the specified AWS account ID.

Principal ( string provider, string id ) : System

Constructs a new principal with the specified provider and id

Principal ( string provider, string id, bool stripHyphen ) : System

Constructs a new principal with the specified provider and id and optionally strips hyphens from the id

Method Details

Principal() public method

Constructs a new principal with the specified AWS account ID.
public Principal ( string accountId ) : System
accountId string An AWS account ID.
return System

Principal() public method

Constructs a new principal with the specified provider and id
public Principal ( string provider, string id ) : System
provider string The provider of the principal
id string The unique ID of the Principal within the provider
return System

Principal() public method

Constructs a new principal with the specified provider and id and optionally strips hyphens from the id
public Principal ( string provider, string id, bool stripHyphen ) : System
provider string The provider of the principal
id string The unique ID of the Principal within the provider
stripHyphen bool Strip hyphen
return System

Property Details

AllUsers public_oe static_oe property

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.

public static Principal,Amazon.Auth.AccessControlPolicy AllUsers
return Principal

Anonymous public_oe static_oe property

The anonymous Principal.
public static Principal,Amazon.Auth.AccessControlPolicy Anonymous
return Principal