create_service
¶
create_service(
name: ResourceName,
template_name: ResourceName,
template_major_version: TemplateVersionPart,
spec: SpecContents,
*,
config_overrides: Optional[ProtonClientConfig] = None,
description: Optional[Description] = None,
template_minor_version: Optional[TemplateVersionPart] = None,
repository_connection_arn: Optional[Arn] = None,
repository_id: Optional[RepositoryId] = None,
branch_name: Optional[GitBranchName] = None,
tags: Optional[TagList] = None,
) -> CreateServiceOutput
Create an Proton service. An Proton service is an instantiation of a service template and often includes several service instances and pipeline. For more information, see Services in the Proton User Guide.
Parameters:
-
name(ResourceName) –The service name.
-
description(Optional[Description], default:None) –A description of the Proton service.
-
template_name(ResourceName) –The name of the service template that's used to create the service.
-
template_major_version(TemplateVersionPart) –The major version of the service template that was used to create the service.
-
template_minor_version(Optional[TemplateVersionPart], default:None) –The minor version of the service template that was used to create the service.
-
spec(SpecContents) –A link to a spec file that provides inputs as defined in the service template bundle schema file. The spec file is in YAML format. Don’t include pipeline inputs in the spec if your service template doesn’t include a service pipeline. For more information, see Create a service in the Proton User Guide.
-
repository_connection_arn(Optional[Arn], default:None) –The Amazon Resource Name (ARN) of the repository connection. For more information, see Setting up an AWS CodeStar connection in the Proton User Guide. Don't include this parameter if your service template doesn't include a service pipeline.
-
repository_id(Optional[RepositoryId], default:None) –The ID of the code repository. Don't include this parameter if your service template doesn't include a service pipeline.
-
branch_name(Optional[GitBranchName], default:None) –The name of the code repository branch that holds the code that's deployed in Proton. Don't include this parameter if your service template doesn't include a service pipeline.
-
tags(Optional[TagList], default:None) –An optional list of metadata items that you can associate with the Proton service. A tag is a key-value pair.
For more information, see Proton resources and tagging in the Proton User Guide.
Raises:
-
AccessDeniedException–There isn't sufficient access for performing this action.
-
ConflictException–The request couldn't be made due to a conflicting operation or resource.
-
InternalServerException–The request failed to register with the service.
-
ResourceNotFoundException–The requested resource wasn't found.
-
ServiceQuotaExceededException–A quota was exceeded. For more information, see Proton Quotas in the Proton User Guide.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input is invalid or an out-of-range value was supplied for the input parameter.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_proton/_services/proton.py
5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 | |