/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Synthetics { namespace Model { /** *

Use this structure to input your script code for the canary. This structure * contains the Lambda handler with the location where the canary should start * running the script. If the script is stored in an S3 bucket, the bucket name, * key, and version are also included. If the script was passed into the canary * directly, the script code is contained in the value of Zipfile. *

See Also:

AWS * API Reference

*/ class CanaryCodeInput { public: AWS_SYNTHETICS_API CanaryCodeInput(); AWS_SYNTHETICS_API CanaryCodeInput(Aws::Utils::Json::JsonView jsonValue); AWS_SYNTHETICS_API CanaryCodeInput& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SYNTHETICS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

If your canary script is located in S3, specify the bucket name here. Do not * include s3:// as the start of the bucket name.

*/ inline const Aws::String& GetS3Bucket() const{ return m_s3Bucket; } /** *

If your canary script is located in S3, specify the bucket name here. Do not * include s3:// as the start of the bucket name.

*/ inline bool S3BucketHasBeenSet() const { return m_s3BucketHasBeenSet; } /** *

If your canary script is located in S3, specify the bucket name here. Do not * include s3:// as the start of the bucket name.

*/ inline void SetS3Bucket(const Aws::String& value) { m_s3BucketHasBeenSet = true; m_s3Bucket = value; } /** *

If your canary script is located in S3, specify the bucket name here. Do not * include s3:// as the start of the bucket name.

*/ inline void SetS3Bucket(Aws::String&& value) { m_s3BucketHasBeenSet = true; m_s3Bucket = std::move(value); } /** *

If your canary script is located in S3, specify the bucket name here. Do not * include s3:// as the start of the bucket name.

*/ inline void SetS3Bucket(const char* value) { m_s3BucketHasBeenSet = true; m_s3Bucket.assign(value); } /** *

If your canary script is located in S3, specify the bucket name here. Do not * include s3:// as the start of the bucket name.

*/ inline CanaryCodeInput& WithS3Bucket(const Aws::String& value) { SetS3Bucket(value); return *this;} /** *

If your canary script is located in S3, specify the bucket name here. Do not * include s3:// as the start of the bucket name.

*/ inline CanaryCodeInput& WithS3Bucket(Aws::String&& value) { SetS3Bucket(std::move(value)); return *this;} /** *

If your canary script is located in S3, specify the bucket name here. Do not * include s3:// as the start of the bucket name.

*/ inline CanaryCodeInput& WithS3Bucket(const char* value) { SetS3Bucket(value); return *this;} /** *

The S3 key of your script. For more information, see Working * with Amazon S3 Objects.

*/ inline const Aws::String& GetS3Key() const{ return m_s3Key; } /** *

The S3 key of your script. For more information, see Working * with Amazon S3 Objects.

*/ inline bool S3KeyHasBeenSet() const { return m_s3KeyHasBeenSet; } /** *

The S3 key of your script. For more information, see Working * with Amazon S3 Objects.

*/ inline void SetS3Key(const Aws::String& value) { m_s3KeyHasBeenSet = true; m_s3Key = value; } /** *

The S3 key of your script. For more information, see Working * with Amazon S3 Objects.

*/ inline void SetS3Key(Aws::String&& value) { m_s3KeyHasBeenSet = true; m_s3Key = std::move(value); } /** *

The S3 key of your script. For more information, see Working * with Amazon S3 Objects.

*/ inline void SetS3Key(const char* value) { m_s3KeyHasBeenSet = true; m_s3Key.assign(value); } /** *

The S3 key of your script. For more information, see Working * with Amazon S3 Objects.

*/ inline CanaryCodeInput& WithS3Key(const Aws::String& value) { SetS3Key(value); return *this;} /** *

The S3 key of your script. For more information, see Working * with Amazon S3 Objects.

*/ inline CanaryCodeInput& WithS3Key(Aws::String&& value) { SetS3Key(std::move(value)); return *this;} /** *

The S3 key of your script. For more information, see Working * with Amazon S3 Objects.

*/ inline CanaryCodeInput& WithS3Key(const char* value) { SetS3Key(value); return *this;} /** *

The S3 version ID of your script.

*/ inline const Aws::String& GetS3Version() const{ return m_s3Version; } /** *

The S3 version ID of your script.

*/ inline bool S3VersionHasBeenSet() const { return m_s3VersionHasBeenSet; } /** *

The S3 version ID of your script.

*/ inline void SetS3Version(const Aws::String& value) { m_s3VersionHasBeenSet = true; m_s3Version = value; } /** *

The S3 version ID of your script.

*/ inline void SetS3Version(Aws::String&& value) { m_s3VersionHasBeenSet = true; m_s3Version = std::move(value); } /** *

The S3 version ID of your script.

*/ inline void SetS3Version(const char* value) { m_s3VersionHasBeenSet = true; m_s3Version.assign(value); } /** *

The S3 version ID of your script.

*/ inline CanaryCodeInput& WithS3Version(const Aws::String& value) { SetS3Version(value); return *this;} /** *

The S3 version ID of your script.

*/ inline CanaryCodeInput& WithS3Version(Aws::String&& value) { SetS3Version(std::move(value)); return *this;} /** *

The S3 version ID of your script.

*/ inline CanaryCodeInput& WithS3Version(const char* value) { SetS3Version(value); return *this;} /** *

If you input your canary script directly into the canary instead of referring * to an S3 location, the value of this parameter is the base64-encoded contents of * the .zip file that contains the script. It must be smaller than 225 Kb.

*

For large canary scripts, we recommend that you use an S3 location instead of * inputting it directly with this parameter.

*/ inline const Aws::Utils::ByteBuffer& GetZipFile() const{ return m_zipFile; } /** *

If you input your canary script directly into the canary instead of referring * to an S3 location, the value of this parameter is the base64-encoded contents of * the .zip file that contains the script. It must be smaller than 225 Kb.

*

For large canary scripts, we recommend that you use an S3 location instead of * inputting it directly with this parameter.

*/ inline bool ZipFileHasBeenSet() const { return m_zipFileHasBeenSet; } /** *

If you input your canary script directly into the canary instead of referring * to an S3 location, the value of this parameter is the base64-encoded contents of * the .zip file that contains the script. It must be smaller than 225 Kb.

*

For large canary scripts, we recommend that you use an S3 location instead of * inputting it directly with this parameter.

*/ inline void SetZipFile(const Aws::Utils::ByteBuffer& value) { m_zipFileHasBeenSet = true; m_zipFile = value; } /** *

If you input your canary script directly into the canary instead of referring * to an S3 location, the value of this parameter is the base64-encoded contents of * the .zip file that contains the script. It must be smaller than 225 Kb.

*

For large canary scripts, we recommend that you use an S3 location instead of * inputting it directly with this parameter.

*/ inline void SetZipFile(Aws::Utils::ByteBuffer&& value) { m_zipFileHasBeenSet = true; m_zipFile = std::move(value); } /** *

If you input your canary script directly into the canary instead of referring * to an S3 location, the value of this parameter is the base64-encoded contents of * the .zip file that contains the script. It must be smaller than 225 Kb.

*

For large canary scripts, we recommend that you use an S3 location instead of * inputting it directly with this parameter.

*/ inline CanaryCodeInput& WithZipFile(const Aws::Utils::ByteBuffer& value) { SetZipFile(value); return *this;} /** *

If you input your canary script directly into the canary instead of referring * to an S3 location, the value of this parameter is the base64-encoded contents of * the .zip file that contains the script. It must be smaller than 225 Kb.

*

For large canary scripts, we recommend that you use an S3 location instead of * inputting it directly with this parameter.

*/ inline CanaryCodeInput& WithZipFile(Aws::Utils::ByteBuffer&& value) { SetZipFile(std::move(value)); return *this;} /** *

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 .

*/ inline const Aws::String& GetHandler() const{ return m_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 .

*/ inline bool HandlerHasBeenSet() const { return m_handlerHasBeenSet; } /** *

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 .

*/ inline void SetHandler(const Aws::String& value) { m_handlerHasBeenSet = true; m_handler = value; } /** *

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 .

*/ inline void SetHandler(Aws::String&& value) { m_handlerHasBeenSet = true; m_handler = std::move(value); } /** *

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 .

*/ inline void SetHandler(const char* value) { m_handlerHasBeenSet = true; m_handler.assign(value); } /** *

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 .

*/ inline CanaryCodeInput& WithHandler(const Aws::String& value) { SetHandler(value); return *this;} /** *

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 .

*/ inline CanaryCodeInput& WithHandler(Aws::String&& value) { SetHandler(std::move(value)); return *this;} /** *

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 .

*/ inline CanaryCodeInput& WithHandler(const char* value) { SetHandler(value); return *this;} private: Aws::String m_s3Bucket; bool m_s3BucketHasBeenSet = false; Aws::String m_s3Key; bool m_s3KeyHasBeenSet = false; Aws::String m_s3Version; bool m_s3VersionHasBeenSet = false; Aws::Utils::ByteBuffer m_zipFile; bool m_zipFileHasBeenSet = false; Aws::String m_handler; bool m_handlerHasBeenSet = false; }; } // namespace Model } // namespace Synthetics } // namespace Aws