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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionaccessRole
(IRole accessRole) Sets the value ofServiceProps.getAccessRole()
build()
Builds the configured instance.Sets the value ofServiceProps.getCpu()
instanceRole
(IRole instanceRole) Sets the value ofServiceProps.getInstanceRole()
Sets the value ofServiceProps.getMemory()
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
-
cpu
Sets the value ofServiceProps.getCpu()
- Parameters:
cpu
- The number of CPU units reserved for each instance of your App Runner service.- 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
-
memory
Sets the value ofServiceProps.getMemory()
- Parameters:
memory
- The amount of memory reserved for each instance of your App Runner service.- 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
-