{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-codebuild/json-schema/aws-codebuild-start-build-input-schema.json",
  "title": "StartBuildInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-codebuild-aws-codebuild-x-amz-target-codebuild-20161006-startbuild-api-openapi.yml#/components/schemas/StartBuildInput",
  "type": "object",
  "properties": {
    "projectName": {
      "type": "string",
      "description": "The name of the CodeBuild build project to start running a build."
    },
    "secondarySourcesOverride": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProjectSource"
      },
      "description": "An array of ProjectSource objects."
    },
    "secondarySourcesVersionOverride": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProjectSourceVersion"
      },
      "description": "An array of ProjectSourceVersion objects that specify one or more versions of the project's secondary sources to be used for this build only."
    },
    "sourceVersion": {
      "type": "string",
      "description": "The version of the build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider: CodeCommit The commit ID, branch, or Git tag to use. GitHub The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format pr/pull-request-ID (for example pr/25). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. GitLab The com"
    },
    "artifactsOverride": {
      "$ref": "#/$defs/ProjectArtifacts"
    },
    "secondaryArtifactsOverride": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProjectArtifacts"
      },
      "description": "An array of ProjectArtifacts objects."
    },
    "environmentVariablesOverride": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EnvironmentVariable"
      },
      "description": "A set of environment variables that overrides, for this build only, the latest ones already defined in the build project."
    },
    "sourceTypeOverride": {
      "type": "string",
      "enum": [
        "CODECOMMIT",
        "CODEPIPELINE",
        "GITHUB",
        "GITLAB",
        "GITLAB_SELF_MANAGED",
        "S3",
        "BITBUCKET",
        "GITHUB_ENTERPRISE",
        "NO_SOURCE"
      ],
      "description": "A source input type, for this build, that overrides the source input defined in the build project."
    },
    "sourceLocationOverride": {
      "type": "string",
      "description": "A location that overrides, for this build, the source location for the one defined in the build project."
    },
    "sourceAuthOverride": {
      "$ref": "#/$defs/SourceAuth"
    },
    "gitCloneDepthOverride": {
      "type": "integer",
      "description": "The user-defined depth of history, with a minimum value of 0, that overrides, for this build only, any previous depth of history defined in the build project."
    },
    "gitSubmodulesConfigOverride": {
      "$ref": "#/$defs/GitSubmodulesConfig"
    },
    "buildspecOverride": {
      "type": "string",
      "description": "A buildspec file declaration that overrides the latest one defined in the build project, for this build only. The buildspec defined on the project is not changed. If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example, arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not provided or i"
    },
    "insecureSslOverride": {
      "type": "boolean",
      "description": "Enable this flag to override the insecure SSL setting that is specified in the build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise."
    },
    "reportBuildStatusOverride": {
      "type": "boolean",
      "description": "Set to true to report to your source provider the status of a build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket, an invalidInputException is thrown. To be able to report the build status to the source provider, the user associated with the source provider must have write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see Source provider access in the CodeBuild User Guide. The status of a build triggered by a webhook is "
    },
    "buildStatusConfigOverride": {
      "$ref": "#/$defs/BuildStatusConfig"
    },
    "environmentTypeOverride": {
      "type": "string",
      "enum": [
        "WINDOWS_CONTAINER",
        "LINUX_CONTAINER",
        "LINUX_GPU_CONTAINER",
        "ARM_CONTAINER",
        "WINDOWS_SERVER_2019_CONTAINER",
        "WINDOWS_SERVER_2022_CONTAINER",
        "LINUX_LAMBDA_CONTAINER",
        "ARM_LAMBDA_CONTAINER",
        "LINUX_EC2",
        "ARM_EC2",
        "WINDOWS_EC2",
        "MAC_ARM"
      ],
      "description": "A container type for this build that overrides the one specified in the build project."
    },
    "imageOverride": {
      "type": "string",
      "description": "The name of an image for this build that overrides the one specified in the build project."
    },
    "computeTypeOverride": {
      "type": "string",
      "enum": [
        "BUILD_GENERAL1_SMALL",
        "BUILD_GENERAL1_MEDIUM",
        "BUILD_GENERAL1_LARGE",
        "BUILD_GENERAL1_XLARGE",
        "BUILD_GENERAL1_2XLARGE",
        "BUILD_LAMBDA_1GB",
        "BUILD_LAMBDA_2GB",
        "BUILD_LAMBDA_4GB",
        "BUILD_LAMBDA_8GB",
        "BUILD_LAMBDA_10GB",
        "ATTRIBUTE_BASED_COMPUTE",
        "CUSTOM_INSTANCE_TYPE"
      ],
      "description": "The name of a compute type for this build that overrides the one specified in the build project."
    },
    "certificateOverride": {
      "type": "string",
      "description": "The name of a certificate for this build that overrides the one specified in the build project."
    },
    "cacheOverride": {
      "$ref": "#/$defs/ProjectCache"
    },
    "serviceRoleOverride": {
      "type": "string",
      "description": "The name of a service role for this build that overrides the one specified in the build project."
    },
    "privilegedModeOverride": {
      "type": "boolean",
      "description": "Enable this flag to override privileged mode in the build project."
    },
    "timeoutInMinutesOverride": {
      "type": "integer",
      "description": "The number of build timeout minutes, from 5 to 2160 (36 hours), that overrides, for this build only, the latest setting already defined in the build project."
    },
    "queuedTimeoutInMinutesOverride": {
      "type": "integer",
      "description": "The number of minutes a build is allowed to be queued before it times out."
    },
    "encryptionKeyOverride": {
      "type": "string",
      "description": "The Key Management Service customer master key (CMK) that overrides the one specified in the build project. The CMK key encrypts the build output artifacts. You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key. You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format alias/)."
    },
    "idempotencyToken": {
      "type": "string",
      "description": "A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. The token is included in the StartBuild request and is valid for 5 minutes. If you repeat the StartBuild request with the same token, but change a parameter, CodeBuild returns a parameter mismatch error."
    },
    "logsConfigOverride": {
      "$ref": "#/$defs/LogsConfig"
    },
    "registryCredentialOverride": {
      "$ref": "#/$defs/RegistryCredential"
    },
    "imagePullCredentialsTypeOverride": {
      "type": "string",
      "enum": [
        "CODEBUILD",
        "SERVICE_ROLE"
      ],
      "description": "The type of credentials CodeBuild uses to pull images in your build. There are two valid values: CODEBUILD Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust CodeBuild's service principal. SERVICE_ROLE Specifies that CodeBuild uses your build project's service role. When using a cross-account or private registry image, you must use SERVICE_ROLE credentials. When using an CodeBuild curated image, you must use CODEBUILD credentials."
    },
    "debugSessionEnabled": {
      "type": "boolean",
      "description": "Specifies if session debugging is enabled for this build. For more information, see Viewing a running build in Session Manager."
    },
    "fleetOverride": {
      "$ref": "#/$defs/ProjectFleet"
    },
    "autoRetryLimitOverride": {
      "type": "integer",
      "description": "The maximum number of additional automatic retries after a failed build. For example, if the auto-retry limit is set to 2, CodeBuild will call the RetryBuild API to automatically retry your build for up to 2 additional times."
    },
    "hostKernelOverride": {
      "type": "string",
      "enum": [
        "LINUX_KERNEL_4",
        "LINUX_KERNEL_6",
        "LINUX_KERNEL_LATEST"
      ],
      "description": "The host operating system kernel for this build that overrides the one specified in the build project."
    }
  },
  "required": [
    "projectName"
  ],
  "$defs": {
    "BuildStatusConfig": {
      "type": "object",
      "properties": {
        "context": {
          "type": "string",
          "description": "Specifies the context of the build status CodeBuild sends to the source provider. The usage of this parameter depends on the source provider. Bitbucket This parameter is used for the name parameter in the Bitbucket commit status. For more information, see build in the Bitbucket API documentation. GitHub/GitHub Enterprise Server This parameter is used for the context parameter in the GitHub commit status. For more information, see Create a commit status in the GitHub developer guide."
        },
        "targetUrl": {
          "type": "string",
          "description": "Specifies the target url of the build status CodeBuild sends to the source provider. The usage of this parameter depends on the source provider. Bitbucket This parameter is used for the url parameter in the Bitbucket commit status. For more information, see build in the Bitbucket API documentation. GitHub/GitHub Enterprise Server This parameter is used for the target_url parameter in the GitHub commit status. For more information, see Create a commit status in the GitHub developer guide."
        }
      }
    },
    "CloudWatchLogsConfig": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The current status of the logs in CloudWatch Logs for a build project. Valid values are: ENABLED: CloudWatch Logs are enabled for this build project. DISABLED: CloudWatch Logs are not enabled for this build project."
        },
        "groupName": {
          "type": "string",
          "description": "The group name of the logs in CloudWatch Logs. For more information, see Working with Log Groups and Log Streams."
        },
        "streamName": {
          "type": "string",
          "description": "The prefix of the stream name of the CloudWatch Logs. For more information, see Working with Log Groups and Log Streams."
        }
      },
      "required": [
        "status"
      ]
    },
    "EnvironmentVariable": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name or key of the environment variable."
        },
        "value": {
          "type": "string",
          "description": "The value of the environment variable. We strongly discourage the use of PLAINTEXT environment variables to store sensitive values, especially Amazon Web Services secret key IDs. PLAINTEXT environment variables can be displayed in plain text using the CodeBuild console and the CLI. For sensitive values, we recommend you use an environment variable of type PARAMETER_STORE or SECRETS_MANAGER."
        },
        "type": {
          "type": "string",
          "enum": [
            "PLAINTEXT",
            "PARAMETER_STORE",
            "SECRETS_MANAGER"
          ],
          "description": "The type of environment variable. Valid values include: PARAMETER_STORE: An environment variable stored in Systems Manager Parameter Store. For environment variables of this type, specify the name of the parameter as the value of the EnvironmentVariable. The parameter value will be substituted for the name at runtime. You can also define Parameter Store environment variables in the buildspec. To learn how to do so, see env/parameter-store in the CodeBuild User Guide. PLAINTEXT: An environment variable in plain text format. This is the default value. SECRETS_MANAGER: An environment variable sto"
        }
      },
      "required": [
        "name",
        "value"
      ]
    },
    "GitSubmodulesConfig": {
      "type": "object",
      "properties": {
        "fetchSubmodules": {
          "type": "boolean",
          "description": "Set to true to fetch Git submodules for your CodeBuild build project."
        }
      },
      "required": [
        "fetchSubmodules"
      ]
    },
    "LogsConfig": {
      "type": "object",
      "properties": {
        "cloudWatchLogs": {
          "$ref": "#/$defs/CloudWatchLogsConfig"
        },
        "s3Logs": {
          "$ref": "#/$defs/S3LogsConfig"
        }
      }
    },
    "ProjectArtifacts": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "CODEPIPELINE",
            "S3",
            "NO_ARTIFACTS"
          ],
          "description": "The type of build output artifact. Valid values include: CODEPIPELINE: The build project has build output generated through CodePipeline. The CODEPIPELINE type is not supported for secondaryArtifacts. NO_ARTIFACTS: The build project does not produce any build output. S3: The build project stores build output in Amazon S3."
        },
        "location": {
          "type": "string",
          "description": "Information about the build output artifact location: If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output locations instead of CodeBuild. If type is set to NO_ARTIFACTS, this value is ignored if specified, because no build output is produced. If type is set to S3, this is the name of the output bucket."
        },
        "path": {
          "type": "string",
          "description": "Along with namespaceType and name, the pattern that CodeBuild uses to name and store the output artifact: If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of CodeBuild. If type is set to NO_ARTIFACTS, this value is ignored if specified, because no build output is produced. If type is set to S3, this is the path to the output artifact. If path is not specified, path is not used. For example, if path is set to MyArtifacts, namespaceType is set to NONE, and name is set to MyArtifact.zip, the output ar"
        },
        "namespaceType": {
          "type": "string",
          "enum": [
            "NONE",
            "BUILD_ID"
          ],
          "description": "Along with path and name, the pattern that CodeBuild uses to determine the name and location to store the output artifact: If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of CodeBuild. If type is set to NO_ARTIFACTS, this value is ignored if specified, because no build output is produced. If type is set to S3, valid values include: BUILD_ID: Include the build ID in the location of the build output artifact. NONE: Do not include the build ID. This is the default if namespaceType is not specified. F"
        },
        "name": {
          "type": "string",
          "description": "Along with path and namespaceType, the pattern that CodeBuild uses to name and store the output artifact: If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of CodeBuild. If type is set to NO_ARTIFACTS, this value is ignored if specified, because no build output is produced. If type is set to S3, this is the name of the output artifact object. If you set the name to be a forward slash (\"/\"), the artifact is stored in the root of the output bucket. For example: If path is set to MyArtifacts, namespace"
        },
        "packaging": {
          "type": "string",
          "enum": [
            "NONE",
            "ZIP"
          ],
          "description": "The type of build output artifact to create: If type is set to CODEPIPELINE, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output artifacts instead of CodeBuild. If type is set to NO_ARTIFACTS, this value is ignored if specified, because no build output is produced. If type is set to S3, valid values include: NONE: CodeBuild creates in the output bucket a folder that contains the build output. This is the default if packaging is not specified. ZIP: CodeBuild creates in the output bucket a ZIP file that contains the build output."
        },
        "overrideArtifactName": {
          "type": "boolean",
          "description": "If this flag is set, a name specified in the buildspec file overrides the artifact name. The name specified in a buildspec file is calculated at build time and uses the Shell Command Language. For example, you can append a date and time to your artifact name so that it is always unique."
        },
        "encryptionDisabled": {
          "type": "boolean",
          "description": "Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon S3. If this is set with another artifacts type, an invalidInputException is thrown."
        },
        "artifactIdentifier": {
          "type": "string",
          "description": "An identifier for this artifact definition."
        },
        "bucketOwnerAccess": {
          "type": "string",
          "enum": [
            "NONE",
            "READ_ONLY",
            "FULL"
          ]
        }
      },
      "required": [
        "type"
      ]
    },
    "ProjectCache": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "NO_CACHE",
            "S3",
            "LOCAL"
          ],
          "description": "The type of cache used by the build project. Valid values include: NO_CACHE: The build project does not use any cache. S3: The build project reads and writes from and to S3. LOCAL: The build project stores a cache locally on a build host that is only available to that build host."
        },
        "location": {
          "type": "string",
          "description": "Information about the cache location: NO_CACHE or LOCAL: This value is ignored. S3: This is the S3 bucket name/prefix."
        },
        "modes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "LOCAL_DOCKER_LAYER_CACHE",
              "LOCAL_SOURCE_CACHE",
              "LOCAL_CUSTOM_CACHE"
            ]
          },
          "description": "An array of strings that specify the local cache modes. You can use one or more local cache modes at the same time. This is only used for LOCAL cache types. Possible values are: LOCAL_SOURCE_CACHE Caches Git metadata for primary and secondary sources. After the cache is created, subsequent builds pull only the change between commits. This mode is a good choice for projects with a clean working directory and a source that is a large Git repository. If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored. LOCAL_DOC"
        },
        "cacheNamespace": {
          "type": "string",
          "description": "Defines the scope of the cache. You can use this namespace to share a cache across multiple projects. For more information, see Cache sharing between projects in the CodeBuild User Guide."
        }
      },
      "required": [
        "type"
      ]
    },
    "ProjectFleet": {
      "type": "object",
      "properties": {
        "fleetArn": {
          "type": "string",
          "description": "Specifies the compute fleet ARN for the build project."
        }
      }
    },
    "ProjectSource": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "CODECOMMIT",
            "CODEPIPELINE",
            "GITHUB",
            "GITLAB",
            "GITLAB_SELF_MANAGED",
            "S3",
            "BITBUCKET",
            "GITHUB_ENTERPRISE",
            "NO_SOURCE"
          ],
          "description": "The type of repository that contains the source code to be built. Valid values include: BITBUCKET: The source code is in a Bitbucket repository. CODECOMMIT: The source code is in an CodeCommit repository. CODEPIPELINE: The source code settings are specified in the source action of a pipeline in CodePipeline. GITHUB: The source code is in a GitHub repository. GITHUB_ENTERPRISE: The source code is in a GitHub Enterprise Server repository. GITLAB: The source code is in a GitLab repository. GITLAB_SELF_MANAGED: The source code is in a self-managed GitLab repository. NO_SOURCE: The project does not"
        },
        "location": {
          "type": "string",
          "description": "Information about the location of the source code to be built. Valid values include: For source code settings that are specified in the source action of a pipeline in CodePipeline, location should not be specified. If it is specified, CodePipeline ignores it. This is because CodePipeline uses the settings in a pipeline's source action instead of this value. For source code in an CodeCommit repository, the HTTPS clone URL to the repository that contains the source code and the buildspec file (for example, https://git-codecommit..amazonaws.com/v1/repos/). For source code in an Amazon S3 input bu"
        },
        "gitCloneDepth": {
          "type": "integer",
          "description": "Information about the Git clone depth for the build project."
        },
        "gitSubmodulesConfig": {
          "$ref": "#/$defs/GitSubmodulesConfig"
        },
        "buildspec": {
          "type": "string",
          "description": "The buildspec file declaration to use for the builds in this build project. If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example, arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root dir"
        },
        "auth": {
          "$ref": "#/$defs/SourceAuth"
        },
        "reportBuildStatus": {
          "type": "boolean",
          "description": "Set to true to report the status of a build's start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, GitLab, GitLab Self Managed, or Bitbucket. If this is set and you use a different source provider, an invalidInputException is thrown. To be able to report the build status to the source provider, the user associated with the source provider must have write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see Source provider acces"
        },
        "buildStatusConfig": {
          "$ref": "#/$defs/BuildStatusConfig"
        },
        "insecureSsl": {
          "type": "boolean",
          "description": "Enable this flag to ignore SSL warnings while connecting to the project source code."
        },
        "sourceIdentifier": {
          "type": "string",
          "description": "An identifier for this project source. The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length."
        }
      },
      "required": [
        "type"
      ]
    },
    "ProjectSourceVersion": {
      "type": "object",
      "properties": {
        "sourceIdentifier": {
          "type": "string",
          "description": "An identifier for a source in the build project. The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length."
        },
        "sourceVersion": {
          "type": "string",
          "description": "The source version for the corresponding source identifier. If specified, must be one of: For CodeCommit: the commit ID, branch, or Git tag to use. For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format pr/pull-request-ID (for example, pr/25). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. For GitLab: the commit ID, branch, or Git tag to use. For Bitbucket: the commit ID,"
        }
      },
      "required": [
        "sourceIdentifier",
        "sourceVersion"
      ]
    },
    "RegistryCredential": {
      "type": "object",
      "properties": {
        "credential": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) or name of credentials created using Secrets Manager. The credential can use the name of the credentials only if they exist in your current Amazon Web Services Region."
        },
        "credentialProvider": {
          "type": "string",
          "enum": [
            "SECRETS_MANAGER"
          ],
          "description": "The service that created the credentials to access a private Docker registry. The valid value, SECRETS_MANAGER, is for Secrets Manager."
        }
      },
      "required": [
        "credential",
        "credentialProvider"
      ]
    },
    "S3LogsConfig": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The current status of the S3 build logs. Valid values are: ENABLED: S3 build logs are enabled for this build project. DISABLED: S3 build logs are not enabled for this build project."
        },
        "location": {
          "type": "string",
          "description": "The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name is my-bucket, and your path prefix is build-log, then acceptable formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log."
        },
        "encryptionDisabled": {
          "type": "boolean",
          "description": "Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted."
        },
        "bucketOwnerAccess": {
          "type": "string",
          "enum": [
            "NONE",
            "READ_ONLY",
            "FULL"
          ]
        }
      },
      "required": [
        "status"
      ]
    },
    "SourceAuth": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "OAUTH",
            "CODECONNECTIONS",
            "SECRETS_MANAGER"
          ],
          "description": "The authorization type to use. Valid options are OAUTH, CODECONNECTIONS, or SECRETS_MANAGER."
        },
        "resource": {
          "type": "string",
          "description": "The resource value that applies to the specified authorization type."
        }
      },
      "required": [
        "type"
      ]
    }
  }
}