Interface ServiceProps

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

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:43:00.005Z") @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());
 
  • 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.

    • getAutoScalingConfiguration

      @Stability(Experimental) @Nullable default IAutoScalingConfiguration getAutoScalingConfiguration()
      (experimental) Specifies an App Runner Auto Scaling Configuration.

      A default configuration is either the AWS recommended configuration, or the configuration you set as the default.

      Default: - the latest revision of a default auto scaling configuration is used.

      See Also:
    • 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:
    • getIpAddressType

      @Stability(Experimental) @Nullable default IpAddressType getIpAddressType()
      (experimental) The IP address type for your incoming public network configuration.

      Default: - IpAddressType.IPV4

    • getKmsKey

      @Stability(Experimental) @Nullable default IKey getKmsKey()
      (experimental) The customer managed key that AWS App Runner uses to encrypt copies of the source repository and service logs.

      Default: - Use an AWS managed key

    • 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

    • getObservabilityConfiguration

      @Stability(Experimental) @Nullable default IObservabilityConfiguration getObservabilityConfiguration()
      (experimental) Settings for an App Runner observability configuration.

      Default: - no observability configuration resource is associated with the service.

    • 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