Class ServiceProps.Builder

java.lang.Object
software.amazon.awscdk.services.apprunner.ServiceProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<ServiceProps>
Enclosing interface:
ServiceProps

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

    • Builder

      public Builder()
  • Method Details

    • source

      @Stability(Experimental) public ServiceProps.Builder source(Source source)
      Sets the value of ServiceProps.getSource()
      Parameters:
      source - The source of the repository for the service. This parameter is required.
      Returns:
      this
    • accessRole

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

      Returns:
      this
    • cpu

      @Stability(Experimental) public ServiceProps.Builder cpu(Cpu cpu)
      Sets the value of ServiceProps.getCpu()
      Parameters:
      cpu - The number of CPU units reserved for each instance of your App Runner service.
      Returns:
      this
    • instanceRole

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

      Returns:
      this
    • memory

      @Stability(Experimental) public ServiceProps.Builder memory(Memory memory)
      Sets the value of ServiceProps.getMemory()
      Parameters:
      memory - The amount of memory reserved for each instance of your App Runner service.
      Returns:
      this
    • serviceName

      @Stability(Experimental) public ServiceProps.Builder serviceName(String serviceName)
      Parameters:
      serviceName - Name of the service.
      Returns:
      this
    • vpcConnector

      @Stability(Experimental) public ServiceProps.Builder vpcConnector(IVpcConnector vpcConnector)
      Parameters:
      vpcConnector - Settings for an App Runner VPC connector to associate with the service.
      Returns:
      this
    • build

      @Stability(Experimental) public ServiceProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<ServiceProps>
      Returns:
      a new instance of ServiceProps
      Throws:
      NullPointerException - if any required attribute was not provided