Class ApiCanaryProps.Builder
- java.lang.Object
-
- io.github.cdklabs.cdk.ecs.codedeploy.ApiCanaryProps.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ApiCanaryProps>
- Enclosing interface:
- ApiCanaryProps
@Stability(Experimental) public static final class ApiCanaryProps.Builder extends Object implements software.amazon.jsii.Builder<ApiCanaryProps>
A builder forApiCanaryProps
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
baseUrl
@Stability(Experimental) public ApiCanaryProps.Builder baseUrl(String baseUrl)
Sets the value ofApiCanaryProps.getBaseUrl()- Parameters:
baseUrl- The base URL to use for tests. This parameter is required.- Returns:
this
-
artifactsBucketLocation
@Stability(Experimental) public ApiCanaryProps.Builder artifactsBucketLocation(software.amazon.awscdk.services.synthetics.ArtifactsBucketLocation artifactsBucketLocation)
Sets the value ofApiCanaryProps.getArtifactsBucketLocation()- Parameters:
artifactsBucketLocation- The s3 location that stores the data of the canary runs.- Returns:
this
-
canaryName
@Stability(Experimental) public ApiCanaryProps.Builder canaryName(String canaryName)
Sets the value ofApiCanaryProps.getCanaryName()- Parameters:
canaryName- The name of the canary. Be sure to give it a descriptive name that distinguishes it from other canaries in your account.Do not include secrets or proprietary information in your canary name. The canary name makes up part of the canary ARN, which is included in outbound calls over the internet.
- Returns:
this
-
durationAlarmThreshold
@Stability(Experimental) public ApiCanaryProps.Builder durationAlarmThreshold(software.amazon.awscdk.Duration durationAlarmThreshold)
Sets the value ofApiCanaryProps.getDurationAlarmThreshold()- Parameters:
durationAlarmThreshold- The threshold for triggering an alarm on the test duration.- Returns:
this
-
failureRetentionPeriod
@Stability(Experimental) public ApiCanaryProps.Builder failureRetentionPeriod(software.amazon.awscdk.Duration failureRetentionPeriod)
Sets the value ofApiCanaryProps.getFailureRetentionPeriod()- Parameters:
failureRetentionPeriod- How many days should failed runs be retained.- Returns:
this
-
role
@Stability(Experimental) public ApiCanaryProps.Builder role(software.amazon.awscdk.services.iam.IRole role)
Sets the value ofApiCanaryProps.getRole()- Parameters:
role- Canary execution role. This is the role that will be assumed by the canary upon execution. It controls the permissions that the canary will have. The role must be assumable by the AWS Lambda service principal.If not supplied, a role will be created with all the required permissions. If you provide a Role, you must add the required permissions.
- Returns:
this
-
schedule
@Stability(Experimental) public ApiCanaryProps.Builder schedule(software.amazon.awscdk.services.synthetics.Schedule schedule)
Sets the value ofApiCanaryProps.getSchedule()- Parameters:
schedule- Specify the schedule for how often the canary runs. For example, if you setscheduletorate(10 minutes), then the canary will run every 10 minutes. You can set the schedule withSchedule.rate(Duration)(recommended) or you can specify an expression usingSchedule.expression().- Returns:
this
-
securityGroups
@Stability(Experimental) public ApiCanaryProps.Builder securityGroups(List<? extends software.amazon.awscdk.services.ec2.ISecurityGroup> securityGroups)
Sets the value ofApiCanaryProps.getSecurityGroups()- Parameters:
securityGroups- The list of security groups to associate with the canary's network interfaces. You must providevpcwhen using this prop.- Returns:
this
-
startAfterCreation
@Stability(Experimental) public ApiCanaryProps.Builder startAfterCreation(Boolean startAfterCreation)
Sets the value ofApiCanaryProps.getStartAfterCreation()- Parameters:
startAfterCreation- Whether or not the canary should start after creation.- Returns:
this
-
steps
@Stability(Experimental) public ApiCanaryProps.Builder steps(List<? extends ApiTestStep> steps)
Sets the value ofApiCanaryProps.getSteps()- Parameters:
steps- The steps to perform in the synthetic test.- Returns:
this
-
successRetentionPeriod
@Stability(Experimental) public ApiCanaryProps.Builder successRetentionPeriod(software.amazon.awscdk.Duration successRetentionPeriod)
Sets the value ofApiCanaryProps.getSuccessRetentionPeriod()- Parameters:
successRetentionPeriod- How many days should successful runs be retained.- Returns:
this
-
threadCount
@Stability(Experimental) public ApiCanaryProps.Builder threadCount(Number threadCount)
Sets the value ofApiCanaryProps.getThreadCount()- Parameters:
threadCount- The number of threads to run concurrently for the synthetic test.- Returns:
this
-
timeToLive
@Stability(Experimental) public ApiCanaryProps.Builder timeToLive(software.amazon.awscdk.Duration timeToLive)
Sets the value ofApiCanaryProps.getTimeToLive()- Parameters:
timeToLive- How long the canary will be in a 'RUNNING' state. For example, if you settimeToLiveto be 1 hour andscheduleto berate(10 minutes), your canary will run at 10 minute intervals for an hour, for a total of 6 times.- Returns:
this
-
vpc
@Stability(Experimental) public ApiCanaryProps.Builder vpc(software.amazon.awscdk.services.ec2.IVpc vpc)
Sets the value ofApiCanaryProps.getVpc()- Parameters:
vpc- The VPC where this canary is run. Specify this if the canary needs to access resources in a VPC.- Returns:
this
-
vpcSubnets
@Stability(Experimental) public ApiCanaryProps.Builder vpcSubnets(software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets)
Sets the value ofApiCanaryProps.getVpcSubnets()- Parameters:
vpcSubnets- Where to place the network interfaces within the VPC. You must providevpcwhen using this prop.- Returns:
this
-
build
@Stability(Experimental) public ApiCanaryProps build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ApiCanaryProps>- Returns:
- a new instance of
ApiCanaryProps - Throws:
NullPointerException- if any required attribute was not provided
-
-