/// <summary>Snippet for InstantiateWorkflowTemplateAsync</summary> public async Task InstantiateWorkflowTemplateAsync_RequestObject() { // Snippet: InstantiateWorkflowTemplateAsync(InstantiateWorkflowTemplateRequest,CallSettings) // Create client WorkflowTemplateServiceClient workflowTemplateServiceClient = await WorkflowTemplateServiceClient.CreateAsync(); // Initialize request argument(s) InstantiateWorkflowTemplateRequest request = new InstantiateWorkflowTemplateRequest { WorkflowTemplateName = new WorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"), }; // Make the request Operation <Empty, WorkflowMetadata> response = await workflowTemplateServiceClient.InstantiateWorkflowTemplateAsync(request); // Poll until the returned long-running operation is complete Operation <Empty, WorkflowMetadata> completedResponse = await response.PollUntilCompletedAsync(); // The long-running operation is now complete. // Or get the name of the operation string operationName = response.Name; // This name can be stored, then the long-running operation retrieved later by name Operation <Empty, WorkflowMetadata> retrievedResponse = await workflowTemplateServiceClient.PollOnceInstantiateWorkflowTemplateAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // The long-running operation is now complete. } // End snippet }