Class PlayerPolicyAdminApi
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: Unity.Services.Apis.Admin.AccessPolicy
Assembly: Unity.Services.Apis.dll
Syntax
public class PlayerPolicyAdminApi : IPlayerPolicyAdminApi, IApiAccessor
Constructors
PlayerPolicyAdminApi(IApiClient)
Initializes a new instance of the Player
Declaration
public PlayerPolicyAdminApi(IApiClient apiClient)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
PlayerPolicyAdminApi(IApiClient, IApiConfiguration)
Initializes a new instance of the Player
Declaration
public PlayerPolicyAdminApi(IApiClient apiClient, IApiConfiguration apiConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
IApi |
apiConfiguration | The configuration object. |
Properties
Client
The client for accessing this underlying API asynchronously.
Declaration
public IApiClient Client { get; }
Property Value
Type | Description |
---|---|
IApi |
Configuration
Gets the configuration object
Declaration
public IApiConfiguration Configuration { get; }
Property Value
Type | Description |
---|---|
IApi |
An instance of the Configuration |
Methods
DeletePlayerPolicyStatements(string, string, string, DeleteOptions, CancellationToken)
Delete policy statement(s) Delete policy statement(s) for player-based policy.
Declaration
public ApiOperation DeletePlayerPolicyStatements(string projectId, string environmentId, string playerId, DeleteOptions deleteOptions, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project |
string | environmentId | ID of the environment |
string | playerId | ID of the player |
Delete |
deleteOptions | |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetAllPlayerPolicies(string, string, int?, string, CancellationToken)
Get all player based policies in project This endpoint returns all player based policies which belong to a specific project and environment. By default, the API returns 5 results per page. The number of results per page can be customized by including the limit query parameter in the request. To retrieve subsequent pages of results, pass the next query parameter, the value of which will be provided in the response body of the first paginated response.
Declaration
public ApiOperation<PlayerPolicies> GetAllPlayerPolicies(string projectId, string environmentId, int? limit = null, string next = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project |
string | environmentId | ID of the environment |
int? | limit | max results per page - is ignored if |
string | next | pagination token for requesting next page of results (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetBasePath()
Gets the base path of the API client.
Declaration
public string GetBasePath()
Returns
Type | Description |
---|---|
string | The base path |
GetPlayerPolicy(string, string, string, CancellationToken)
Get a player based policy A policy consists of multiple policy statements. This endpoint will return a Policy object containing an array of all non-expired policy statements in that policy.
Declaration
public ApiOperation<PlayerPolicy> GetPlayerPolicy(string projectId, string environmentId, string playerId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project |
string | environmentId | ID of the environment |
string | playerId | ID of the player |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
UpsertPlayerPolicy(string, string, string, PlayerPolicyUpsert, CancellationToken)
Create or update a player based policy Create or update a player based policy. A maximum of 500 non-expired statements per policy can be created/updated.
Declaration
public ApiOperation UpsertPlayerPolicy(string projectId, string environmentId, string playerId, PlayerPolicyUpsert playerPolicyUpsert, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project |
string | environmentId | ID of the environment |
string | playerId | ID of the player |
Player |
playerPolicyUpsert | |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |