On July 31, 2024, Amazon Web Services (AWS) will discontinue support for creating and viewing AWS CodeStar projects. After July 31, 2024, you will no longer be able to access the AWS CodeStar console or create new projects. However, the AWS resources created by AWS CodeStar, including your source repositories, pipelines, and builds, will be unaffected by this change and will continue to function. AWS CodeStar Connections will not be impacted by this discontinuation.
If you wish to track work, develop code, and build, test, and deploy
your applications, Amazon CodeCatalyst provides a streamlined getting started
process and additional functionality to manage your software projects. Learn
more about functionality
CreateProject
Creates a project, including project resources. This action creates a project based on a submitted project request. A set of source code files and a toolchain template file can be included with the project request. If these are not provided, an empty project is created.
Request Syntax
{
"clientRequestToken": "string
",
"description": "string
",
"id": "string
",
"name": "string
",
"sourceCode": [
{
"destination": {
"codeCommit": {
"name": "string
"
},
"gitHub": {
"description": "string
",
"issuesEnabled": boolean
,
"name": "string
",
"owner": "string
",
"privateRepository": boolean
,
"token": "string
",
"type": "string
"
}
},
"source": {
"s3": {
"bucketKey": "string
",
"bucketName": "string
"
}
}
}
],
"tags": {
"string
" : "string
"
},
"toolchain": {
"roleArn": "string
",
"source": {
"s3": {
"bucketKey": "string
",
"bucketName": "string
"
}
},
"stackParameters": {
"string
" : "string
"
}
}
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- clientRequestToken
-
A user- or system-generated token that identifies the entity that requested project creation. This token can be used to repeat the request.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern:
^[\w:/-]+$
Required: No
- description
-
The description of the project, if any.
Type: String
Length Constraints: Maximum length of 1024.
Pattern:
^$|^\S(.*\S)?$
Required: No
- id
-
The ID of the project to be created in AWS CodeStar.
Type: String
Length Constraints: Minimum length of 2. Maximum length of 15.
Pattern:
^[a-z][a-z0-9-]+$
Required: Yes
- name
-
The display name for the project to be created in AWS CodeStar.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Pattern:
^\S(.*\S)?$
Required: Yes
- sourceCode
-
A list of the Code objects submitted with the project request. If this parameter is specified, the request must also include the toolchain parameter.
Type: Array of Code objects
Required: No
-
The tags created for the project.
Type: String to string map
Key Length Constraints: Minimum length of 1. Maximum length of 128.
Key Pattern:
^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$
Value Length Constraints: Maximum length of 256.
Value Pattern:
^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$
Required: No
- toolchain
-
The name of the toolchain template file submitted with the project request. If this parameter is specified, the request must also include the sourceCode parameter.
Type: Toolchain object
Required: No
Response Syntax
{
"arn": "string",
"clientRequestToken": "string",
"id": "string",
"projectTemplateId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- arn
-
The Amazon Resource Name (ARN) of the created project.
Type: String
Pattern:
^arn:aws[^:\s]*:codestar:[^:\s]+:[0-9]{12}:project\/[a-z]([a-z0-9|-])+$
- clientRequestToken
-
A user- or system-generated token that identifies the entity that requested project creation.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern:
^[\w:/-]+$
- id
-
The ID of the project.
Type: String
Length Constraints: Minimum length of 2. Maximum length of 15.
Pattern:
^[a-z][a-z0-9-]+$
- projectTemplateId
-
The ID for the AWS CodeStar project template used to create the project.
Type: String
Length Constraints: Minimum length of 1.
Pattern:
^arn:aws[^:\s]{0,5}:codestar:[^:\s]+::project-template(\/(github|codecommit))?\/[a-z0-9-]+$
Errors
For information about the errors that are common to all actions, see Common Errors.
- ConcurrentModificationException
-
Another modification is being made. That modification must complete before you can make your change.
HTTP Status Code: 400
- InvalidServiceRoleException
-
The service role is not valid.
HTTP Status Code: 400
- LimitExceededException
-
A resource limit has been exceeded.
HTTP Status Code: 400
- ProjectAlreadyExistsException
-
An AWS CodeStar project with the same ID already exists in this region for the AWS account. AWS CodeStar project IDs must be unique within a region for the AWS account.
HTTP Status Code: 400
- ProjectConfigurationException
-
Project configuration information is required but not specified.
HTTP Status Code: 400
- ProjectCreationFailedException
-
The project creation request was valid, but a nonspecific exception or error occurred during project creation. The project could not be created in AWS CodeStar.
HTTP Status Code: 400
- ValidationException
-
The specified input is either not valid, or it could not be validated.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: