{
  "description": "LabelingJob is the Schema for the LabelingJobs API",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "LabelingJobSpec defines the desired state of LabelingJob.",
      "properties": {
        "humanTaskConfig": {
          "description": "Configures the labeling task and how it is presented to workers; including,\nbut not limited to price, keywords, and batch size (task count).",
          "properties": {
            "annotationConsolidationConfig": {
              "description": "Configures how labels are consolidated across human workers and processes\noutput data.",
              "properties": {
                "annotationConsolidationLambdaARN": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "maxConcurrentTaskCount": {
              "format": "int64",
              "type": "integer"
            },
            "numberOfHumanWorkersPerDataObject": {
              "format": "int64",
              "type": "integer"
            },
            "preHumanTaskLambdaARN": {
              "type": "string"
            },
            "publicWorkforceTaskPrice": {
              "description": "Defines the amount of money paid to an Amazon Mechanical Turk worker for\neach task performed.\n\nUse one of the following prices for bounding box tasks. Prices are in US\ndollars and should be based on the complexity of the task; the longer it\ntakes in your initial testing, the more you should offer.\n\n   * 0.036\n\n   * 0.048\n\n   * 0.060\n\n   * 0.072\n\n   * 0.120\n\n   * 0.240\n\n   * 0.360\n\n   * 0.480\n\n   * 0.600\n\n   * 0.720\n\n   * 0.840\n\n   * 0.960\n\n   * 1.080\n\n   * 1.200\n\nUse one of the following prices for image classification, text classification,\nand custom tasks. Prices are in US dollars.\n\n   * 0.012\n\n   * 0.024\n\n   * 0.036\n\n   * 0.048\n\n   * 0.060\n\n   * 0.072\n\n   * 0.120\n\n   * 0.240\n\n   * 0.360\n\n   * 0.480\n\n   * 0.600\n\n   * 0.720\n\n   * 0.840\n\n   * 0.960\n\n   * 1.080\n\n   * 1.200\n\nUse one of the following prices for semantic segmentation tasks. Prices are\nin US dollars.\n\n   * 0.840\n\n   * 0.960\n\n   * 1.080\n\n   * 1.200\n\nUse one of the following prices for Textract AnalyzeDocument Important Form\nKey Amazon Augmented AI review tasks. Prices are in US dollars.\n\n   * 2.400\n\n   * 2.280\n\n   * 2.160\n\n   * 2.040\n\n   * 1.920\n\n   * 1.800\n\n   * 1.680\n\n   * 1.560\n\n   * 1.440\n\n   * 1.320\n\n   * 1.200\n\n   * 1.080\n\n   * 0.960\n\n   * 0.840\n\n   * 0.720\n\n   * 0.600\n\n   * 0.480\n\n   * 0.360\n\n   * 0.240\n\n   * 0.120\n\n   * 0.072\n\n   * 0.060\n\n   * 0.048\n\n   * 0.036\n\n   * 0.024\n\n   * 0.012\n\nUse one of the following prices for Rekognition DetectModerationLabels Amazon\nAugmented AI review tasks. Prices are in US dollars.\n\n   * 1.200\n\n   * 1.080\n\n   * 0.960\n\n   * 0.840\n\n   * 0.720\n\n   * 0.600\n\n   * 0.480\n\n   * 0.360\n\n   * 0.240\n\n   * 0.120\n\n   * 0.072\n\n   * 0.060\n\n   * 0.048\n\n   * 0.036\n\n   * 0.024\n\n   * 0.012\n\nUse one of the following prices for Amazon Augmented AI custom human review\ntasks. Prices are in US dollars.\n\n   * 1.200\n\n   * 1.080\n\n   * 0.960\n\n   * 0.840\n\n   * 0.720\n\n   * 0.600\n\n   * 0.480\n\n   * 0.360\n\n   * 0.240\n\n   * 0.120\n\n   * 0.072\n\n   * 0.060\n\n   * 0.048\n\n   * 0.036\n\n   * 0.024\n\n   * 0.012",
              "properties": {
                "amountInUsd": {
                  "description": "Represents an amount of money in United States dollars.",
                  "properties": {
                    "cents": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "dollars": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "tenthFractionsOfACent": {
                      "format": "int64",
                      "type": "integer"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "taskAvailabilityLifetimeInSeconds": {
              "format": "int64",
              "type": "integer"
            },
            "taskDescription": {
              "type": "string"
            },
            "taskKeywords": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "taskTimeLimitInSeconds": {
              "format": "int64",
              "type": "integer"
            },
            "taskTitle": {
              "type": "string"
            },
            "uiConfig": {
              "description": "Provided configuration information for the worker UI for a labeling job.\nProvide either HumanTaskUiArn or UiTemplateS3Uri.\n\nFor named entity recognition, 3D point cloud and video frame labeling jobs,\nuse HumanTaskUiArn.\n\nFor all other Ground Truth built-in task types and custom task types, use\nUiTemplateS3Uri to specify the location of a worker task template in Amazon\nS3.",
              "properties": {
                "humanTaskUIARN": {
                  "type": "string"
                },
                "uiTemplateS3URI": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "workteamARN": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "inputConfig": {
          "description": "Input data for the labeling job, such as the Amazon S3 location of the data\nobjects and the location of the manifest file that describes the data objects.\n\nYou must specify at least one of the following: S3DataSource or SnsDataSource.\n\n  - Use SnsDataSource to specify an SNS input topic for a streaming labeling\n    job. If you do not specify and SNS input topic ARN, Ground Truth will\n    create a one-time labeling job that stops after all data objects in the\n    input manifest file have been labeled.\n\n  - Use S3DataSource to specify an input manifest file for both streaming\n    and one-time labeling jobs. Adding an S3DataSource is optional if you\n    use SnsDataSource to create a streaming labeling job.\n\nIf you use the Amazon Mechanical Turk workforce, your input data should not\ninclude confidential information, personal information or protected health\ninformation. Use ContentClassifiers to specify that your data is free of\npersonally identifiable information and adult content.",
          "properties": {
            "dataAttributes": {
              "description": "Attributes of the data specified by the customer. Use these to describe the\ndata to be labeled.",
              "properties": {
                "contentClassifiers": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "dataSource": {
              "description": "Provides information about the location of input data.\n\nYou must specify at least one of the following: S3DataSource or SnsDataSource.\n\nUse SnsDataSource to specify an SNS input topic for a streaming labeling\njob. If you do not specify and SNS input topic ARN, Ground Truth will create\na one-time labeling job.\n\nUse S3DataSource to specify an input manifest file for both streaming and\none-time labeling jobs. Adding an S3DataSource is optional if you use SnsDataSource\nto create a streaming labeling job.",
              "properties": {
                "s3DataSource": {
                  "description": "The Amazon S3 location of the input data objects.",
                  "properties": {
                    "manifestS3URI": {
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "snsDataSource": {
                  "description": "An Amazon SNS data source used for streaming labeling jobs.",
                  "properties": {
                    "snsTopicARN": {
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "labelAttributeName": {
          "description": "The attribute name to use for the label in the output manifest file. This\nis the key for the key/value pair formed with the label that a worker assigns\nto the object. The LabelAttributeName must meet the following requirements.\n\n  - The name can't end with \"-metadata\".\n\n  - If you are using one of the built-in task types (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-task-types.html)\n    or one of the following, the attribute name must end with \"-ref\". Image\n    semantic segmentation (SemanticSegmentation) and adjustment (AdjustmentSemanticSegmentation)\n    labeling jobs for this task type. One exception is that verification (VerificationSemanticSegmentation)\n    must not end with -\"ref\". Video frame object detection (VideoObjectDetection),\n    and adjustment and verification (AdjustmentVideoObjectDetection) labeling\n    jobs for this task type. Video frame object tracking (VideoObjectTracking),\n    and adjustment and verification (AdjustmentVideoObjectTracking) labeling\n    jobs for this task type. 3D point cloud semantic segmentation (3DPointCloudSemanticSegmentation),\n    and adjustment and verification (Adjustment3DPointCloudSemanticSegmentation)\n    labeling jobs for this task type. 3D point cloud object tracking (3DPointCloudObjectTracking),\n    and adjustment and verification (Adjustment3DPointCloudObjectTracking)\n    labeling jobs for this task type.\n\nIf you are creating an adjustment or verification labeling job, you must\nuse a different LabelAttributeName than the one used in the original labeling\njob. The original labeling job is the Ground Truth labeling job that produced\nthe labels that you want verified or adjusted. To learn more about adjustment\nand verification labeling jobs, see Verify and Adjust Labels (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-verification-data.html).\n\nRegex Pattern: `^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,126}$`",
          "type": "string"
        },
        "labelCategoryConfigS3URI": {
          "description": "The S3 URI of the file, referred to as a label category configuration file,\nthat defines the categories used to label the data objects.\n\nFor 3D point cloud and video frame task types, you can add label category\nattributes and frame attributes to your label category configuration file.\nTo learn how, see Create a Labeling Category Configuration File for 3D Point\nCloud Labeling Jobs (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-point-cloud-label-category-config.html).\n\nFor named entity recognition jobs, in addition to \"labels\", you must provide\nworker instructions in the label category configuration file using the \"instructions\"\nparameter: \"instructions\": {\"shortInstruction\":\"<h1>Add header</h1><p>Add\nInstructions</p>\", \"fullInstruction\":\"<p>Add additional instructions.</p>\"}.\nFor details and an example, see Create a Named Entity Recognition Labeling\nJob (API) (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-named-entity-recg.html#sms-creating-ner-api).\n\nFor all other built-in task types (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-task-types.html)\nand custom tasks (https://docs.aws.amazon.com/sagemaker/latest/dg/sms-custom-templates.html),\nyour label category configuration file must be a JSON file in the following\nformat. Identify the labels you want to use by replacing label_1, label_2,...,label_n\nwith your label categories.\n\n{\n\n\"document-version\": \"2018-11-28\",\n\n\"labels\": [{\"label\": \"label_1\"},{\"label\": \"label_2\"},...{\"label\": \"label_n\"}]\n\n}\n\nNote the following about the label category configuration file:\n\n  - For image classification and text classification (single and multi-label)\n    you must specify at least two label categories. For all other task types,\n    the minimum number of label categories required is one.\n\n  - Each label category must be unique, you cannot specify duplicate label\n    categories.\n\n  - If you create a 3D point cloud or video frame adjustment or verification\n    labeling job, you must include auditLabelAttributeName in the label category\n    configuration. Use this parameter to enter the LabelAttributeName (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateLabelingJob.html#sagemaker-CreateLabelingJob-request-LabelAttributeName)\n    of the labeling job you want to adjust or verify annotations of.\n\nRegex Pattern: `^(https|s3)://([^/]+)/?(.*)$`",
          "type": "string"
        },
        "labelingJobAlgorithmsConfig": {
          "description": "Configures the information required to perform automated data labeling.",
          "properties": {
            "initialActiveLearningModelARN": {
              "type": "string"
            },
            "labelingJobAlgorithmSpecificationARN": {
              "type": "string"
            },
            "labelingJobResourceConfig": {
              "description": "Configure encryption on the storage volume attached to the ML compute instance\nused to run automated data labeling model training and inference.",
              "properties": {
                "volumeKMSKeyID": {
                  "type": "string"
                },
                "vpcConfig": {
                  "description": "Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs,\nhosted models, and compute resources have access to. You can control access\nto and from your resources by configuring a VPC. For more information, see\nGive SageMaker Access to Resources in your Amazon VPC (https://docs.aws.amazon.com/sagemaker/latest/dg/infrastructure-give-access.html).",
                  "properties": {
                    "securityGroupIDs": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "subnets": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "labelingJobName": {
          "description": "The name of the labeling job. This name is used to identify the job in a\nlist of labeling jobs. Labeling job names must be unique within an Amazon\nWeb Services account and region. LabelingJobName is not case sensitive. For\nexample, Example-job and example-job are considered the same labeling job\nname by Ground Truth.\n\nRegex Pattern: `^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}$`",
          "type": "string"
        },
        "outputConfig": {
          "description": "The location of the output data and the Amazon Web Services Key Management\nService key ID for the key used to encrypt the output data, if any.",
          "properties": {
            "kmsKeyID": {
              "type": "string"
            },
            "s3OutputPath": {
              "type": "string"
            },
            "snsTopicARN": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "roleARN": {
          "description": "The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform\ntasks on your behalf during data labeling. You must grant this role the necessary\npermissions so that Amazon SageMaker can successfully complete data labeling.\n\nRegex Pattern: `^arn:aws[a-z\\-]*:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$`",
          "type": "string"
        },
        "stoppingConditions": {
          "description": "A set of conditions for stopping the labeling job. If any of the conditions\nare met, the job is automatically stopped. You can use these conditions to\ncontrol the cost of data labeling.",
          "properties": {
            "maxHumanLabeledObjectCount": {
              "format": "int64",
              "type": "integer"
            },
            "maxPercentageOfInputDatasetLabeled": {
              "format": "int64",
              "type": "integer"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "tags": {
          "description": "An array of key/value pairs. For more information, see Using Cost Allocation\nTags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what)\nin the Amazon Web Services Billing and Cost Management User Guide.",
          "items": {
            "description": "A tag object that consists of a key and an optional value, used to manage\nmetadata for SageMaker Amazon Web Services resources.\n\nYou can add tags to notebook instances, training jobs, hyperparameter tuning\njobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations,\nand endpoints. For more information on adding tags to SageMaker resources,\nsee AddTags (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AddTags.html).\n\nFor more information on adding metadata to your Amazon Web Services resources\nwith tagging, see Tagging Amazon Web Services resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html).\nFor advice on best practices for managing Amazon Web Services resources with\ntagging, see Tagging Best Practices: Implement an Effective Amazon Web Services\nResource Tagging Strategy (https://d1.awsstatic.com/whitepapers/aws-tagging-best-practices.pdf).",
            "properties": {
              "key": {
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "required": [
        "humanTaskConfig",
        "inputConfig",
        "labelAttributeName",
        "labelingJobName",
        "outputConfig",
        "roleARN"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "LabelingJobStatus defines the observed state of LabelingJob",
      "properties": {
        "ackResourceMetadata": {
          "description": "All CRs managed by ACK have a common `Status.ACKResourceMetadata` member\nthat is used to contain resource sync state, account ownership,\nconstructed ARN for the resource",
          "properties": {
            "arn": {
              "description": "ARN is the Amazon Resource Name for the resource. This is a\nglobally-unique identifier and is set only by the ACK service controller\nonce the controller has orchestrated the creation of the resource OR\nwhen it has verified that an \"adopted\" resource (a resource where the\nARN annotation was set by the Kubernetes user on the CR) exists and\nmatches the supplied CR's Spec field values.\nhttps://github.com/aws/aws-controllers-k8s/issues/270",
              "type": "string"
            },
            "ownerAccountID": {
              "description": "OwnerAccountID is the AWS Account ID of the account that owns the\nbackend AWS service API resource.",
              "type": "string"
            },
            "region": {
              "description": "Region is the AWS region in which the resource exists or will exist.",
              "type": "string"
            }
          },
          "required": [
            "ownerAccountID",
            "region"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "conditions": {
          "description": "All CRs managed by ACK have a common `Status.Conditions` member that\ncontains a collection of `ackv1alpha1.Condition` objects that describe\nthe various terminal states of the CR and its backend AWS service API\nresource",
          "items": {
            "description": "Condition is the common struct used by all CRDs managed by ACK service\ncontrollers to indicate terminal states  of the CR and its backend AWS\nservice API resource",
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "A human readable message indicating details about the transition.",
                "type": "string"
              },
              "reason": {
                "description": "The reason for the condition's last transition.",
                "type": "string"
              },
              "status": {
                "description": "Status of the condition, one of True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type is the type of the Condition",
                "type": "string"
              }
            },
            "required": [
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "failureReason": {
          "description": "If the job failed, the reason that it failed.",
          "type": "string"
        },
        "jobReferenceCode": {
          "description": "A unique identifier for work done as part of a labeling job.\n\nRegex Pattern: `^.+$`",
          "type": "string"
        },
        "labelCounters": {
          "description": "Provides a breakdown of the number of data objects labeled by humans, the\nnumber of objects labeled by machine, the number of objects than couldn't\nbe labeled, and the total number of objects labeled.",
          "properties": {
            "failedNonRetryableError": {
              "format": "int64",
              "type": "integer"
            },
            "humanLabeled": {
              "format": "int64",
              "type": "integer"
            },
            "machineLabeled": {
              "format": "int64",
              "type": "integer"
            },
            "totalLabeled": {
              "format": "int64",
              "type": "integer"
            },
            "unlabeled": {
              "format": "int64",
              "type": "integer"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "labelingJobOutput": {
          "description": "The location of the output produced by the labeling job.",
          "properties": {
            "finalActiveLearningModelARN": {
              "type": "string"
            },
            "outputDatasetS3URI": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "labelingJobStatus": {
          "description": "The processing status of the labeling job.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
