All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.synthetics.kotlin.outputs.CanaryCode.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.synthetics.kotlin.outputs

import kotlin.String
import kotlin.Suppress

/**
 *
 * @property handler The entry point to use for the source code when running the canary. For canaries that use the `syn-python-selenium-1.0` runtime or a `syn-nodejs.puppeteer` runtime earlier than `syn-nodejs.puppeteer-3.4` , the handler must be specified as `*fileName* .handler` . For `syn-python-selenium-1.1` , `syn-nodejs.puppeteer-3.4` , and later runtimes, the handler can be specified as `*fileName* . *functionName*` , or you can specify a folder where canary scripts reside as `*folder* / *fileName* . *functionName*` .
 * @property s3Bucket If your canary script is located in S3, specify the bucket name here. The bucket must already exist.
 * @property s3Key The S3 key of your script. For more information, see [Working with Amazon S3 Objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingObjects.html) .
 * @property s3ObjectVersion The S3 version ID of your script.
 * @property script If you input your canary script directly into the canary instead of referring to an S3 location, the value of this parameter is the script in plain text. It can be up to 5 MB.
 * @property sourceLocationArn The ARN of the Lambda layer where Synthetics stores the canary script code.
 */
public data class CanaryCode(
    public val handler: String,
    public val s3Bucket: String? = null,
    public val s3Key: String? = null,
    public val s3ObjectVersion: String? = null,
    public val script: String? = null,
    public val sourceLocationArn: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.synthetics.outputs.CanaryCode): CanaryCode =
            CanaryCode(
                handler = javaType.handler(),
                s3Bucket = javaType.s3Bucket().map({ args0 -> args0 }).orElse(null),
                s3Key = javaType.s3Key().map({ args0 -> args0 }).orElse(null),
                s3ObjectVersion = javaType.s3ObjectVersion().map({ args0 -> args0 }).orElse(null),
                script = javaType.script().map({ args0 -> args0 }).orElse(null),
                sourceLocationArn = javaType.sourceLocationArn().map({ args0 -> args0 }).orElse(null),
            )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy