AWS CodeCommit

2019/05/30 - AWS CodeCommit - 3 new1 updated api methods

Changes  Update codecommit client to latest version

ListTagsForResource (new) Link ¶

Gets information about AWS tags for a specified Amazon Resource Name (ARN) in AWS CodeCommit. For a list of valid resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    resourceArn='string',
    nextToken='string'
)
type resourceArn:

string

param resourceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource for which you want to get information about tags, if any.

type nextToken:

string

param nextToken:

An enumeration token that when provided in a request, returns the next batch of the results.

rtype:

dict

returns:

Response Syntax

{
    'tags': {
        'string': 'string'
    },
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • tags (dict) --

      A list of tag key and value pairs associated with the specified resource.

      • (string) --

        • (string) --

    • nextToken (string) --

      An enumeration token that allows the operation to batch the next results of the operation.

UntagResource (new) Link ¶

Removes tags for a resource in AWS CodeCommit. For a list of valid resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
type resourceArn:

string

param resourceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to which you want to remove tags.

type tagKeys:

list

param tagKeys:

[REQUIRED]

The tag key for each tag that you want to remove from the resource.

  • (string) --

returns:

None

TagResource (new) Link ¶

Adds or updates tags for a resource in AWS CodeCommit. For a list of valid resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    resourceArn='string',
    tags={
        'string': 'string'
    }
)
type resourceArn:

string

param resourceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to which you want to add or update tags.

type tags:

dict

param tags:

[REQUIRED]

The key-value pair to use when tagging this repository.

  • (string) --

    • (string) --

returns:

None

CreateRepository (updated) Link ¶
Changes (request)
{'tags': {'string': 'string'}}

Creates a new, empty repository.

See also: AWS API Documentation

Request Syntax

client.create_repository(
    repositoryName='string',
    repositoryDescription='string',
    tags={
        'string': 'string'
    }
)
type repositoryName:

string

param repositoryName:

[REQUIRED]

The name of the new repository to be created.

type repositoryDescription:

string

param repositoryDescription:

A comment or description about the new repository.

type tags:

dict

param tags:

One or more tag key-value pairs to use when tagging this repository.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'repositoryMetadata': {
        'accountId': 'string',
        'repositoryId': 'string',
        'repositoryName': 'string',
        'repositoryDescription': 'string',
        'defaultBranch': 'string',
        'lastModifiedDate': datetime(2015, 1, 1),
        'creationDate': datetime(2015, 1, 1),
        'cloneUrlHttp': 'string',
        'cloneUrlSsh': 'string',
        'Arn': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the output of a create repository operation.

    • repositoryMetadata (dict) --

      Information about the newly created repository.

      • accountId (string) --

        The ID of the AWS account associated with the repository.

      • repositoryId (string) --

        The ID of the repository.

      • repositoryName (string) --

        The repository's name.

      • repositoryDescription (string) --

        A comment or description about the repository.

      • defaultBranch (string) --

        The repository's default branch name.

      • lastModifiedDate (datetime) --

        The date and time the repository was last modified, in timestamp format.

      • creationDate (datetime) --

        The date and time the repository was created, in timestamp format.

      • cloneUrlHttp (string) --

        The URL to use for cloning the repository over HTTPS.

      • cloneUrlSsh (string) --

        The URL to use for cloning the repository over SSH.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the repository.