create_service
async
¶
create_service(
service_name: ServiceName,
source_configuration: SourceConfiguration,
*,
config_overrides: Optional[AsyncAppRunnerClientConfig] = None,
instance_configuration: Optional[InstanceConfiguration] = None,
tags: Optional[TagList] = None,
encryption_configuration: Optional[EncryptionConfiguration] = None,
health_check_configuration: Optional[HealthCheckConfiguration] = None,
auto_scaling_configuration_arn: Optional[AppRunnerResourceArn] = None,
network_configuration: Optional[NetworkConfiguration] = None,
observability_configuration: Optional[ServiceObservabilityConfiguration] = None,
) -> CreateServiceResponse
Create an App Runner service. After the service is created, the action also automatically starts a deployment.
This is an asynchronous operation. On a successful call, you can use the returned OperationId and the ListOperations call to track the operation's progress.
Parameters:
-
service_name(ServiceName) –A name for the App Runner service. It must be unique across all the running App Runner services in your Amazon Web Services account in the Amazon Web Services Region.
-
source_configuration(SourceConfiguration) –The source to deploy to the App Runner service. It can be a code or an image repository.
-
instance_configuration(Optional[InstanceConfiguration], default:None) –The runtime configuration of instances (scaling units) of your service.
-
tags(Optional[TagList], default:None) –An optional list of metadata items that you can associate with the App Runner service resource. A tag is a key-value pair.
-
encryption_configuration(Optional[EncryptionConfiguration], default:None) –An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs. By default, App Runner uses an Amazon Web Services managed key.
-
health_check_configuration(Optional[HealthCheckConfiguration], default:None) –The settings for the health check that App Runner performs to monitor the health of the App Runner service.
-
auto_scaling_configuration_arn(Optional[AppRunnerResourceArn], default:None) –The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with your service. If not provided, App Runner associates the latest revision of a default auto scaling configuration.
Specify an ARN with a name and a revision number to associate that revision. For example:
arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/3Specify just the name to associate the latest revision. For example:
arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability -
network_configuration(Optional[NetworkConfiguration], default:None) –Configuration settings related to network traffic of the web application that the App Runner service runs.
-
observability_configuration(Optional[ServiceObservabilityConfiguration], default:None) –The observability configuration of your service.
Raises:
-
InternalServiceErrorException–An unexpected service exception occurred.
-
InvalidRequestException–One or more input parameters aren't valid. Refer to the API action's document page, correct the input parameters, and try the action again.
-
ServiceQuotaExceededException–App Runner can't create this resource. You've reached your account quota for this resource type.
For App Runner per-resource quotas, see App Runner endpoints and quotas in the Amazon Web Services General Reference.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_apprunner/_services/async_app_runner.py
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 | |