Class Service.Builder

java.lang.Object
software.amazon.awscdk.services.apprunner.alpha.Service.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<Service>
Enclosing class:
Service

@Stability(Experimental) public static final class Service.Builder extends Object implements software.amazon.jsii.Builder<Service>
(experimental) A fluent builder for Service.
  • Method Details

    • create

      @Stability(Experimental) public static Service.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of Service.Builder.
    • source

      @Stability(Experimental) public Service.Builder source(Source source)
      (experimental) The source of the repository for the service.

      Parameters:
      source - The source of the repository for the service. This parameter is required.
      Returns:
      this
    • accessRole

      @Stability(Experimental) public Service.Builder accessRole(IRole accessRole)
      (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.

      Parameters:
      accessRole - The IAM role that grants the App Runner service access to a source repository. This parameter is required.
      Returns:
      this
      See Also:
    • autoDeploymentsEnabled

      @Stability(Experimental) public Service.Builder autoDeploymentsEnabled(Boolean autoDeploymentsEnabled)
      (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.

      Parameters:
      autoDeploymentsEnabled - Specifies whether to enable continuous integration from the source repository. This parameter is required.
      Returns:
      this
    • autoScalingConfiguration

      @Stability(Experimental) public Service.Builder autoScalingConfiguration(IAutoScalingConfiguration autoScalingConfiguration)
      (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.

      Parameters:
      autoScalingConfiguration - Specifies an App Runner Auto Scaling Configuration. This parameter is required.
      Returns:
      this
      See Also:
    • cpu

      @Stability(Experimental) public Service.Builder cpu(Cpu cpu)
      (experimental) The number of CPU units reserved for each instance of your App Runner service.

      Default: Cpu.ONE_VCPU

      Parameters:
      cpu - The number of CPU units reserved for each instance of your App Runner service. This parameter is required.
      Returns:
      this
    • healthCheck

      @Stability(Experimental) public Service.Builder healthCheck(HealthCheck healthCheck)
      (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

      Parameters:
      healthCheck - Settings for the health check that AWS App Runner performs to monitor the health of a service. This parameter is required.
      Returns:
      this
    • instanceRole

      @Stability(Experimental) public Service.Builder instanceRole(IRole instanceRole)
      (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.

      Parameters:
      instanceRole - The IAM role that provides permissions to your App Runner service. This parameter is required.
      Returns:
      this
      See Also:
    • ipAddressType

      @Stability(Experimental) public Service.Builder ipAddressType(IpAddressType ipAddressType)
      (experimental) The IP address type for your incoming public network configuration.

      Default: - IpAddressType.IPV4

      Parameters:
      ipAddressType - The IP address type for your incoming public network configuration. This parameter is required.
      Returns:
      this
    • kmsKey

      @Stability(Experimental) public Service.Builder kmsKey(IKey kmsKey)
      (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

      Parameters:
      kmsKey - The customer managed key that AWS App Runner uses to encrypt copies of the source repository and service logs. This parameter is required.
      Returns:
      this
    • memory

      @Stability(Experimental) public Service.Builder memory(Memory memory)
      (experimental) The amount of memory reserved for each instance of your App Runner service.

      Default: Memory.TWO_GB

      Parameters:
      memory - The amount of memory reserved for each instance of your App Runner service. This parameter is required.
      Returns:
      this
    • observabilityConfiguration

      @Stability(Experimental) public Service.Builder observabilityConfiguration(IObservabilityConfiguration observabilityConfiguration)
      (experimental) Settings for an App Runner observability configuration.

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

      Parameters:
      observabilityConfiguration - Settings for an App Runner observability configuration. This parameter is required.
      Returns:
      this
    • serviceName

      @Stability(Experimental) public Service.Builder serviceName(String serviceName)
      (experimental) Name of the service.

      Default: - auto-generated if undefined.

      Parameters:
      serviceName - Name of the service. This parameter is required.
      Returns:
      this
    • vpcConnector

      @Stability(Experimental) public Service.Builder vpcConnector(IVpcConnector vpcConnector)
      (experimental) Settings for an App Runner VPC connector to associate with the service.

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

      Parameters:
      vpcConnector - Settings for an App Runner VPC connector to associate with the service. This parameter is required.
      Returns:
      this
    • build

      @Stability(Experimental) public Service build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Service>
      Returns:
      a newly built instance of Service.