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 | aws.codestarconnections.connections |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ConnectionName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.codestarconnections.connections (
ConnectionName,
region
)
SELECT
'{{ ConnectionName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.codestarconnections.connections (
ConnectionName,
ProviderType,
HostArn,
Tags,
region
)
SELECT
'{{ ConnectionName }}',
'{{ ProviderType }}',
'{{ HostArn }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: connection
props:
- name: ConnectionName
value: '{{ ConnectionName }}'
- name: ProviderType
value: '{{ ProviderType }}'
- name: HostArn
value: '{{ HostArn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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