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
Idawscc.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.

For more information, see AWS::CodeStarConnections::Connection.

Methods

NameResourceAccessible byRequired Params
create_resourceconnectionsINSERTConnectionName, region
delete_resourceconnectionsDELETEIdentifier, region
update_resourceconnectionsUPDATEIdentifier, PatchDocument, region
list_resourcesconnections_list_onlySELECTregion
get_resourceconnectionsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual connection.

SELECT
region,
connection_arn,
connection_name,
connection_status,
owner_account_id,
provider_type,
host_arn,
tags
FROM awscc.codestarconnections.connections
WHERE
region = 'us-east-1' AND
Identifier = '{{ connection_arn }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.codestarconnections.connections
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ connection_arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.codestarconnections.connections
WHERE
Identifier = '{{ connection_arn }}' AND
region = 'us-east-1';

Permissions

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

codestar-connections:CreateConnection,
codestar-connections:TagResource