Class ServiceProps.Builder

java.lang.Object
software.amazon.awscdk.services.apprunner.alpha.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
    • autoDeploymentsEnabled

      @Stability(Experimental) public ServiceProps.Builder autoDeploymentsEnabled(Boolean autoDeploymentsEnabled)
      Parameters:
      autoDeploymentsEnabled - 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).
      Returns:
      this
    • autoScalingConfiguration

      @Stability(Experimental) public ServiceProps.Builder autoScalingConfiguration(IAutoScalingConfiguration autoScalingConfiguration)
      Parameters:
      autoScalingConfiguration - Specifies an App Runner Auto Scaling Configuration. A default configuration is either the AWS recommended configuration, or the configuration you set as the default.
      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
    • healthCheck

      @Stability(Experimental) public ServiceProps.Builder healthCheck(HealthCheck healthCheck)
      Parameters:
      healthCheck - 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.
      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
    • ipAddressType

      @Stability(Experimental) public ServiceProps.Builder ipAddressType(IpAddressType ipAddressType)
      Parameters:
      ipAddressType - The IP address type for your incoming public network configuration.
      Returns:
      this
    • isPubliclyAccessible

      @Stability(Experimental) public ServiceProps.Builder isPubliclyAccessible(Boolean isPubliclyAccessible)
      Parameters:
      isPubliclyAccessible - Specifies whether your App Runner service is publicly accessible. If you use VpcIngressConnection, you must set this property to false.
      Returns:
      this
    • kmsKey

      @Stability(Experimental) public ServiceProps.Builder kmsKey(IKey kmsKey)
      Sets the value of ServiceProps.getKmsKey()
      Parameters:
      kmsKey - The customer managed key that AWS App Runner uses to encrypt copies of the source repository and service logs.
      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
    • observabilityConfiguration

      @Stability(Experimental) public ServiceProps.Builder observabilityConfiguration(IObservabilityConfiguration observabilityConfiguration)
      Parameters:
      observabilityConfiguration - Settings for an App Runner observability configuration.
      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