Skip to content

Host

Source: src/AWS/CodeConnections/Host.ts

An AWS CodeConnections host — the infrastructure representation of a self-managed source provider (GitHub Enterprise Server or GitLab self-managed). One host serves all connections to that provider.

A host is created in the PENDING state. Completing it requires a one-time setup performed manually in the AWS console — there is no API to finish the setup. Once completed the host becomes AVAILABLE and Connections can reference it via hostArn.

GitHub Enterprise Server Host (created PENDING)

const host = yield* CodeConnections.Host("GHE", {
providerType: "GitHubEnterpriseServer",
providerEndpoint: "https://ghe.example.com",
});
// host.hostStatus === "PENDING"
// Complete the setup in the console before creating connections on it.

Connection on a Host

const connection = yield* CodeConnections.Connection("GHEConn", {
providerType: "GitHubEnterpriseServer",
hostArn: host.hostArn,
});
const host = yield* CodeConnections.Host("PrivateGHE", {
providerType: "GitHubEnterpriseServer",
providerEndpoint: "https://ghe.internal.example.com",
vpcConfiguration: {
vpcId: vpc.vpcId,
subnetIds: [subnetA.subnetId, subnetB.subnetId],
securityGroupIds: [securityGroup.securityGroupId],
},
});