Class ProjectPolicyAdminApi
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 ProjectPolicyAdminApi : IProjectPolicyAdminApi, IApiAccessor
Constructors
ProjectPolicyAdminApi(IApiClient)
Initializes a new instance of the Project
Declaration
public ProjectPolicyAdminApi(IApiClient apiClient)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
ProjectPolicyAdminApi(IApiClient, IApiConfiguration)
Initializes a new instance of the Project
Declaration
public ProjectPolicyAdminApi(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
DeletePolicyStatements(string, string, DeleteOptions, CancellationToken)
Delete policy statement(s) Delete policy statement(s) for project-based policy.
Declaration
public ApiOperation DeletePolicyStatements(string projectId, string environmentId, DeleteOptions deleteOptions, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project |
string | environmentId | ID of the environment |
Delete |
deleteOptions | |
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 |
GetPolicy(string, string, CancellationToken)
Get a project 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<Policy> GetPolicy(string projectId, string environmentId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project |
string | environmentId | ID of the environment |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
UpsertPolicy(string, string, Policy, CancellationToken)
Create or update a project based policy Create or update a project based policy. A maximum of 500 non-expired statements per policy can be created/updated.
Declaration
public ApiOperation UpsertPolicy(string projectId, string environmentId, Policy policy, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project |
string | environmentId | ID of the environment |
Policy | policy | |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |