ServiceProps
- class aws_cdk.aws_apprunner.ServiceProps(*, source, access_role=None, cpu=None, instance_role=None, memory=None, service_name=None, vpc_connector=None)
Bases:
object
(experimental) Properties of the AppRunner Service.
- Parameters
source (
Source
) – (experimental) The source of the repository for the service.access_role (
Optional
[IRole
]) – (experimental) The IAM role that grants the App Runner service access to a source repository. It’s required for ECR image repositories (but not for ECR Public repositories). The role must be assumable by the ‘build.apprunner.amazonaws.com’ service principal. Default: - generate a new access role.cpu (
Optional
[Cpu
]) – (experimental) The number of CPU units reserved for each instance of your App Runner service. Default: Cpu.ONE_VCPUinstance_role (
Optional
[IRole
]) – (experimental) The IAM role that provides permissions to your App Runner service. These are permissions that your code needs when it calls any AWS APIs. The role must be assumable by the ‘tasks.apprunner.amazonaws.com’ service principal. Default: - no instance role attached.memory (
Optional
[Memory
]) – (experimental) The amount of memory reserved for each instance of your App Runner service. Default: Memory.TWO_GBservice_name (
Optional
[str
]) – (experimental) Name of the service. Default: - auto-generated if undefined.vpc_connector (
Optional
[IVpcConnector
]) – (experimental) Settings for an App Runner VPC connector to associate with the service. Default: - no VPC connector, uses the DEFAULT egress type instead
- Stability
experimental
- ExampleMetadata
infused
Example:
import aws_cdk.aws_ecr_assets as assets image_asset = assets.DockerImageAsset(self, "ImageAssets", directory=path.join(__dirname, "./docker.assets") ) apprunner.Service(self, "Service", source=apprunner.Source.from_asset( image_configuration=apprunner.ImageConfiguration(port=8000), asset=image_asset ) )
Attributes
- access_role
(experimental) The IAM role that grants the App Runner service access to a source repository.
It’s required for ECR image repositories (but not for ECR Public repositories).
The role must be assumable by the ‘build.apprunner.amazonaws.com’ service principal.
- Default
generate a new access role.
- See
- Stability
experimental
- cpu
(experimental) The number of CPU units reserved for each instance of your App Runner service.
- Default
Cpu.ONE_VCPU
- Stability
experimental
- instance_role
(experimental) The IAM role that provides permissions to your App Runner service.
These are permissions that your code needs when it calls any AWS APIs.
The role must be assumable by the ‘tasks.apprunner.amazonaws.com’ service principal.
- Default
no instance role attached.
- See
- Stability
experimental
- memory
(experimental) The amount of memory reserved for each instance of your App Runner service.
- Default
Memory.TWO_GB
- Stability
experimental
- service_name
(experimental) Name of the service.
- Default
auto-generated if undefined.
- Stability
experimental
- source
(experimental) The source of the repository for the service.
- Stability
experimental
- vpc_connector
(experimental) Settings for an App Runner VPC connector to associate with the service.
- Default
no VPC connector, uses the DEFAULT egress type instead
- Stability
experimental