AWS CodeBuild

2018/12/06 - AWS CodeBuild - 3 new api methods

Changes  Update codebuild client to latest version

ImportSourceCredentials (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.import_source_credentials(
    username='string',
    token='string',
    serverType='GITHUB'|'BITBUCKET'|'GITHUB_ENTERPRISE',
    authType='OAUTH'|'BASIC_AUTH'|'PERSONAL_ACCESS_TOKEN'
)
type username:

string

param username:

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

type token:

string

param token:

[REQUIRED]

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

type serverType:

string

param serverType:

[REQUIRED]

The source provider used for this project.

type authType:

string

param authType:

[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 AWS CodeBuild console.

rtype:

dict

returns:

Response Syntax

{
    'arn': 'string'
}

Response Structure

  • (dict) --

    • arn (string) --

      The Amazon Resource Name (ARN) of the token.

DeleteSourceCredentials (new) Link ¶

Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials.

See also: AWS API Documentation

Request Syntax

client.delete_source_credentials(
    arn='string'
)
type arn:

string

param arn:

[REQUIRED]

The Amazon Resource Name (ARN) of the token.

rtype:

dict

returns:

Response Syntax

{
    'arn': 'string'
}

Response Structure

  • (dict) --

    • arn (string) --

      The Amazon Resource Name (ARN) of the token.

ListSourceCredentials (new) Link ¶

Returns a list of SourceCredentialsInfo objects.

See also: AWS API Documentation

Request Syntax

client.list_source_credentials()
rtype:

dict

returns:

Response Syntax

{
    'sourceCredentialsInfos': [
        {
            'arn': 'string',
            'serverType': 'GITHUB'|'BITBUCKET'|'GITHUB_ENTERPRISE',
            'authType': 'OAUTH'|'BASIC_AUTH'|'PERSONAL_ACCESS_TOKEN'
        },
    ]
}

Response Structure

  • (dict) --

    • sourceCredentialsInfos (list) --

      A list of SourceCredentialsInfo objects. Each SourceCredentialsInfo object includes the authentication type, token ARN, and type of source provider for one set of credentials.

      • (dict) --

        Information about the credentials for a GitHub, GitHub Enterprise, or Bitbucket repository.

        • arn (string) --

          The Amazon Resource Name (ARN) of the token.

        • serverType (string) --

          The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.

        • authType (string) --

          The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.