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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionaccessRole
(IRole accessRole) Sets the value ofServiceProps.getAccessRole()
autoDeploymentsEnabled
(Boolean autoDeploymentsEnabled) Sets the value ofServiceProps.getAutoDeploymentsEnabled()
autoScalingConfiguration
(IAutoScalingConfiguration autoScalingConfiguration) Sets the value ofServiceProps.getAutoScalingConfiguration()
build()
Builds the configured instance.Sets the value ofServiceProps.getCpu()
healthCheck
(HealthCheck healthCheck) Sets the value ofServiceProps.getHealthCheck()
instanceRole
(IRole instanceRole) Sets the value ofServiceProps.getInstanceRole()
ipAddressType
(IpAddressType ipAddressType) Sets the value ofServiceProps.getIpAddressType()
isPubliclyAccessible
(Boolean isPubliclyAccessible) Sets the value ofServiceProps.getIsPubliclyAccessible()
Sets the value ofServiceProps.getKmsKey()
Sets the value ofServiceProps.getMemory()
observabilityConfiguration
(IObservabilityConfiguration observabilityConfiguration) Sets the value ofServiceProps.getObservabilityConfiguration()
serviceName
(String serviceName) Sets the value ofServiceProps.getServiceName()
Sets the value ofServiceProps.getSource()
vpcConnector
(IVpcConnector vpcConnector) Sets the value ofServiceProps.getVpcConnector()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
source
Sets the value ofServiceProps.getSource()
- Parameters:
source
- The source of the repository for the service. This parameter is required.- Returns:
this
-
accessRole
Sets the value ofServiceProps.getAccessRole()
- 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) Sets the value ofServiceProps.getAutoDeploymentsEnabled()
- 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) Sets the value ofServiceProps.getAutoScalingConfiguration()
- 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
Sets the value ofServiceProps.getCpu()
- Parameters:
cpu
- The number of CPU units reserved for each instance of your App Runner service.- Returns:
this
-
healthCheck
Sets the value ofServiceProps.getHealthCheck()
- 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 methodsHealthCheck.http
orHealthCheck.tcp
.- Returns:
this
-
instanceRole
Sets the value ofServiceProps.getInstanceRole()
- 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
Sets the value ofServiceProps.getIpAddressType()
- Parameters:
ipAddressType
- The IP address type for your incoming public network configuration.- Returns:
this
-
isPubliclyAccessible
@Stability(Experimental) public ServiceProps.Builder isPubliclyAccessible(Boolean isPubliclyAccessible) Sets the value ofServiceProps.getIsPubliclyAccessible()
- Parameters:
isPubliclyAccessible
- Specifies whether your App Runner service is publicly accessible. If you useVpcIngressConnection
, you must set this property tofalse
.- Returns:
this
-
kmsKey
Sets the value ofServiceProps.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
Sets the value ofServiceProps.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) Sets the value ofServiceProps.getObservabilityConfiguration()
- Parameters:
observabilityConfiguration
- Settings for an App Runner observability configuration.- Returns:
this
-
serviceName
Sets the value ofServiceProps.getServiceName()
- Parameters:
serviceName
- Name of the service.- Returns:
this
-
vpcConnector
Sets the value ofServiceProps.getVpcConnector()
- Parameters:
vpcConnector
- Settings for an App Runner VPC connector to associate with the service.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ServiceProps>
- Returns:
- a new instance of
ServiceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-