@Stability(value=Experimental) public static final class CanaryProps.Builder extends Object implements software.amazon.jsii.Builder<CanaryProps>
CanaryProps| Constructor and Description |
|---|
Builder() |
@Stability(value=Experimental) public CanaryProps.Builder runtime(Runtime runtime)
CanaryProps.getRuntime()runtime - Specify the runtime version to use for the canary. This parameter is required.this@Stability(value=Experimental) public CanaryProps.Builder test(Test test)
CanaryProps.getTest()test - The type of test that you want your canary to run. This parameter is required.
Use Test.custom() to specify the test to run.this@Stability(value=Experimental) public CanaryProps.Builder artifactsBucketLocation(ArtifactsBucketLocation artifactsBucketLocation)
CanaryProps.getArtifactsBucketLocation()artifactsBucketLocation - The s3 location that stores the data of the canary runs.this@Stability(value=Experimental) public CanaryProps.Builder canaryName(String canaryName)
CanaryProps.getCanaryName()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.
this@Stability(value=Experimental) public CanaryProps.Builder environmentVariables(Map<String,String> environmentVariables)
CanaryProps.getEnvironmentVariables()environmentVariables - Key-value pairs that the Synthetics caches and makes available for your canary scripts.
Use environment variables
to apply configuration changes, such as test and production environment configurations, without changing your
Canary script source code.this@Stability(value=Experimental) public CanaryProps.Builder failureRetentionPeriod(Duration failureRetentionPeriod)
CanaryProps.getFailureRetentionPeriod()failureRetentionPeriod - How many days should failed runs be retained.this@Stability(value=Experimental) public CanaryProps.Builder role(IRole role)
CanaryProps.getRole()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.
this@Stability(value=Experimental) public CanaryProps.Builder schedule(Schedule schedule)
CanaryProps.getSchedule()schedule - Specify the schedule for how often the canary runs.
For example, if you set schedule to rate(10 minutes), then the canary will run every 10 minutes.
You can set the schedule with Schedule.rate(Duration) (recommended) or you can specify an expression using Schedule.expression().this@Stability(value=Experimental) public CanaryProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups)
CanaryProps.getSecurityGroups()securityGroups - The list of security groups to associate with the canary's network interfaces.
You must provide vpc when using this prop.this@Stability(value=Experimental) public CanaryProps.Builder startAfterCreation(Boolean startAfterCreation)
CanaryProps.getStartAfterCreation()startAfterCreation - Whether or not the canary should start after creation.this@Stability(value=Experimental) public CanaryProps.Builder successRetentionPeriod(Duration successRetentionPeriod)
CanaryProps.getSuccessRetentionPeriod()successRetentionPeriod - How many days should successful runs be retained.this@Stability(value=Experimental) public CanaryProps.Builder timeToLive(Duration timeToLive)
CanaryProps.getTimeToLive()timeToLive - How long the canary will be in a 'RUNNING' state.
For example, if you set timeToLive to be 1 hour and schedule to be rate(10 minutes),
your canary will run at 10 minute intervals for an hour, for a total of 6 times.this@Stability(value=Experimental) public CanaryProps.Builder vpc(IVpc vpc)
CanaryProps.getVpc()vpc - The VPC where this canary is run.
Specify this if the canary needs to access resources in a VPC.this@Stability(value=Experimental) public CanaryProps.Builder vpcSubnets(SubnetSelection vpcSubnets)
CanaryProps.getVpcSubnets()vpcSubnets - Where to place the network interfaces within the VPC.
You must provide vpc when using this prop.this@Stability(value=Experimental) public CanaryProps build()
build in interface software.amazon.jsii.Builder<CanaryProps>CanaryPropsNullPointerException - if any required attribute was not providedCopyright © 2022. All rights reserved.