Class PlayerStatement
A Statement is a single set of rules for accessing a resource
Inherited Members
Namespace: Unity.Services.Apis.Admin.AccessPolicy
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "PlayerStatement")]
[Preserve]
public class PlayerStatement
Constructors
PlayerStatement(string, List<string>, string, string, string, DateTime, string)
Initializes a new instance of the Player
Declaration
[Preserve]
public PlayerStatement(string sid = null, List<string> action = null, string effect = null, string principal = null, string resource = null, DateTime expiresAt = default, string version = null)
Parameters
Type | Name | Description |
---|---|---|
string | sid | Statement ID. Consists of alphanumeric characters and hyphen, and must be of length between 6 and 60 chars. (required). |
List<string> | action | User action against which the policy statement will be applicable. Allowable values are "Read", "Write", "*", "Vivox:JoinMuted", "Vivox:JoinAllMuted", "Vivox:JoinWithConsent". (required). |
string | effect | Effect of the policy statement. Allowable values are "Allow" and "Deny" (required). |
string | principal | The principal the statement applies to, Allowed value is "Player" (required). |
string | resource | Uniform resource name of the resource(s) being targeted by the policy. The format is |
Date |
expiresAt | UTC time (ISO 8601 extended format) when the policy expires. |
string | version | version. |
Properties
Action
User action against which the policy statement will be applicable. Allowable values are "Read", "Write", "*", "Vivox:JoinMuted", "Vivox:JoinAllMuted", "Vivox:JoinWithConsent".
Declaration
[DataMember(Name = "Action", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public List<string> Action { get; set; }
Property Value
Type | Description |
---|---|
List<string> | User action against which the policy statement will be applicable. Allowable values are "Read", "Write", "*", "Vivox:JoinMuted", "Vivox:JoinAllMuted", "Vivox:JoinWithConsent". |
Effect
Effect of the policy statement. Allowable values are "Allow" and "Deny"
Declaration
[DataMember(Name = "Effect", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Effect { get; set; }
Property Value
Type | Description |
---|---|
string | Effect of the policy statement. Allowable values are "Allow" and "Deny" |
ExpiresAt
UTC time (ISO 8601 extended format) when the policy expires
Declaration
[DataMember(Name = "ExpiresAt", EmitDefaultValue = false)]
[Preserve]
public DateTime ExpiresAt { get; set; }
Property Value
Type | Description |
---|---|
Date |
UTC time (ISO 8601 extended format) when the policy expires |
Principal
The principal the statement applies to, Allowed value is "Player"
Declaration
[DataMember(Name = "Principal", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Principal { get; set; }
Property Value
Type | Description |
---|---|
string | The principal the statement applies to, Allowed value is "Player" |
Resource
Uniform resource name of the resource(s) being targeted by the policy. The format is urn:ugs:<service-name>:/<path>
. For example, urn:ugs:*
targets all services. Some other examples are <ul><li>urn:ugs:cloud-code:/v1/projects/_*_/scripts/_*
</li> <li>urn:ugs:economy:/_*
</li></ul>
Declaration
[DataMember(Name = "Resource", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Resource { get; set; }
Property Value
Type | Description |
---|---|
string | Uniform resource name of the resource(s) being targeted by the policy. The format is |
Sid
Statement ID. Consists of alphanumeric characters and hyphen, and must be of length between 6 and 60 chars.
Declaration
[DataMember(Name = "Sid", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Sid { get; set; }
Property Value
Type | Description |
---|---|
string | Statement ID. Consists of alphanumeric characters and hyphen, and must be of length between 6 and 60 chars. |
_Version
Gets or Sets _Version
Declaration
[DataMember(Name = "Version", EmitDefaultValue = false)]
[Preserve]
public string _Version { get; set; }
Property Value
Type | Description |
---|---|
string |