Amazon.StepFunctions.AmazonStepFunctionsClient.StartExecutionAsync C# (CSharp) Метод

StartExecutionAsync() публичный Метод

Initiates the asynchronous execution of the StartExecution operation.
public StartExecutionAsync ( StartExecutionRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.StepFunctions.Model.StartExecutionRequest Container for the necessary parameters to execute the StartExecution operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
Результат Task
        public Task<StartExecutionResponse> StartExecutionAsync(StartExecutionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new StartExecutionRequestMarshaller();
            var unmarshaller = StartExecutionResponseUnmarshaller.Instance;

            return InvokeAsync<StartExecutionRequest,StartExecutionResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }

Usage Example

        static Task <StartExecutionResponse> Run(string arn, string name, string input)
        {
            var client = new Amazon.StepFunctions.AmazonStepFunctionsClient();

            return(client.StartExecutionAsync(new StartExecutionRequest()
            {
                Input = input,
                Name = name,
                StateMachineArn = arn
            }
                                              ));
        }