CodeConnections
Introduction
Section titled “Introduction”CodeConnections is a service provided by Amazon Web Services (AWS) that enables you to connect your code repositories to your AWS resources. It allows you to create connections to your code repositories and integrate them with supported AWS services.
LocalStack provides a mock implementation of the CodeConnections API that allows you to create and manage connections to your code repositories. The supported APIs are available on our API Coverage section, which provides information on the extent of CodeConnections’s integration with LocalStack.
Getting started
Section titled “Getting started”This guide is designed for users new to CodeConnections and assumes basic knowledge of the AWS CLI and our awslocal
wrapper script.
Start your LocalStack container using your preferred method. We will demonstrate how to create a connection to a code repository using the CodeConnections API.
Create a connection
Section titled “Create a connection”You can create a connection to a code repository using the CreateConnection
API.
awslocal codeconnections create-connection \ --connection-name my-connection
You should see the connection in the output.
{ "ConnectionArn": "arn:aws:codeconnections:eu-central-1:000000000000:connection/7c9f0d0b"}
### List connections
You can list connections using the [`ListConnections`](https://docs.aws.amazon.com/codeconnections/latest/APIReference/API_ListConnections.html) API.
```bashawslocal codeconnections list-connections
{ "Connections": [ { "ConnectionName": "my-connection", "ConnectionArn": "arn:aws:codeconnections:us-east-1:000000000000:connection/023ff7e3", "ProviderType": "GitHub", "OwnerAccountId": "000000000000", "ConnectionStatus": "AVAILABLE" } ]}
Get a connection
Section titled “Get a connection”You can get a connection using the GetConnection
API.
awslocal codeconnections get-connection --connection-arn arn:aws:codeconnections:us-east-1:000000000000:connection/023ff7e3
Replace the connection-arn
with the ARN of the connection you want to get.
{ "Connection": { "ConnectionName": "my-connection", "ConnectionArn": "arn:aws:codeconnections:us-east-1:000000000000:connection/023ff7e3", "ProviderType": "GitHub", "OwnerAccountId": "000000000000", "ConnectionStatus": "AVAILABLE" }}
Delete a connection
Section titled “Delete a connection”You can delete a connection using the DeleteConnection
API.
awslocal codeconnections delete-connection --connection-arn arn:aws:codeconnections:us-east-1:000000000000:connection/023ff7e3
Replace the connection-arn
with the ARN of the connection you want to delete.
API Coverage
Section titled “API Coverage”Operation ▲ | Implemented | Image |
---|