DiscoveryToolsClient.Run Method

Definition

Overloads

Run(WaitUntil, String, RequestContent, RequestContext)

Source:
DiscoveryToolsClient.cs

Run the specified tool in the context of the specified project.

public virtual Azure.Operation<BinaryData> Run(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member Run : Azure.WaitUntil * string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Operation<BinaryData>
override this.Run : Azure.WaitUntil * string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Operation<BinaryData>
Public Overridable Function Run (waitUntil As WaitUntil, projectName As String, content As RequestContent, Optional context As RequestContext = Nothing) As Operation(Of BinaryData)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

projectName
String

Name of the associated Project.

content
RequestContent

The content to send as the body of the request.

context
RequestContext

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

projectName or content is null.

projectName is an empty string, and was expected to be non-empty.

Applies to

Run(WaitUntil, String, ResourceIdentifier, IEnumerable<ResourceIdentifier>, String, IEnumerable<InlineFile>, IEnumerable<InputDataMount>, IEnumerable<OutputDataMount>, InfrastructureOverrides, IEnumerable<RunRequestEnvironmentVariable>, CancellationToken)

Source:
DiscoveryToolsClient.cs

Run the specified tool in the context of the specified project.

public virtual Azure.Operation<Azure.AI.Discovery.RunResult> Run(Azure.WaitUntil waitUntil, string projectName, Azure.Core.ResourceIdentifier toolId, System.Collections.Generic.IEnumerable<Azure.Core.ResourceIdentifier> nodePoolIds, string command = default, System.Collections.Generic.IEnumerable<Azure.AI.Discovery.InlineFile> inlineFiles = default, System.Collections.Generic.IEnumerable<Azure.AI.Discovery.InputDataMount> inputData = default, System.Collections.Generic.IEnumerable<Azure.AI.Discovery.OutputDataMount> outputData = default, Azure.AI.Discovery.InfrastructureOverrides infraOverrides = default, System.Collections.Generic.IEnumerable<Azure.AI.Discovery.RunRequestEnvironmentVariable> environmentVariables = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Run : Azure.WaitUntil * string * Azure.Core.ResourceIdentifier * seq<Azure.Core.ResourceIdentifier> * string * seq<Azure.AI.Discovery.InlineFile> * seq<Azure.AI.Discovery.InputDataMount> * seq<Azure.AI.Discovery.OutputDataMount> * Azure.AI.Discovery.InfrastructureOverrides * seq<Azure.AI.Discovery.RunRequestEnvironmentVariable> * System.Threading.CancellationToken -> Azure.Operation<Azure.AI.Discovery.RunResult>
override this.Run : Azure.WaitUntil * string * Azure.Core.ResourceIdentifier * seq<Azure.Core.ResourceIdentifier> * string * seq<Azure.AI.Discovery.InlineFile> * seq<Azure.AI.Discovery.InputDataMount> * seq<Azure.AI.Discovery.OutputDataMount> * Azure.AI.Discovery.InfrastructureOverrides * seq<Azure.AI.Discovery.RunRequestEnvironmentVariable> * System.Threading.CancellationToken -> Azure.Operation<Azure.AI.Discovery.RunResult>
Public Overridable Function Run (waitUntil As WaitUntil, projectName As String, toolId As ResourceIdentifier, nodePoolIds As IEnumerable(Of ResourceIdentifier), Optional command As String = Nothing, Optional inlineFiles As IEnumerable(Of InlineFile) = Nothing, Optional inputData As IEnumerable(Of InputDataMount) = Nothing, Optional outputData As IEnumerable(Of OutputDataMount) = Nothing, Optional infraOverrides As InfrastructureOverrides = Nothing, Optional environmentVariables As IEnumerable(Of RunRequestEnvironmentVariable) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Operation(Of RunResult)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

projectName
String

Name of the associated Project.

toolId
ResourceIdentifier

ID of the tool to execute.

nodePoolIds
IEnumerable<ResourceIdentifier>

IDs of NodePools to use for this run.

command
String

Command to pass to tool container entrypoint. If the tool has multiple containers defined, this command is executed on all of them. If omitted, all containers execute their raw entrypoints. This command is parsed into an argument list which is passed to the underlying container runtime. For example, if the command is "python /code/wrapper.py --input /inputs/abcdef-input-1/input.txt --output /outputs/abcdef-output-1", then the container runtime will receive the following argument list: ["python", "/code/wrapper.py", "--input", "/inputs/abcdef-input-1/input.txt", "--output", "/outputs/abcdef-output-1"] The container's entrypoint is not overridden. In Docker terminology, the above argument list becomes the CMD, not the ENTRYPOINT of the launched container. Our parsing includes the following limited interpretation of special characters:

  • The only special characters are " ' and \.
  • Backslashes `\` escape the next character if that character is a special character, preserving its literal value.
  • Double quotes `"` preserve everything inside them literally, with the exception of the characters " and \, which must be escaped with a backslash `\`. Unmatched quotes will throw an error.
  • Single quotes `'` preserve everything inside them literally. A single-quote cannot occur within single-quotes. Unmatched quotes will throw an error.
If you wish to run a command that relies on shell features such as globbing or output redirection, you either need to:
  • use a container with an entrypoint that is a shell (e.g. `/bin/sh` or `/bin/bash`) and pass a command which is valid for that shell e.g.
`-c 'python /code/wrapper.py --input /inputs/abcdef-input-1/* --output /outputs/abcdef-output-1'`
  • use a container which has a shell installed, and include the shell in the command, e.g.
`sh -c "python /code/wrapper.py --input /inputs/abcdef-input-1/* --output /outputs/abcdef-output-1"`
inlineFiles
IEnumerable<InlineFile>

Encoded inline files to be mounted into the container, e.g. for generated code.

inputData
IEnumerable<InputDataMount>

Input data references and mount paths.

outputData
IEnumerable<OutputDataMount>

Output data references and mount paths.

infraOverrides
InfrastructureOverrides

Override the infrastructure requirements in the tool definitions.

environmentVariables
IEnumerable<RunRequestEnvironmentVariable>

Optional environment variables to set in the tool container. This must not contain any secrets.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

projectName, toolId or nodePoolIds is null.

projectName or toolId is an empty string, and was expected to be non-empty.

Applies to