Class Service.Builder

java.lang.Object
software.amazon.awscdk.services.apprunner.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:
    • 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
    • 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: - no instance role attached.

      Parameters:
      instanceRole - The IAM role that provides permissions to your App Runner service. This parameter is required.
      Returns:
      this
      See Also:
    • 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
    • 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.