v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1445247249.8 KB

Imports the source repository credentials for an CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository.

post/#X-Amz-Target=CodeBuild_20161006.ImportSourceCredentials

Headers

X-Amz-Target'CodeBuild_20161006.ImportSourceCredentials' required

Request body

usernamestring

The Bitbucket username when the <code>authType</code> is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.

tokenstring password required

For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is the app password.

serverType'GITHUB' | 'BITBUCKET' | 'GITHUB_ENTERPRISE' required

The source provider used for this project.

authType'OAUTH' | 'BASIC_AUTH' | 'PERSONAL_ACCESS_TOKEN' required

The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API and must be created using the CodeBuild console.

shouldOverwriteboolean

Set to <code>false</code> to prevent overwriting the repository source credentials. Set to <code>true</code> to overwrite the repository source credentials. The default value is <code>true</code>.

Response

Success

arnstring

The Amazon Resource Name (ARN) of the token.