Interface ICloudCodeScriptsAdminApi
Represents a collection of functions to interact with the API endpoints
Namespace: Unity.Services.Apis.Admin.CloudCode
Assembly: Unity.Services.Apis.dll
Syntax
public interface ICloudCodeScriptsAdminApi : IApiAccessor
Methods
CreateScript(string, string, CreateScriptRequest, CancellationToken)
Create script
Declaration
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
Declaration
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 |
GetScript(string, string, string, CancellationToken)
Get script
Declaration
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
Declaration
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
Declaration
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
Declaration
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 |