Class EnvironmentAdminApi
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: Unity.Services.Apis.Admin.Environment
Assembly: Unity.Services.Apis.dll
Syntax
public class EnvironmentAdminApi : IEnvironmentAdminApi, IApiAccessor
Constructors
EnvironmentAdminApi(IApiClient)
Initializes a new instance of the Environment
Declaration
public EnvironmentAdminApi(IApiClient apiClient)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
EnvironmentAdminApi(IApiClient, IApiConfiguration)
Initializes a new instance of the Environment
Declaration
public EnvironmentAdminApi(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
CreateEnvironment(string, EnvironmentRequestBody, CancellationToken)
Create an Environment Create an environment under a project.
Declaration
public ApiOperation<EnvironmentResponse> CreateEnvironment(string projectId, EnvironmentRequestBody environmentRequestBody = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project |
Environment |
environmentRequestBody | (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
DeleteEnvironment(string, string, CancellationToken)
Delete an Environment Delete an existing environment
Declaration
public ApiOperation<object> DeleteEnvironment(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 |
GetBasePath()
Gets the base path of the API client.
Declaration
public string GetBasePath()
Returns
Type | Description |
---|---|
string | The base path |
GetEnvironment(string, string, CancellationToken)
Get an Environment Get a single environment
Declaration
public ApiOperation<EnvironmentResponse> GetEnvironment(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 |
GetEnvironments(string, CancellationToken)
List Environments List all the environments for a project
Declaration
public ApiOperation<ListEnvironmentsResponse> GetEnvironments(string projectId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |