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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.codestarconnections.connections
WHERE
Identifier = '{{ connection_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

codestar-connections:CreateConnection,
codestar-connections:TagResource