Table of Contents
A low-level client representing AWS CodeStar connections:
import boto3
client = boto3.client('codestar-connections')
These are the available methods:
Check if an operation can be paginated.
Creates a connection that can then be given to other AWS services like CodePipeline so that it can access third-party code repositories. The connection is in pending status until the third-party connection handshake is completed from the console.
See also: AWS API Documentation
Request Syntax
response = client.create_connection(
ProviderType='Bitbucket',
ConnectionName='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The name of the external provider where your third-party code repository is configured. Currently, the valid provider type is Bitbucket.
[REQUIRED]
The name of the connection to be created. The name must be unique in the calling AWS account.
The key-value pair to use when tagging the resource.
A tag is a key-value pair that is used to manage the resource.
This tag is available for use by AWS services that support tags.
The tag's key.
The tag's value.
dict
Response Syntax
{
'ConnectionArn': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
Response Structure
(dict) --
ConnectionArn (string) --
The Amazon Resource Name (ARN) of the connection to be created. The ARN is used as the connection reference when the connection is shared between AWS services.
Note
The ARN is never reused if the connection is deleted.
Tags (list) --
Specifies the tags applied to the resource.
(dict) --
A tag is a key-value pair that is used to manage the resource.
This tag is available for use by AWS services that support tags.
Key (string) --
The tag's key.
Value (string) --
The tag's value.
Exceptions
The connection to be deleted.
See also: AWS API Documentation
Request Syntax
response = client.delete_connection(
ConnectionArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the connection to be deleted.
Note
The ARN is never reused if the connection is deleted.
{}
Response Structure
Exceptions
Generate a presigned url given a client, its method, and arguments
The presigned url
Returns the connection ARN and details such as status, owner, and provider type.
See also: AWS API Documentation
Request Syntax
response = client.get_connection(
ConnectionArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of a connection.
{
'Connection': {
'ConnectionName': 'string',
'ConnectionArn': 'string',
'ProviderType': 'Bitbucket',
'OwnerAccountId': 'string',
'ConnectionStatus': 'PENDING'|'AVAILABLE'|'ERROR'
}
}
Response Structure
The connection details, such as status, owner, and provider type.
The name of the connection. Connection names must be unique in an AWS user account.
The Amazon Resource Name (ARN) of the connection. The ARN is used as the connection reference when the connection is shared between AWS services.
Note
The ARN is never reused if the connection is deleted.
The name of the external provider where your third-party code repository is configured. Currently, the valid provider type is Bitbucket.
The identifier of the external provider where your third-party code repository is configured. For Bitbucket, this is the account ID of the owner of the Bitbucket repository.
The current status of the connection.
Exceptions
Create a paginator for an operation.
Returns an object that can wait for some condition.
Lists the connections associated with your account.
See also: AWS API Documentation
Request Syntax
response = client.list_connections(
ProviderTypeFilter='Bitbucket',
MaxResults=123,
NextToken='string'
)
dict
Response Syntax
{
'Connections': [
{
'ConnectionName': 'string',
'ConnectionArn': 'string',
'ProviderType': 'Bitbucket',
'OwnerAccountId': 'string',
'ConnectionStatus': 'PENDING'|'AVAILABLE'|'ERROR'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Connections (list) --
A list of connections and the details for each connection, such as status, owner, and provider type.
(dict) --
The AWS::CodeStarConnections::Connection resource can be used to connect external source providers with services like AWS CodePipeline.
Note: A connection created through CloudFormation is in PENDING status by default. You can make its status AVAILABLE by editing the connection in the CodePipeline console.
ConnectionName (string) --
The name of the connection. Connection names must be unique in an AWS user account.
ConnectionArn (string) --
The Amazon Resource Name (ARN) of the connection. The ARN is used as the connection reference when the connection is shared between AWS services.
Note
The ARN is never reused if the connection is deleted.
ProviderType (string) --
The name of the external provider where your third-party code repository is configured. Currently, the valid provider type is Bitbucket.
OwnerAccountId (string) --
The identifier of the external provider where your third-party code repository is configured. For Bitbucket, this is the account ID of the owner of the Bitbucket repository.
ConnectionStatus (string) --
The current status of the connection.
NextToken (string) --
A token that can be used in the next ListConnections call. To view all items in the list, continue to call this operation with each subsequent token until no more nextToken values are returned.
Gets the set of key-value pairs (metadata) that are used to manage the resource.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource for which you want to get information about tags, if any.
{
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
Response Structure
A list of tag key and value pairs associated with the specified resource.
A tag is a key-value pair that is used to manage the resource.
This tag is available for use by AWS services that support tags.
The tag's key.
The tag's value.
Exceptions
Adds to or modifies the tags of the given resource. Tags are metadata that can be used to manage a resource.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
ResourceArn='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource to which you want to add or update tags.
[REQUIRED]
The tags you want to modify or add to the resource.
A tag is a key-value pair that is used to manage the resource.
This tag is available for use by AWS services that support tags.
The tag's key.
The tag's value.
dict
Response Syntax
{}
Response Structure
Exceptions
Removes tags from an AWS resource.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
ResourceArn='string',
TagKeys=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource to remove tags from.
[REQUIRED]
The list of keys for the tags to be removed from the resource.
dict
Response Syntax
{}
Response Structure
Exceptions
The available paginators are: