CreateHost
Creates a resource that represents the infrastructure where a third-party provider is installed. The host is used when you create connections to an installed third-party provider type, such as GitHub Enterprise Server. You create one host for all connections to that provider.
Note
A host created through the CLI or the SDK is in `PENDING` status by default. You can make its status `AVAILABLE` by setting up the host in the console.
Request Syntax
{
"Name": "string
",
"ProviderEndpoint": "string
",
"ProviderType": "string
",
"Tags": [
{
"Key": "string
",
"Value": "string
"
}
],
"VpcConfiguration": {
"SecurityGroupIds": [ "string
" ],
"SubnetIds": [ "string
" ],
"TlsCertificate": "string
",
"VpcId": "string
"
}
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- Name
-
The name of the host to be created.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
.*
Required: Yes
- ProviderEndpoint
-
The endpoint of the infrastructure to be represented by the host after it is created.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 512.
Pattern:
.*
Required: Yes
- ProviderType
-
The name of the installed provider to be associated with your connection. The host resource represents the infrastructure where your provider type is installed. The valid provider type is GitHub Enterprise Server.
Type: String
Valid Values:
Bitbucket | GitHub | GitHubEnterpriseServer | GitLab | GitLabSelfManaged
Required: Yes
- Tags
-
Tags for the host to be created.
Type: Array of Tag objects
Array Members: Minimum number of 0 items. Maximum number of 200 items.
Required: No
- VpcConfiguration
-
The VPC configuration to be provisioned for the host. A VPC must be configured and the infrastructure to be represented by the host must already be connected to the VPC.
Type: VpcConfiguration object
Required: No
Response Syntax
{
"HostArn": "string",
"Tags": [
{
"Key": "string",
"Value": "string"
}
]
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- HostArn
-
The Amazon Resource Name (ARN) of the host to be created.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 256.
Pattern:
arn:aws(-[\w]+)*:(codestar-connections|codeconnections):.+:[0-9]{12}:host\/.+
- Tags
-
Tags for the created host.
Type: Array of Tag objects
Array Members: Minimum number of 0 items. Maximum number of 200 items.
Errors
For information about the errors that are common to all actions, see Common Errors.
- LimitExceededException
-
Exceeded the maximum limit for connections.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: