FlowDefinition class

Provides a SageMaker AI Flow Definition resource.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.sagemaker.FlowDefinition("example", {
    humanLoopConfig: {
        humanTaskUiArn: exampleAwsSagemakerHumanTaskUi.arn,
        taskAvailabilityLifetimeInSeconds: 1,
        taskCount: 1,
        taskDescription: "example",
        taskTitle: "example",
        workteamArn: exampleAwsSagemakerWorkteam.arn,
    },
    outputConfig: {
        s3OutputPath: `s3://${exampleAwsS3Bucket.bucket}/`,
    },
    flowDefinitionName: "example",
    roleArn: exampleAwsIamRole.arn,
});
import pulumi
import pulumi_aws as aws

example = aws.sagemaker.FlowDefinition("example",
    human_loop_config={
        "human_task_ui_arn": example_aws_sagemaker_human_task_ui["arn"],
        "task_availability_lifetime_in_seconds": 1,
        "task_count": 1,
        "task_description": "example",
        "task_title": "example",
        "workteam_arn": example_aws_sagemaker_workteam["arn"],
    },
    output_config={
        "s3_output_path": f"s3://{example_aws_s3_bucket['bucket']}/",
    },
    flow_definition_name="example",
    role_arn=example_aws_iam_role["arn"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Sagemaker.FlowDefinition("example", new()
    {
        HumanLoopConfig = new Aws.Sagemaker.Inputs.FlowDefinitionHumanLoopConfigArgs
        {
            HumanTaskUiArn = exampleAwsSagemakerHumanTaskUi.Arn,
            TaskAvailabilityLifetimeInSeconds = 1,
            TaskCount = 1,
            TaskDescription = "example",
            TaskTitle = "example",
            WorkteamArn = exampleAwsSagemakerWorkteam.Arn,
        },
        OutputConfig = new Aws.Sagemaker.Inputs.FlowDefinitionOutputConfigArgs
        {
            S3OutputPath = $"s3://{exampleAwsS3Bucket.Bucket}/",
        },
        FlowDefinitionName = "example",
        RoleArn = exampleAwsIamRole.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/sagemaker"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sagemaker.NewFlowDefinition(ctx, "example", &sagemaker.FlowDefinitionArgs{
			HumanLoopConfig: &sagemaker.FlowDefinitionHumanLoopConfigArgs{
				HumanTaskUiArn:                    pulumi.Any(exampleAwsSagemakerHumanTaskUi.Arn),
				TaskAvailabilityLifetimeInSeconds: pulumi.Int(1),
				TaskCount:                         pulumi.Int(1),
				TaskDescription:                   pulumi.String("example"),
				TaskTitle:                         pulumi.String("example"),
				WorkteamArn:                       pulumi.Any(exampleAwsSagemakerWorkteam.Arn),
			},
			OutputConfig: &sagemaker.FlowDefinitionOutputConfigArgs{
				S3OutputPath: pulumi.Sprintf("s3://%v/", exampleAwsS3Bucket.Bucket),
			},
			FlowDefinitionName: pulumi.String("example"),
			RoleArn:            pulumi.Any(exampleAwsIamRole.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_sagemaker_flowdefinition" "example" {
  human_loop_config = {
    human_task_ui_arn                     = exampleAwsSagemakerHumanTaskUi.arn
    task_availability_lifetime_in_seconds = 1
    task_count                            = 1
    task_description                      = "example"
    task_title                            = "example"
    workteam_arn                          = exampleAwsSagemakerWorkteam.arn
  }
  output_config = {
    s3_output_path ="s3://${exampleAwsS3Bucket.bucket}/"
  }
  flow_definition_name = "example"
  role_arn             = exampleAwsIamRole.arn
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sagemaker.FlowDefinition;
import com.pulumi.aws.sagemaker.FlowDefinitionArgs;
import com.pulumi.aws.sagemaker.inputs.FlowDefinitionHumanLoopConfigArgs;
import com.pulumi.aws.sagemaker.inputs.FlowDefinitionOutputConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new FlowDefinition("example", FlowDefinitionArgs.builder()
            .humanLoopConfig(FlowDefinitionHumanLoopConfigArgs.builder()
                .humanTaskUiArn(exampleAwsSagemakerHumanTaskUi.arn())
                .taskAvailabilityLifetimeInSeconds(1)
                .taskCount(1)
                .taskDescription("example")
                .taskTitle("example")
                .workteamArn(exampleAwsSagemakerWorkteam.arn())
                .build())
            .outputConfig(FlowDefinitionOutputConfigArgs.builder()
                .s3OutputPath(String.format("s3://%s/", exampleAwsS3Bucket.bucket()))
                .build())
            .flowDefinitionName("example")
            .roleArn(exampleAwsIamRole.arn())
            .build());

    }
}
resources:
  example:
    type: aws:sagemaker:FlowDefinition
    properties:
      humanLoopConfig:
        humanTaskUiArn: ${exampleAwsSagemakerHumanTaskUi.arn}
        taskAvailabilityLifetimeInSeconds: 1
        taskCount: 1
        taskDescription: example
        taskTitle: example
        workteamArn: ${exampleAwsSagemakerWorkteam.arn}
      outputConfig:
        s3OutputPath: s3://${exampleAwsS3Bucket.bucket}/
      flowDefinitionName: example
      roleArn: ${exampleAwsIamRole.arn}

Public Workteam Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.sagemaker.FlowDefinition("example", {
    humanLoopConfig: {
        publicWorkforceTaskPrice: {
            amountInUsd: {
                cents: 1,
                tenthFractionsOfACent: 2,
            },
        },
        humanTaskUiArn: exampleAwsSagemakerHumanTaskUi.arn,
        taskAvailabilityLifetimeInSeconds: 1,
        taskCount: 1,
        taskDescription: "example",
        taskTitle: "example",
        workteamArn: `arn:aws:sagemaker:${current.region}:394669845002:workteam/public-crowd/default`,
    },
    outputConfig: {
        s3OutputPath: `s3://${exampleAwsS3Bucket.bucket}/`,
    },
    flowDefinitionName: "example",
    roleArn: exampleAwsIamRole.arn,
});
import pulumi
import pulumi_aws as aws

example = aws.sagemaker.FlowDefinition("example",
    human_loop_config={
        "public_workforce_task_price": {
            "amount_in_usd": {
                "cents": 1,
                "tenth_fractions_of_a_cent": 2,
            },
        },
        "human_task_ui_arn": example_aws_sagemaker_human_task_ui["arn"],
        "task_availability_lifetime_in_seconds": 1,
        "task_count": 1,
        "task_description": "example",
        "task_title": "example",
        "workteam_arn": f"arn:aws:sagemaker:{current['region']}:394669845002:workteam/public-crowd/default",
    },
    output_config={
        "s3_output_path": f"s3://{example_aws_s3_bucket['bucket']}/",
    },
    flow_definition_name="example",
    role_arn=example_aws_iam_role["arn"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Sagemaker.FlowDefinition("example", new()
    {
        HumanLoopConfig = new Aws.Sagemaker.Inputs.FlowDefinitionHumanLoopConfigArgs
        {
            PublicWorkforceTaskPrice = new Aws.Sagemaker.Inputs.FlowDefinitionHumanLoopConfigPublicWorkforceTaskPriceArgs
            {
                AmountInUsd = new Aws.Sagemaker.Inputs.FlowDefinitionHumanLoopConfigPublicWorkforceTaskPriceAmountInUsdArgs
                {
                    Cents = 1,
                    TenthFractionsOfACent = 2,
                },
            },
            HumanTaskUiArn = exampleAwsSagemakerHumanTaskUi.Arn,
            TaskAvailabilityLifetimeInSeconds = 1,
            TaskCount = 1,
            TaskDescription = "example",
            TaskTitle = "example",
            WorkteamArn = $"arn:aws:sagemaker:{current.Region}:394669845002:workteam/public-crowd/default",
        },
        OutputConfig = new Aws.Sagemaker.Inputs.FlowDefinitionOutputConfigArgs
        {
            S3OutputPath = $"s3://{exampleAwsS3Bucket.Bucket}/",
        },
        FlowDefinitionName = "example",
        RoleArn = exampleAwsIamRole.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/sagemaker"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sagemaker.NewFlowDefinition(ctx, "example", &sagemaker.FlowDefinitionArgs{
			HumanLoopConfig: &sagemaker.FlowDefinitionHumanLoopConfigArgs{
				PublicWorkforceTaskPrice: &sagemaker.FlowDefinitionHumanLoopConfigPublicWorkforceTaskPriceArgs{
					AmountInUsd: &sagemaker.FlowDefinitionHumanLoopConfigPublicWorkforceTaskPriceAmountInUsdArgs{
						Cents:                 pulumi.Int(1),
						TenthFractionsOfACent: pulumi.Int(2),
					},
				},
				HumanTaskUiArn:                    pulumi.Any(exampleAwsSagemakerHumanTaskUi.Arn),
				TaskAvailabilityLifetimeInSeconds: pulumi.Int(1),
				TaskCount:                         pulumi.Int(1),
				TaskDescription:                   pulumi.String("example"),
				TaskTitle:                         pulumi.String("example"),
				WorkteamArn:                       pulumi.Sprintf("arn:aws:sagemaker:%v:394669845002:workteam/public-crowd/default", current.Region),
			},
			OutputConfig: &sagemaker.FlowDefinitionOutputConfigArgs{
				S3OutputPath: pulumi.Sprintf("s3://%v/", exampleAwsS3Bucket.Bucket),
			},
			FlowDefinitionName: pulumi.String("example"),
			RoleArn:            pulumi.Any(exampleAwsIamRole.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_sagemaker_flowdefinition" "example" {
  human_loop_config = {
    public_workforce_task_price = {
      amount_in_usd = {
        cents                     = 1
        tenth_fractions_of_a_cent = 2
      }
    }
    human_task_ui_arn                     = exampleAwsSagemakerHumanTaskUi.arn
    task_availability_lifetime_in_seconds = 1
    task_count                            = 1
    task_description                      = "example"
    task_title                            = "example"
    workteam_arn                          ="arn:aws:sagemaker:${current.region}:394669845002:workteam/public-crowd/default"
  }
  output_config = {
    s3_output_path ="s3://${exampleAwsS3Bucket.bucket}/"
  }
  flow_definition_name = "example"
  role_arn             = exampleAwsIamRole.arn
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sagemaker.FlowDefinition;
import com.pulumi.aws.sagemaker.FlowDefinitionArgs;
import com.pulumi.aws.sagemaker.inputs.FlowDefinitionHumanLoopConfigArgs;
import com.pulumi.aws.sagemaker.inputs.FlowDefinitionHumanLoopConfigPublicWorkforceTaskPriceArgs;
import com.pulumi.aws.sagemaker.inputs.FlowDefinitionHumanLoopConfigPublicWorkforceTaskPriceAmountInUsdArgs;
import com.pulumi.aws.sagemaker.inputs.FlowDefinitionOutputConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new FlowDefinition("example", FlowDefinitionArgs.builder()
            .humanLoopConfig(FlowDefinitionHumanLoopConfigArgs.builder()
                .publicWorkforceTaskPrice(FlowDefinitionHumanLoopConfigPublicWorkforceTaskPriceArgs.builder()
                    .amountInUsd(FlowDefinitionHumanLoopConfigPublicWorkforceTaskPriceAmountInUsdArgs.builder()
                        .cents(1)
                        .tenthFractionsOfACent(2)
                        .build())
                    .build())
                .humanTaskUiArn(exampleAwsSagemakerHumanTaskUi.arn())
                .taskAvailabilityLifetimeInSeconds(1)
                .taskCount(1)
                .taskDescription("example")
                .taskTitle("example")
                .workteamArn(String.format("arn:aws:sagemaker:%s:394669845002:workteam/public-crowd/default", current.region()))
                .build())
            .outputConfig(FlowDefinitionOutputConfigArgs.builder()
                .s3OutputPath(String.format("s3://%s/", exampleAwsS3Bucket.bucket()))
                .build())
            .flowDefinitionName("example")
            .roleArn(exampleAwsIamRole.arn())
            .build());

    }
}
resources:
  example:
    type: aws:sagemaker:FlowDefinition
    properties:
      humanLoopConfig:
        publicWorkforceTaskPrice:
          amountInUsd:
            cents: 1
            tenthFractionsOfACent: 2
        humanTaskUiArn: ${exampleAwsSagemakerHumanTaskUi.arn}
        taskAvailabilityLifetimeInSeconds: 1
        taskCount: 1
        taskDescription: example
        taskTitle: example
        workteamArn: arn:aws:sagemaker:${current.region}:394669845002:workteam/public-crowd/default
      outputConfig:
        s3OutputPath: s3://${exampleAwsS3Bucket.bucket}/
      flowDefinitionName: example
      roleArn: ${exampleAwsIamRole.arn}

Human Loop Activation Config Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.sagemaker.FlowDefinition("example", {
    humanLoopConfig: {
        humanTaskUiArn: exampleAwsSagemakerHumanTaskUi.arn,
        taskAvailabilityLifetimeInSeconds: 1,
        taskCount: 1,
        taskDescription: "example",
        taskTitle: "example",
        workteamArn: exampleAwsSagemakerWorkteam.arn,
    },
    humanLoopRequestSource: {
        awsManagedHumanLoopRequestSource: "AWS/Textract/AnalyzeDocument/Forms/V1",
    },
    humanLoopActivationConfig: {
        humanLoopActivationConditionsConfig: {
            humanLoopActivationConditions: `        {
\\t\\t\\t\\"Conditions\\": [
\\t\\t\\t  {
\\t\\t\\t\\t\\"ConditionType\\": \\"Sampling\\",
\\t\\t\\t\\t\\"ConditionParameters\\": {
\\t\\t\\t\\t  \\"RandomSamplingPercentage\\": 5
\\t\\t\\t\\t}
\\t\\t\\t  }
\\t\\t\\t]
\\t\\t}
`,
        },
    },
    outputConfig: {
        s3OutputPath: `s3://${exampleAwsS3Bucket.bucket}/`,
    },
    flowDefinitionName: "example",
    roleArn: exampleAwsIamRole.arn,
});
import pulumi
import pulumi_aws as aws

example = aws.sagemaker.FlowDefinition("example",
    human_loop_config={
        "human_task_ui_arn": example_aws_sagemaker_human_task_ui["arn"],
        "task_availability_lifetime_in_seconds": 1,
        "task_count": 1,
        "task_description": "example",
        "task_title": "example",
        "workteam_arn": example_aws_sagemaker_workteam["arn"],
    },
    human_loop_request_source={
        "aws_managed_human_loop_request_source": "AWS/Textract/AnalyzeDocument/Forms/V1",
    },
    human_loop_activation_config={
        "human_loop_activation_conditions_config": {
            "human_loop_activation_conditions": """        {
\t\t\t\"Conditions\": [
\t\t\t  {
\t\t\t\t\"ConditionType\": \"Sampling\",
\t\t\t\t\"ConditionParameters\": {
\t\t\t\t  \"RandomSamplingPercentage\": 5
\t\t\t\t}
\t\t\t  }
\t\t\t]
\t\t}
""",
        },
    },
    output_config={
        "s3_output_path": f"s3://{example_aws_s3_bucket['bucket']}/",
    },
    flow_definition_name="example",
    role_arn=example_aws_iam_role["arn"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Sagemaker.FlowDefinition("example", new()
    {
        HumanLoopConfig = new Aws.Sagemaker.Inputs.FlowDefinitionHumanLoopConfigArgs
        {
            HumanTaskUiArn = exampleAwsSagemakerHumanTaskUi.Arn,
            TaskAvailabilityLifetimeInSeconds = 1,
            TaskCount = 1,
            TaskDescription = "example",
            TaskTitle = "example",
            WorkteamArn = exampleAwsSagemakerWorkteam.Arn,
        },
        HumanLoopRequestSource = new Aws.Sagemaker.Inputs.FlowDefinitionHumanLoopRequestSourceArgs
        {
            AwsManagedHumanLoopRequestSource = "AWS/Textract/AnalyzeDocument/Forms/V1",
        },
        HumanLoopActivationConfig = new Aws.Sagemaker.Inputs.FlowDefinitionHumanLoopActivationConfigArgs
        {
            HumanLoopActivationConditionsConfig = new Aws.Sagemaker.Inputs.FlowDefinitionHumanLoopActivationConfigHumanLoopActivationConditionsConfigArgs
            {
                HumanLoopActivationConditions = @"        {
\t\t\t\""Conditions\"": [
\t\t\t  {
\t\t\t\t\""ConditionType\"": \""Sampling\"",
\t\t\t\t\""ConditionParameters\"": {
\t\t\t\t  \""RandomSamplingPercentage\"": 5
\t\t\t\t}
\t\t\t  }
\t\t\t]
\t\t}
",
            },
        },
        OutputConfig = new Aws.Sagemaker.Inputs.FlowDefinitionOutputConfigArgs
        {
            S3OutputPath = $"s3://{exampleAwsS3Bucket.Bucket}/",
        },
        FlowDefinitionName = "example",
        RoleArn = exampleAwsIamRole.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/sagemaker"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sagemaker.NewFlowDefinition(ctx, "example", &sagemaker.FlowDefinitionArgs{
			HumanLoopConfig: &sagemaker.FlowDefinitionHumanLoopConfigArgs{
				HumanTaskUiArn:                    pulumi.Any(exampleAwsSagemakerHumanTaskUi.Arn),
				TaskAvailabilityLifetimeInSeconds: pulumi.Int(1),
				TaskCount:                         pulumi.Int(1),
				TaskDescription:                   pulumi.String("example"),
				TaskTitle:                         pulumi.String("example"),
				WorkteamArn:                       pulumi.Any(exampleAwsSagemakerWorkteam.Arn),
			},
			HumanLoopRequestSource: &sagemaker.FlowDefinitionHumanLoopRequestSourceArgs{
				AwsManagedHumanLoopRequestSource: pulumi.String("AWS/Textract/AnalyzeDocument/Forms/V1"),
			},
			HumanLoopActivationConfig: &sagemaker.FlowDefinitionHumanLoopActivationConfigArgs{
				HumanLoopActivationConditionsConfig: &sagemaker.FlowDefinitionHumanLoopActivationConfigHumanLoopActivationConditionsConfigArgs{
					HumanLoopActivationConditions: pulumi.String(`        {
\t\t\t\"Conditions\": [
\t\t\t  {
\t\t\t\t\"ConditionType\": \"Sampling\",
\t\t\t\t\"ConditionParameters\": {
\t\t\t\t  \"RandomSamplingPercentage\": 5
\t\t\t\t}
\t\t\t  }
\t\t\t]
\t\t}
`),
				},
			},
			OutputConfig: &sagemaker.FlowDefinitionOutputConfigArgs{
				S3OutputPath: pulumi.Sprintf("s3://%v/", exampleAwsS3Bucket.Bucket),
			},
			FlowDefinitionName: pulumi.String("example"),
			RoleArn:            pulumi.Any(exampleAwsIamRole.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_sagemaker_flowdefinition" "example" {
  human_loop_config = {
    human_task_ui_arn                     = exampleAwsSagemakerHumanTaskUi.arn
    task_availability_lifetime_in_seconds = 1
    task_count                            = 1
    task_description                      = "example"
    task_title                            = "example"
    workteam_arn                          = exampleAwsSagemakerWorkteam.arn
  }
  human_loop_request_source = {
    aws_managed_human_loop_request_source = "AWS/Textract/AnalyzeDocument/Forms/V1"
  }
  human_loop_activation_config = {
    human_loop_activation_conditions_config = {
      human_loop_activation_conditions = "        {\n\\t\\t\\t\\\"Conditions\\\": [\n\\t\\t\\t  {\n\\t\\t\\t\\t\\\"ConditionType\\\": \\\"Sampling\\\",\n\\t\\t\\t\\t\\\"ConditionParameters\\\": {\n\\t\\t\\t\\t  \\\"RandomSamplingPercentage\\\": 5\n\\t\\t\\t\\t}\n\\t\\t\\t  }\n\\t\\t\\t]\n\\t\\t}\n"
    }
  }
  output_config = {
    s3_output_path ="s3://${exampleAwsS3Bucket.bucket}/"
  }
  flow_definition_name = "example"
  role_arn             = exampleAwsIamRole.arn
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sagemaker.FlowDefinition;
import com.pulumi.aws.sagemaker.FlowDefinitionArgs;
import com.pulumi.aws.sagemaker.inputs.FlowDefinitionHumanLoopConfigArgs;
import com.pulumi.aws.sagemaker.inputs.FlowDefinitionHumanLoopRequestSourceArgs;
import com.pulumi.aws.sagemaker.inputs.FlowDefinitionHumanLoopActivationConfigArgs;
import com.pulumi.aws.sagemaker.inputs.FlowDefinitionHumanLoopActivationConfigHumanLoopActivationConditionsConfigArgs;
import com.pulumi.aws.sagemaker.inputs.FlowDefinitionOutputConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new FlowDefinition("example", FlowDefinitionArgs.builder()
            .humanLoopConfig(FlowDefinitionHumanLoopConfigArgs.builder()
                .humanTaskUiArn(exampleAwsSagemakerHumanTaskUi.arn())
                .taskAvailabilityLifetimeInSeconds(1)
                .taskCount(1)
                .taskDescription("example")
                .taskTitle("example")
                .workteamArn(exampleAwsSagemakerWorkteam.arn())
                .build())
            .humanLoopRequestSource(FlowDefinitionHumanLoopRequestSourceArgs.builder()
                .awsManagedHumanLoopRequestSource("AWS/Textract/AnalyzeDocument/Forms/V1")
                .build())
            .humanLoopActivationConfig(FlowDefinitionHumanLoopActivationConfigArgs.builder()
                .humanLoopActivationConditionsConfig(FlowDefinitionHumanLoopActivationConfigHumanLoopActivationConditionsConfigArgs.builder()
                    .humanLoopActivationConditions("""
        {
\t\t\t\"Conditions\": [
\t\t\t  {
\t\t\t\t\"ConditionType\": \"Sampling\",
\t\t\t\t\"ConditionParameters\": {
\t\t\t\t  \"RandomSamplingPercentage\": 5
\t\t\t\t}
\t\t\t  }
\t\t\t]
\t\t}
                    """)
                    .build())
                .build())
            .outputConfig(FlowDefinitionOutputConfigArgs.builder()
                .s3OutputPath(String.format("s3://%s/", exampleAwsS3Bucket.bucket()))
                .build())
            .flowDefinitionName("example")
            .roleArn(exampleAwsIamRole.arn())
            .build());

    }
}
resources:
  example:
    type: aws:sagemaker:FlowDefinition
    properties:
      humanLoopConfig:
        humanTaskUiArn: ${exampleAwsSagemakerHumanTaskUi.arn}
        taskAvailabilityLifetimeInSeconds: 1
        taskCount: 1
        taskDescription: example
        taskTitle: example
        workteamArn: ${exampleAwsSagemakerWorkteam.arn}
      humanLoopRequestSource:
        awsManagedHumanLoopRequestSource: AWS/Textract/AnalyzeDocument/Forms/V1
      humanLoopActivationConfig:
        humanLoopActivationConditionsConfig:
          humanLoopActivationConditions: |2
                    {
            \t\t\t\"Conditions\": [
            \t\t\t  {
            \t\t\t\t\"ConditionType\": \"Sampling\",
            \t\t\t\t\"ConditionParameters\": {
            \t\t\t\t  \"RandomSamplingPercentage\": 5
            \t\t\t\t}
            \t\t\t  }
            \t\t\t]
            \t\t}
      outputConfig:
        s3OutputPath: s3://${exampleAwsS3Bucket.bucket}/
      flowDefinitionName: example
      roleArn: ${exampleAwsIamRole.arn}

Import

Using pulumi import, import SageMaker AI Flow Definitions using the flowDefinitionName. For example:

$ pulumi import aws:sagemaker/flowDefinition:FlowDefinition example example

Constructors

FlowDefinition(String name, {FlowDefinitionArgs? args, CustomResourceOptions? options})
Creates a new FlowDefinition. name The Pulumi resource name. args Arguments used to configure this FlowDefinition. The set of arguments for FlowDefinition. options Resource options controlling this resource's behavior.
FlowDefinition.reference(String urn)
Creates a typed reference to an existing FlowDefinition resource.

Properties

arn ↔ Output<String>
ARN assigned by AWS to this Flow Definition.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
flowDefinitionName ↔ Output<String>
The name of your flow definition.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
humanLoopActivationConfig ↔ Output<FlowDefinitionHumanLoopActivationConfig?>
An object containing information about the events that trigger a human workflow. See Human Loop Activation Config details below.
latefinal
humanLoopConfig ↔ Output<FlowDefinitionHumanLoopConfig>
An object containing information about the tasks the human reviewers will perform. See Human Loop Config details below.
latefinal
humanLoopRequestSource ↔ Output<FlowDefinitionHumanLoopRequestSource?>
Container for configuring the source of human task requests. Use to specify if Amazon Rekognition or Amazon Textract is used as an integration source. See Human Loop Request Source details below.
latefinal
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
outputConfig ↔ Output<FlowDefinitionOutputConfig>
An object containing information about where the human review results will be uploaded. See Output Config details below.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
roleArn ↔ Output<String>
ARN of the role needed to call other services on your behalf.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tags ↔ Output<Map<String, String>?>
A map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {FlowDefinitionState? state, CustomResourceOptions? options}) → FlowDefinition
Gets an existing FlowDefinition resource's state with the given name and id.