Class ApiCanaryProps.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • artifactsBucketLocation

        @Stability(Experimental)
        public ApiCanaryProps.Builder artifactsBucketLocation​(software.amazon.awscdk.services.synthetics.ArtifactsBucketLocation artifactsBucketLocation)
        Parameters:
        artifactsBucketLocation - The s3 location that stores the data of the canary runs.
        Returns:
        this
      • canaryName

        @Stability(Experimental)
        public ApiCanaryProps.Builder canaryName​(String canaryName)
        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)
        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)
        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 of ApiCanaryProps.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)
        Parameters:
        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().
        Returns:
        this
      • securityGroups

        @Stability(Experimental)
        public ApiCanaryProps.Builder securityGroups​(List<? extends software.amazon.awscdk.services.ec2.ISecurityGroup> securityGroups)
        Parameters:
        securityGroups - The list of security groups to associate with the canary's network interfaces. You must provide vpc when using this prop.
        Returns:
        this
      • successRetentionPeriod

        @Stability(Experimental)
        public ApiCanaryProps.Builder successRetentionPeriod​(software.amazon.awscdk.Duration successRetentionPeriod)
        Parameters:
        successRetentionPeriod - How many days should successful runs be retained.
        Returns:
        this
      • timeToLive

        @Stability(Experimental)
        public ApiCanaryProps.Builder timeToLive​(software.amazon.awscdk.Duration timeToLive)
        Parameters:
        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.
        Returns:
        this
      • vpc

        @Stability(Experimental)
        public ApiCanaryProps.Builder vpc​(software.amazon.awscdk.services.ec2.IVpc vpc)
        Sets the value of ApiCanaryProps.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)
        Parameters:
        vpcSubnets - Where to place the network interfaces within the VPC. You must provide vpc when using this prop.
        Returns:
        this