create_connection
async
¶
create_connection(
connection_name: ConnectionName,
*,
config_overrides: Optional[AsyncCodeConnectionsClientConfig] = None,
provider_type: Optional[ProviderType] = None,
tags: Optional[TagList] = None,
host_arn: Optional[HostArn] = None,
provider_endpoint: Optional[Url] = None,
) -> CreateConnectionOutput
Creates a connection that can then be given to other Amazon Web Services services like CodePipeline so that it can access third-party code repositories. The connection is in pending status until the third-party connection handshake is completed from the console.
Parameters:
-
provider_type(Optional[ProviderType], default:None) –The name of the external provider where your third-party code repository is configured.
-
connection_name(ConnectionName) –The name of the connection to be created.
-
tags(Optional[TagList], default:None) –The key-value pair to use when tagging the resource.
-
host_arn(Optional[HostArn], default:None) –The Amazon Resource Name (ARN) of the host associated with the connection to be created.
-
provider_endpoint(Optional[Url], default:None) –The endpoint of the ghe.com tenant where your organization resides. Provide this parameter only when
ProviderTypeisGitHubEnterpriseCloudDataResidency. Leave this parameter empty for all other provider types.
Raises:
-
InvalidInputException–The input is not valid. Verify that the action is typed correctly.
-
LimitExceededException–Exceeded the maximum limit for connections.
-
ResourceNotFoundException–Resource not found. Verify the connection resource ARN and try again.
-
ResourceUnavailableException–Resource not found. Verify the ARN for the host resource and try again.
-
UnsupportedProviderTypeException–The specified provider type is not supported for connections.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codeconnections/_services/async_code_connections.py
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | |