connections
Creates, updates, deletes or gets a connection resource or lists connections in a region
Overview
| Name | connections |
| Type | Resource |
| Description | Schema for AWS::CodeStarConnections::Connection resource which can be used to connect external source providers with AWS CodePipeline |
| Id | awscc.codestarconnections.connections |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
connection_arn | 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. |
connection_name | string | The name of the connection. Connection names must be unique in an AWS user account. |
connection_status | string | The current status of the connection. |
owner_account_id | string | The 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_type | string | The name of the external provider where your third-party code repository is configured. You must specify either a ProviderType or a HostArn. |
host_arn | string | The host arn configured to represent the infrastructure where your third-party provider is installed. You must specify either a ProviderType or a HostArn. |
tags | array | Specifies the tags applied to a connection. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
connection_arn | 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. |
region | string | AWS region. |
For more information, see AWS::CodeStarConnections::Connection.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | connections | INSERT | ConnectionName, region |
delete_resource | connections | DELETE | Identifier, region |
update_resource | connections | UPDATE | Identifier, PatchDocument, region |
list_resources | connections_list_only | SELECT | region |
get_resource | connections | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all connections in a region.
SELECT
region,
connection_arn
FROM awscc.codestarconnections.connections_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new connection resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.codestarconnections.connections (
ConnectionName,
region
)
SELECT
'{{ connection_name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.codestarconnections.connections (
ConnectionName,
ProviderType,
HostArn,
Tags,
region
)
SELECT
'{{ connection_name }}',
'{{ provider_type }}',
'{{ host_arn }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: connection
props:
- name: connection_name
value: '{{ connection_name }}'
- name: provider_type
value: '{{ provider_type }}'
- name: host_arn
value: '{{ host_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
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:
- Create
- Read
- Update
- Delete
- List
codestar-connections:CreateConnection,
codestar-connections:TagResource
codestar-connections:GetConnection,
codestar-connections:ListTagsForResource
codestar-connections:ListTagsForResource,
codestar-connections:TagResource,
codestar-connections:UntagResource
codestar-connections:DeleteConnection
codestar-connections:ListConnections,
codestar-connections:ListTagsForResource