Skip to main content

connections

Creates, updates, deletes or gets a connection resource or lists connections in a region

Overview

Nameconnections
TypeResource
DescriptionSchema for AWS::CodeStarConnections::Connection resource which can be used to connect external source providers with AWS CodePipeline
Idaws.codestarconnections.connections

Fields

NameDatatypeDescription
connection_arnstringThe Amazon Resource Name (ARN) of the connection. The ARN is used as the connection reference when the connection is shared between AWS services.
connection_namestringThe name of the connection. Connection names must be unique in an AWS user account.
connection_statusstringThe current status of the connection.
owner_account_idstringThe name 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.
provider_typestringThe name of the external provider where your third-party code repository is configured. You must specify either a ProviderType or a HostArn.
host_arnstringThe host arn configured to represent the infrastructure where your third-party provider is installed. You must specify either a ProviderType or a HostArn.
tagsarraySpecifies the tags applied to a connection.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTConnectionName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all connections in a region.

SELECT
region,
connection_arn,
connection_name,
connection_status,
owner_account_id,
provider_type,
host_arn,
tags
FROM aws.codestarconnections.connections
WHERE region = 'us-east-1';

Gets all properties from an individual connection.

SELECT
region,
connection_arn,
connection_name,
connection_status,
owner_account_id,
provider_type,
host_arn,
tags
FROM aws.codestarconnections.connections
WHERE region = 'us-east-1' AND data__Identifier = '<ConnectionArn>';

INSERT example

Use the following StackQL query and manifest file to create a new connection resource, using stack-deploy.

/*+ create */
INSERT INTO aws.codestarconnections.connections (
ConnectionName,
region
)
SELECT
'{{ ConnectionName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.codestarconnections.connections
WHERE data__Identifier = '<ConnectionArn>'
AND region = 'us-east-1';

Permissions

To operate on the connections resource, the following permissions are required:

Create

codestar-connections:CreateConnection,
codestar-connections:TagResource

Read

codestar-connections:GetConnection,
codestar-connections:ListTagsForResource

Update

codestar-connections:ListTagsForResource,
codestar-connections:TagResource,
codestar-connections:UntagResource

Delete

codestar-connections:DeleteConnection

List

codestar-connections:ListConnections,
codestar-connections:ListTagsForResource