Interface ServiceProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ServiceProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:15.634Z") @Stability(Experimental) public interface ServiceProps extends software.amazon.jsii.JsiiSerializable
(experimental) Properties of the AppRunner Service.

Example:

 import software.amazon.awscdk.services.iam.*;
 Service service = Service.Builder.create(this, "Service")
         .source(Source.fromEcrPublic(EcrPublicProps.builder()
                 .imageConfiguration(ImageConfiguration.builder().port(8000).build())
                 .imageIdentifier("public.ecr.aws/aws-containers/hello-app-runner:latest")
                 .build()))
         .build();
 service.addToRolePolicy(PolicyStatement.Builder.create()
         .effect(Effect.ALLOW)
         .actions(List.of("s3:GetObject"))
         .resources(List.of("*"))
         .build());
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder for ServiceProps
    static final class 
    An implementation for ServiceProps
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default IRole
    (experimental) The IAM role that grants the App Runner service access to a source repository.
    default Boolean
    (experimental) Specifies whether to enable continuous integration from the source repository.
    default Cpu
    (experimental) The number of CPU units reserved for each instance of your App Runner service.
    default HealthCheck
    (experimental) Settings for the health check that AWS App Runner performs to monitor the health of a service.
    default IRole
    (experimental) The IAM role that provides permissions to your App Runner service.
    default Memory
    (experimental) The amount of memory reserved for each instance of your App Runner service.
    default String
    (experimental) Name of the service.
    (experimental) The source of the repository for the service.
    (experimental) Settings for an App Runner VPC connector to associate with the service.

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Method Details

    • getSource

      @Stability(Experimental) @NotNull Source getSource()
      (experimental) The source of the repository for the service.
    • getAccessRole

      @Stability(Experimental) @Nullable default IRole getAccessRole()
      (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 Also:
    • getAutoDeploymentsEnabled

      @Stability(Experimental) @Nullable default Boolean getAutoDeploymentsEnabled()
      (experimental) Specifies whether to enable continuous integration from the source repository.

      If true, continuous integration from the source repository is enabled for the App Runner service. Each repository change (including any source code commit or new image version) starts a deployment. By default, App Runner sets to false for a source image that uses an ECR Public repository or an ECR repository that's in an AWS account other than the one that the service is in. App Runner sets to true in all other cases (which currently include a source code repository or a source image using a same-account ECR repository).

      Default: - no value will be passed.

    • getCpu

      @Stability(Experimental) @Nullable default Cpu getCpu()
      (experimental) The number of CPU units reserved for each instance of your App Runner service.

      Default: Cpu.ONE_VCPU

    • getHealthCheck

      @Stability(Experimental) @Nullable default HealthCheck getHealthCheck()
      (experimental) Settings for the health check that AWS App Runner performs to monitor the health of a service.

      You can specify it by static methods HealthCheck.http or HealthCheck.tcp.

      Default: - no health check configuration

    • getInstanceRole

      @Stability(Experimental) @Nullable default IRole getInstanceRole()
      (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: - generate a new instance role.

      See Also:
    • getMemory

      @Stability(Experimental) @Nullable default Memory getMemory()
      (experimental) The amount of memory reserved for each instance of your App Runner service.

      Default: Memory.TWO_GB

    • getServiceName

      @Stability(Experimental) @Nullable default String getServiceName()
      (experimental) Name of the service.

      Default: - auto-generated if undefined.

    • getVpcConnector

      @Stability(Experimental) @Nullable default IVpcConnector getVpcConnector()
      (experimental) Settings for an App Runner VPC connector to associate with the service.

      Default: - no VPC connector, uses the DEFAULT egress type instead

    • builder

      @Stability(Experimental) static ServiceProps.Builder builder()
      Returns:
      a ServiceProps.Builder of ServiceProps