Class AlternateTargetConfig.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.AlternateTargetConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AlternateTargetConfig>
- Enclosing interface:
AlternateTargetConfig
@Stability(Stable)
public static final class AlternateTargetConfig.Builder
extends Object
implements software.amazon.jsii.Builder<AlternateTargetConfig>
A builder for
AlternateTargetConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalternateTargetGroupArn
(String alternateTargetGroupArn) Sets the value ofAlternateTargetConfig.getAlternateTargetGroupArn()
build()
Builds the configured instance.productionListenerRule
(String productionListenerRule) Sets the value ofAlternateTargetConfig.getProductionListenerRule()
Sets the value ofAlternateTargetConfig.getRoleArn()
testListenerRule
(String testListenerRule) Sets the value ofAlternateTargetConfig.getTestListenerRule()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
alternateTargetGroupArn
@Stability(Stable) public AlternateTargetConfig.Builder alternateTargetGroupArn(String alternateTargetGroupArn) Sets the value ofAlternateTargetConfig.getAlternateTargetGroupArn()
- Parameters:
alternateTargetGroupArn
- The ARN of the alternate target group. This parameter is required.- Returns:
this
-
roleArn
Sets the value ofAlternateTargetConfig.getRoleArn()
- Parameters:
roleArn
- The IAM role ARN for the configuration. This parameter is required.- Returns:
this
-
productionListenerRule
@Stability(Stable) public AlternateTargetConfig.Builder productionListenerRule(String productionListenerRule) Sets the value ofAlternateTargetConfig.getProductionListenerRule()
- Parameters:
productionListenerRule
- The production listener rule ARN (ALB) or listener ARN (NLB).- Returns:
this
-
testListenerRule
Sets the value ofAlternateTargetConfig.getTestListenerRule()
- Parameters:
testListenerRule
- The test listener rule ARN (ALB) or listener ARN (NLB).- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AlternateTargetConfig>
- Returns:
- a new instance of
AlternateTargetConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-