Class CloudCodeScriptsAdminApi
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: Unity.Services.Apis.Admin.CloudCode
Assembly: Unity.Services.Apis.dll
Syntax
public class CloudCodeScriptsAdminApi : ICloudCodeScriptsAdminApi, IApiAccessor
Constructors
CloudCodeScriptsAdminApi(IApiClient)
Initializes a new instance of the Cloud
Declaration
public CloudCodeScriptsAdminApi(IApiClient apiClient)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
CloudCodeScriptsAdminApi(IApiClient, IApiConfiguration)
Initializes a new instance of the Cloud
Declaration
public CloudCodeScriptsAdminApi(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
CreateScript(string, string, CreateScriptRequest, CancellationToken)
Create script Create a Cloud Code script for a project environment
Declaration
public ApiOperation CreateScript(string projectId, string environmentId, CreateScriptRequest createScriptRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project. |
string | environmentId | ID of the environment |
Create |
createScriptRequest | Provide script name, type and code. Parameters are optional. If no code is provided, a placeholder code example is used. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
DeleteScript(string, string, string, CancellationToken)
Delete script Delete a Cloud Code script for a project environment.
Declaration
public ApiOperation DeleteScript(string projectId, string environmentId, string scriptName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project. |
string | environmentId | ID of the environment |
string | scriptName | Name of the script. |
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 |
GetScript(string, string, string, CancellationToken)
Get script Get a Cloud Code script for a project environment
Declaration
public ApiOperation<GetScriptResponse> GetScript(string projectId, string environmentId, string scriptName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project. |
string | environmentId | ID of the environment |
string | scriptName | Name of the script. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
ListScripts(string, string, int?, string, CancellationToken)
List scripts Get a list of the Cloud Code scripts for a project environment
Declaration
public ApiOperation<ListScriptsResponse> ListScripts(string projectId, string environmentId, int? limit = null, string after = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project. |
string | environmentId | ID of the environment |
int? | limit | The number of scripts to return. (optional) |
string | after | (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
PublishScript(string, string, string, PublishScriptRequest, CancellationToken)
Publish script Publish a Cloud Code script for a project environment. You can't republish the active script, or publish a script with compiliaton errors.
Declaration
public ApiOperation<PublishScriptResponse> PublishScript(string projectId, string environmentId, string scriptName, PublishScriptRequest publishScriptRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project. |
string | environmentId | ID of the environment |
string | scriptName | Name of the script. |
Publish |
publishScriptRequest | Optional. Provide a version number to publish if you want to republish an older version. By default, the working copy is published. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
UpdateScript(string, string, string, UpdateScriptRequest, CancellationToken)
Update script Update a Cloud Code script for a project environment
Declaration
public ApiOperation UpdateScript(string projectId, string environmentId, string scriptName, UpdateScriptRequest updateScriptRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID of the project. |
string | environmentId | ID of the environment |
string | scriptName | Name of the script. |
Update |
updateScriptRequest | Provide updated script code, parameters, or both. If you provide an empty parameters array, the present parameters will be removed. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |