UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,132 lines 155 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h; Object.defineProperty(exports, "__esModule", { value: true }); exports.SyntheticsCanary = exports.SyntheticsCanaryVpcConfigOutputReference = exports.syntheticsCanaryVpcConfigToHclTerraform = exports.syntheticsCanaryVpcConfigToTerraform = exports.SyntheticsCanaryScheduleOutputReference = exports.syntheticsCanaryScheduleToHclTerraform = exports.syntheticsCanaryScheduleToTerraform = exports.SyntheticsCanaryRunConfigOutputReference = exports.syntheticsCanaryRunConfigToHclTerraform = exports.syntheticsCanaryRunConfigToTerraform = exports.SyntheticsCanaryArtifactConfigOutputReference = exports.syntheticsCanaryArtifactConfigToHclTerraform = exports.syntheticsCanaryArtifactConfigToTerraform = exports.SyntheticsCanaryArtifactConfigS3EncryptionOutputReference = exports.syntheticsCanaryArtifactConfigS3EncryptionToHclTerraform = exports.syntheticsCanaryArtifactConfigS3EncryptionToTerraform = exports.SyntheticsCanaryTimelineList = exports.SyntheticsCanaryTimelineOutputReference = exports.syntheticsCanaryTimelineToHclTerraform = exports.syntheticsCanaryTimelineToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function syntheticsCanaryTimelineToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return {}; } exports.syntheticsCanaryTimelineToTerraform = syntheticsCanaryTimelineToTerraform; function syntheticsCanaryTimelineToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = {}; return attrs; } exports.syntheticsCanaryTimelineToHclTerraform = syntheticsCanaryTimelineToHclTerraform; class SyntheticsCanaryTimelineOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; } else { this.isEmptyObject = Object.keys(value).length === 0; } } // created - computed: true, optional: false, required: false get created() { return this.getStringAttribute('created'); } // last_modified - computed: true, optional: false, required: false get lastModified() { return this.getStringAttribute('last_modified'); } // last_started - computed: true, optional: false, required: false get lastStarted() { return this.getStringAttribute('last_started'); } // last_stopped - computed: true, optional: false, required: false get lastStopped() { return this.getStringAttribute('last_stopped'); } } exports.SyntheticsCanaryTimelineOutputReference = SyntheticsCanaryTimelineOutputReference; _a = JSII_RTTI_SYMBOL_1; SyntheticsCanaryTimelineOutputReference[_a] = { fqn: "@cdktf/provider-aws.syntheticsCanary.SyntheticsCanaryTimelineOutputReference", version: "19.50.0" }; class SyntheticsCanaryTimelineList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new SyntheticsCanaryTimelineOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.SyntheticsCanaryTimelineList = SyntheticsCanaryTimelineList; _b = JSII_RTTI_SYMBOL_1; SyntheticsCanaryTimelineList[_b] = { fqn: "@cdktf/provider-aws.syntheticsCanary.SyntheticsCanaryTimelineList", version: "19.50.0" }; function syntheticsCanaryArtifactConfigS3EncryptionToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { encryption_mode: cdktf.stringToTerraform(struct.encryptionMode), kms_key_arn: cdktf.stringToTerraform(struct.kmsKeyArn), }; } exports.syntheticsCanaryArtifactConfigS3EncryptionToTerraform = syntheticsCanaryArtifactConfigS3EncryptionToTerraform; function syntheticsCanaryArtifactConfigS3EncryptionToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { encryption_mode: { value: cdktf.stringToHclTerraform(struct.encryptionMode), isBlock: false, type: "simple", storageClassType: "string", }, kms_key_arn: { value: cdktf.stringToHclTerraform(struct.kmsKeyArn), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.syntheticsCanaryArtifactConfigS3EncryptionToHclTerraform = syntheticsCanaryArtifactConfigS3EncryptionToHclTerraform; class SyntheticsCanaryArtifactConfigS3EncryptionOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._encryptionMode !== undefined) { hasAnyValues = true; internalValueResult.encryptionMode = this._encryptionMode; } if (this._kmsKeyArn !== undefined) { hasAnyValues = true; internalValueResult.kmsKeyArn = this._kmsKeyArn; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._encryptionMode = undefined; this._kmsKeyArn = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._encryptionMode = value.encryptionMode; this._kmsKeyArn = value.kmsKeyArn; } } get encryptionMode() { return this.getStringAttribute('encryption_mode'); } set encryptionMode(value) { this._encryptionMode = value; } resetEncryptionMode() { this._encryptionMode = undefined; } // Temporarily expose input value. Use with caution. get encryptionModeInput() { return this._encryptionMode; } get kmsKeyArn() { return this.getStringAttribute('kms_key_arn'); } set kmsKeyArn(value) { this._kmsKeyArn = value; } resetKmsKeyArn() { this._kmsKeyArn = undefined; } // Temporarily expose input value. Use with caution. get kmsKeyArnInput() { return this._kmsKeyArn; } } exports.SyntheticsCanaryArtifactConfigS3EncryptionOutputReference = SyntheticsCanaryArtifactConfigS3EncryptionOutputReference; _c = JSII_RTTI_SYMBOL_1; SyntheticsCanaryArtifactConfigS3EncryptionOutputReference[_c] = { fqn: "@cdktf/provider-aws.syntheticsCanary.SyntheticsCanaryArtifactConfigS3EncryptionOutputReference", version: "19.50.0" }; function syntheticsCanaryArtifactConfigToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { s3_encryption: syntheticsCanaryArtifactConfigS3EncryptionToTerraform(struct.s3Encryption), }; } exports.syntheticsCanaryArtifactConfigToTerraform = syntheticsCanaryArtifactConfigToTerraform; function syntheticsCanaryArtifactConfigToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { s3_encryption: { value: syntheticsCanaryArtifactConfigS3EncryptionToHclTerraform(struct.s3Encryption), isBlock: true, type: "list", storageClassType: "SyntheticsCanaryArtifactConfigS3EncryptionList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.syntheticsCanaryArtifactConfigToHclTerraform = syntheticsCanaryArtifactConfigToHclTerraform; class SyntheticsCanaryArtifactConfigOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; // s3_encryption - computed: false, optional: true, required: false this._s3Encryption = new SyntheticsCanaryArtifactConfigS3EncryptionOutputReference(this, "s3_encryption"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._s3Encryption?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.s3Encryption = this._s3Encryption?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._s3Encryption.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._s3Encryption.internalValue = value.s3Encryption; } } get s3Encryption() { return this._s3Encryption; } putS3Encryption(value) { this._s3Encryption.internalValue = value; } resetS3Encryption() { this._s3Encryption.internalValue = undefined; } // Temporarily expose input value. Use with caution. get s3EncryptionInput() { return this._s3Encryption.internalValue; } } exports.SyntheticsCanaryArtifactConfigOutputReference = SyntheticsCanaryArtifactConfigOutputReference; _d = JSII_RTTI_SYMBOL_1; SyntheticsCanaryArtifactConfigOutputReference[_d] = { fqn: "@cdktf/provider-aws.syntheticsCanary.SyntheticsCanaryArtifactConfigOutputReference", version: "19.50.0" }; function syntheticsCanaryRunConfigToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { active_tracing: cdktf.booleanToTerraform(struct.activeTracing), environment_variables: cdktf.hashMapper(cdktf.stringToTerraform)(struct.environmentVariables), memory_in_mb: cdktf.numberToTerraform(struct.memoryInMb), timeout_in_seconds: cdktf.numberToTerraform(struct.timeoutInSeconds), }; } exports.syntheticsCanaryRunConfigToTerraform = syntheticsCanaryRunConfigToTerraform; function syntheticsCanaryRunConfigToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { active_tracing: { value: cdktf.booleanToHclTerraform(struct.activeTracing), isBlock: false, type: "simple", storageClassType: "boolean", }, environment_variables: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.environmentVariables), isBlock: false, type: "map", storageClassType: "stringMap", }, memory_in_mb: { value: cdktf.numberToHclTerraform(struct.memoryInMb), isBlock: false, type: "simple", storageClassType: "number", }, timeout_in_seconds: { value: cdktf.numberToHclTerraform(struct.timeoutInSeconds), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.syntheticsCanaryRunConfigToHclTerraform = syntheticsCanaryRunConfigToHclTerraform; class SyntheticsCanaryRunConfigOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._activeTracing !== undefined) { hasAnyValues = true; internalValueResult.activeTracing = this._activeTracing; } if (this._environmentVariables !== undefined) { hasAnyValues = true; internalValueResult.environmentVariables = this._environmentVariables; } if (this._memoryInMb !== undefined) { hasAnyValues = true; internalValueResult.memoryInMb = this._memoryInMb; } if (this._timeoutInSeconds !== undefined) { hasAnyValues = true; internalValueResult.timeoutInSeconds = this._timeoutInSeconds; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._activeTracing = undefined; this._environmentVariables = undefined; this._memoryInMb = undefined; this._timeoutInSeconds = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._activeTracing = value.activeTracing; this._environmentVariables = value.environmentVariables; this._memoryInMb = value.memoryInMb; this._timeoutInSeconds = value.timeoutInSeconds; } } get activeTracing() { return this.getBooleanAttribute('active_tracing'); } set activeTracing(value) { this._activeTracing = value; } resetActiveTracing() { this._activeTracing = undefined; } // Temporarily expose input value. Use with caution. get activeTracingInput() { return this._activeTracing; } get environmentVariables() { return this.getStringMapAttribute('environment_variables'); } set environmentVariables(value) { this._environmentVariables = value; } resetEnvironmentVariables() { this._environmentVariables = undefined; } // Temporarily expose input value. Use with caution. get environmentVariablesInput() { return this._environmentVariables; } get memoryInMb() { return this.getNumberAttribute('memory_in_mb'); } set memoryInMb(value) { this._memoryInMb = value; } resetMemoryInMb() { this._memoryInMb = undefined; } // Temporarily expose input value. Use with caution. get memoryInMbInput() { return this._memoryInMb; } get timeoutInSeconds() { return this.getNumberAttribute('timeout_in_seconds'); } set timeoutInSeconds(value) { this._timeoutInSeconds = value; } resetTimeoutInSeconds() { this._timeoutInSeconds = undefined; } // Temporarily expose input value. Use with caution. get timeoutInSecondsInput() { return this._timeoutInSeconds; } } exports.SyntheticsCanaryRunConfigOutputReference = SyntheticsCanaryRunConfigOutputReference; _e = JSII_RTTI_SYMBOL_1; SyntheticsCanaryRunConfigOutputReference[_e] = { fqn: "@cdktf/provider-aws.syntheticsCanary.SyntheticsCanaryRunConfigOutputReference", version: "19.50.0" }; function syntheticsCanaryScheduleToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { duration_in_seconds: cdktf.numberToTerraform(struct.durationInSeconds), expression: cdktf.stringToTerraform(struct.expression), }; } exports.syntheticsCanaryScheduleToTerraform = syntheticsCanaryScheduleToTerraform; function syntheticsCanaryScheduleToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { duration_in_seconds: { value: cdktf.numberToHclTerraform(struct.durationInSeconds), isBlock: false, type: "simple", storageClassType: "number", }, expression: { value: cdktf.stringToHclTerraform(struct.expression), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.syntheticsCanaryScheduleToHclTerraform = syntheticsCanaryScheduleToHclTerraform; class SyntheticsCanaryScheduleOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._durationInSeconds !== undefined) { hasAnyValues = true; internalValueResult.durationInSeconds = this._durationInSeconds; } if (this._expression !== undefined) { hasAnyValues = true; internalValueResult.expression = this._expression; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._durationInSeconds = undefined; this._expression = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._durationInSeconds = value.durationInSeconds; this._expression = value.expression; } } get durationInSeconds() { return this.getNumberAttribute('duration_in_seconds'); } set durationInSeconds(value) { this._durationInSeconds = value; } resetDurationInSeconds() { this._durationInSeconds = undefined; } // Temporarily expose input value. Use with caution. get durationInSecondsInput() { return this._durationInSeconds; } get expression() { return this.getStringAttribute('expression'); } set expression(value) { this._expression = value; } // Temporarily expose input value. Use with caution. get expressionInput() { return this._expression; } } exports.SyntheticsCanaryScheduleOutputReference = SyntheticsCanaryScheduleOutputReference; _f = JSII_RTTI_SYMBOL_1; SyntheticsCanaryScheduleOutputReference[_f] = { fqn: "@cdktf/provider-aws.syntheticsCanary.SyntheticsCanaryScheduleOutputReference", version: "19.50.0" }; function syntheticsCanaryVpcConfigToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { security_group_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.securityGroupIds), subnet_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.subnetIds), }; } exports.syntheticsCanaryVpcConfigToTerraform = syntheticsCanaryVpcConfigToTerraform; function syntheticsCanaryVpcConfigToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { security_group_ids: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.securityGroupIds), isBlock: false, type: "set", storageClassType: "stringList", }, subnet_ids: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.subnetIds), isBlock: false, type: "set", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.syntheticsCanaryVpcConfigToHclTerraform = syntheticsCanaryVpcConfigToHclTerraform; class SyntheticsCanaryVpcConfigOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._securityGroupIds !== undefined) { hasAnyValues = true; internalValueResult.securityGroupIds = this._securityGroupIds; } if (this._subnetIds !== undefined) { hasAnyValues = true; internalValueResult.subnetIds = this._subnetIds; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._securityGroupIds = undefined; this._subnetIds = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._securityGroupIds = value.securityGroupIds; this._subnetIds = value.subnetIds; } } get securityGroupIds() { return cdktf.Fn.tolist(this.getListAttribute('security_group_ids')); } set securityGroupIds(value) { this._securityGroupIds = value; } resetSecurityGroupIds() { this._securityGroupIds = undefined; } // Temporarily expose input value. Use with caution. get securityGroupIdsInput() { return this._securityGroupIds; } get subnetIds() { return cdktf.Fn.tolist(this.getListAttribute('subnet_ids')); } set subnetIds(value) { this._subnetIds = value; } resetSubnetIds() { this._subnetIds = undefined; } // Temporarily expose input value. Use with caution. get subnetIdsInput() { return this._subnetIds; } // vpc_id - computed: true, optional: false, required: false get vpcId() { return this.getStringAttribute('vpc_id'); } } exports.SyntheticsCanaryVpcConfigOutputReference = SyntheticsCanaryVpcConfigOutputReference; _g = JSII_RTTI_SYMBOL_1; SyntheticsCanaryVpcConfigOutputReference[_g] = { fqn: "@cdktf/provider-aws.syntheticsCanary.SyntheticsCanaryVpcConfigOutputReference", version: "19.50.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/synthetics_canary aws_synthetics_canary} */ class SyntheticsCanary extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a SyntheticsCanary resource upon running "cdktf plan <stack-name>" * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the SyntheticsCanary to import * @param importFromId The id of the existing SyntheticsCanary that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/synthetics_canary#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the SyntheticsCanary to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_synthetics_canary", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/synthetics_canary aws_synthetics_canary} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options SyntheticsCanaryConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'aws_synthetics_canary', terraformGeneratorMetadata: { providerName: 'aws', providerVersion: '5.84.0', providerVersionConstraint: '~> 5.0' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // timeline - computed: true, optional: false, required: false this._timeline = new SyntheticsCanaryTimelineList(this, "timeline", false); // artifact_config - computed: false, optional: true, required: false this._artifactConfig = new SyntheticsCanaryArtifactConfigOutputReference(this, "artifact_config"); // run_config - computed: false, optional: true, required: false this._runConfig = new SyntheticsCanaryRunConfigOutputReference(this, "run_config"); // schedule - computed: false, optional: false, required: true this._schedule = new SyntheticsCanaryScheduleOutputReference(this, "schedule"); // vpc_config - computed: false, optional: true, required: false this._vpcConfig = new SyntheticsCanaryVpcConfigOutputReference(this, "vpc_config"); this._artifactS3Location = config.artifactS3Location; this._deleteLambda = config.deleteLambda; this._executionRoleArn = config.executionRoleArn; this._failureRetentionPeriod = config.failureRetentionPeriod; this._handler = config.handler; this._id = config.id; this._name = config.name; this._runtimeVersion = config.runtimeVersion; this._s3Bucket = config.s3Bucket; this._s3Key = config.s3Key; this._s3Version = config.s3Version; this._startCanary = config.startCanary; this._successRetentionPeriod = config.successRetentionPeriod; this._tags = config.tags; this._tagsAll = config.tagsAll; this._zipFile = config.zipFile; this._artifactConfig.internalValue = config.artifactConfig; this._runConfig.internalValue = config.runConfig; this._schedule.internalValue = config.schedule; this._vpcConfig.internalValue = config.vpcConfig; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false get arn() { return this.getStringAttribute('arn'); } get artifactS3Location() { return this.getStringAttribute('artifact_s3_location'); } set artifactS3Location(value) { this._artifactS3Location = value; } // Temporarily expose input value. Use with caution. get artifactS3LocationInput() { return this._artifactS3Location; } get deleteLambda() { return this.getBooleanAttribute('delete_lambda'); } set deleteLambda(value) { this._deleteLambda = value; } resetDeleteLambda() { this._deleteLambda = undefined; } // Temporarily expose input value. Use with caution. get deleteLambdaInput() { return this._deleteLambda; } // engine_arn - computed: true, optional: false, required: false get engineArn() { return this.getStringAttribute('engine_arn'); } get executionRoleArn() { return this.getStringAttribute('execution_role_arn'); } set executionRoleArn(value) { this._executionRoleArn = value; } // Temporarily expose input value. Use with caution. get executionRoleArnInput() { return this._executionRoleArn; } get failureRetentionPeriod() { return this.getNumberAttribute('failure_retention_period'); } set failureRetentionPeriod(value) { this._failureRetentionPeriod = value; } resetFailureRetentionPeriod() { this._failureRetentionPeriod = undefined; } // Temporarily expose input value. Use with caution. get failureRetentionPeriodInput() { return this._failureRetentionPeriod; } get handler() { return this.getStringAttribute('handler'); } set handler(value) { this._handler = value; } // Temporarily expose input value. Use with caution. get handlerInput() { return this._handler; } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } resetId() { this._id = undefined; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get runtimeVersion() { return this.getStringAttribute('runtime_version'); } set runtimeVersion(value) { this._runtimeVersion = value; } // Temporarily expose input value. Use with caution. get runtimeVersionInput() { return this._runtimeVersion; } get s3Bucket() { return this.getStringAttribute('s3_bucket'); } set s3Bucket(value) { this._s3Bucket = value; } resetS3Bucket() { this._s3Bucket = undefined; } // Temporarily expose input value. Use with caution. get s3BucketInput() { return this._s3Bucket; } get s3Key() { return this.getStringAttribute('s3_key'); } set s3Key(value) { this._s3Key = value; } resetS3Key() { this._s3Key = undefined; } // Temporarily expose input value. Use with caution. get s3KeyInput() { return this._s3Key; } get s3Version() { return this.getStringAttribute('s3_version'); } set s3Version(value) { this._s3Version = value; } resetS3Version() { this._s3Version = undefined; } // Temporarily expose input value. Use with caution. get s3VersionInput() { return this._s3Version; } // source_location_arn - computed: true, optional: false, required: false get sourceLocationArn() { return this.getStringAttribute('source_location_arn'); } get startCanary() { return this.getBooleanAttribute('start_canary'); } set startCanary(value) { this._startCanary = value; } resetStartCanary() { this._startCanary = undefined; } // Temporarily expose input value. Use with caution. get startCanaryInput() { return this._startCanary; } // status - computed: true, optional: false, required: false get status() { return this.getStringAttribute('status'); } get successRetentionPeriod() { return this.getNumberAttribute('success_retention_period'); } set successRetentionPeriod(value) { this._successRetentionPeriod = value; } resetSuccessRetentionPeriod() { this._successRetentionPeriod = undefined; } // Temporarily expose input value. Use with caution. get successRetentionPeriodInput() { return this._successRetentionPeriod; } get tags() { return this.getStringMapAttribute('tags'); } set tags(value) { this._tags = value; } resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. get tagsInput() { return this._tags; } get tagsAll() { return this.getStringMapAttribute('tags_all'); } set tagsAll(value) { this._tagsAll = value; } resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. get tagsAllInput() { return this._tagsAll; } get timeline() { return this._timeline; } get zipFile() { return this.getStringAttribute('zip_file'); } set zipFile(value) { this._zipFile = value; } resetZipFile() { this._zipFile = undefined; } // Temporarily expose input value. Use with caution. get zipFileInput() { return this._zipFile; } get artifactConfig() { return this._artifactConfig; } putArtifactConfig(value) { this._artifactConfig.internalValue = value; } resetArtifactConfig() { this._artifactConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. get artifactConfigInput() { return this._artifactConfig.internalValue; } get runConfig() { return this._runConfig; } putRunConfig(value) { this._runConfig.internalValue = value; } resetRunConfig() { this._runConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. get runConfigInput() { return this._runConfig.internalValue; } get schedule() { return this._schedule; } putSchedule(value) { this._schedule.internalValue = value; } // Temporarily expose input value. Use with caution. get scheduleInput() { return this._schedule.internalValue; } get vpcConfig() { return this._vpcConfig; } putVpcConfig(value) { this._vpcConfig.internalValue = value; } resetVpcConfig() { this._vpcConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. get vpcConfigInput() { return this._vpcConfig.internalValue; } // ========= // SYNTHESIS // ========= synthesizeAttributes() { return { artifact_s3_location: cdktf.stringToTerraform(this._artifactS3Location), delete_lambda: cdktf.booleanToTerraform(this._deleteLambda), execution_role_arn: cdktf.stringToTerraform(this._executionRoleArn), failure_retention_period: cdktf.numberToTerraform(this._failureRetentionPeriod), handler: cdktf.stringToTerraform(this._handler), id: cdktf.stringToTerraform(this._id), name: cdktf.stringToTerraform(this._name), runtime_version: cdktf.stringToTerraform(this._runtimeVersion), s3_bucket: cdktf.stringToTerraform(this._s3Bucket), s3_key: cdktf.stringToTerraform(this._s3Key), s3_version: cdktf.stringToTerraform(this._s3Version), start_canary: cdktf.booleanToTerraform(this._startCanary), success_retention_period: cdktf.numberToTerraform(this._successRetentionPeriod), tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll), zip_file: cdktf.stringToTerraform(this._zipFile), artifact_config: syntheticsCanaryArtifactConfigToTerraform(this._artifactConfig.internalValue), run_config: syntheticsCanaryRunConfigToTerraform(this._runConfig.internalValue), schedule: syntheticsCanaryScheduleToTerraform(this._schedule.internalValue), vpc_config: syntheticsCanaryVpcConfigToTerraform(this._vpcConfig.internalValue), }; } synthesizeHclAttributes() { const attrs = { artifact_s3_location: { value: cdktf.stringToHclTerraform(this._artifactS3Location), isBlock: false, type: "simple", storageClassType: "string", }, delete_lambda: { value: cdktf.booleanToHclTerraform(this._deleteLambda), isBlock: false, type: "simple", storageClassType: "boolean", }, execution_role_arn: { value: cdktf.stringToHclTerraform(this._executionRoleArn), isBlock: false, type: "simple", storageClassType: "string", }, failure_retention_period: { value: cdktf.numberToHclTerraform(this._failureRetentionPeriod), isBlock: false, type: "simple", storageClassType: "number", }, handler: { value: cdktf.stringToHclTerraform(this._handler), isBlock: false, type: "simple", storageClassType: "string", }, id: { value: cdktf.stringToHclTerraform(this._id), isBlock: false, type: "simple", storageClassType: "string", }, name: { value: cdktf.stringToHclTerraform(this._name), isBlock: false, type: "simple", storageClassType: "string", }, runtime_version: { value: cdktf.stringToHclTerraform(this._runtimeVersion), isBlock: false, type: "simple", storageClassType: "string", }, s3_bucket: { value: cdktf.stringToHclTerraform(this._s3Bucket), isBlock: false, type: "simple", storageClassType: "string", }, s3_key: { value: cdktf.stringToHclTerraform(this._s3Key), isBlock: false, type: "simple", storageClassType: "string", }, s3_version: { value: cdktf.stringToHclTerraform(this._s3Version), isBlock: false, type: "simple", storageClassType: "string", }, start_canary: { value: cdktf.booleanToHclTerraform(this._startCanary), isBlock: false, type: "simple", storageClassType: "boolean", }, success_retention_period: { value: cdktf.numberToHclTerraform(this._successRetentionPeriod), isBlock: false, type: "simple", storageClassType: "number", }, tags: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tags), isBlock: false, type: "map", storageClassType: "stringMap", }, tags_all: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tagsAll), isBlock: false, type: "map", storageClassType: "stringMap", }, zip_file: { value: cdktf.stringToHclTerraform(this._zipFile), isBlock: false, type: "simple", storageClassType: "string", }, artifact_config: { value: syntheticsCanaryArtifactConfigToHclTerraform(this._artifactConfig.internalValue), isBlock: true, type: "list", storageClassType: "SyntheticsCanaryArtifactConfigList", }, run_config: { value: syntheticsCanaryRunConfigToHclTerraform(this._runConfig.internalValue), isBlock: true, type: "list", storageClassType: "SyntheticsCanaryRunConfigList", }, schedule: { value: syntheticsCanaryScheduleToHclTerraform(this._schedule.internalValue), isBlock: true, type: "list", storageClassType: "SyntheticsCanaryScheduleList", }, vpc_config: { value: syntheticsCanaryVpcConfigToHclTerraform(this._vpcConfig.internalValue), isBlock: true, type: "list", storageClassType: "SyntheticsCanaryVpcConfigList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } } exports.SyntheticsCanary = SyntheticsCanary; _h = JSII_RTTI_SYMBOL_1; SyntheticsCanary[_h] = { fqn: "@cdktf/provider-aws.syntheticsCanary.SyntheticsCanary", version: "19.50.0" }; // ================= // STATIC PROPERTIES // ================= SyntheticsCanary.tfResourceType = "aws_synthetics_canary"; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc3ludGhldGljcy1jYW5hcnkvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFTQSwrQkFBK0I7QUFvRy9CLFNBQWdCLG1DQUFtQyxDQUFDLE1BQWlDO0lBQ25GLElBQUksQ0FBQyxLQUFLLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEtBQUssQ0FBQyxZQUFZLENBQUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFBQyxPQUFPLE1BQU0sQ0FBQztJQUFDLENBQUM7SUFDNUYsSUFBSSxLQUFLLENBQUMsZ0JBQWdCLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUNuQyxNQUFNLElBQUksS0FBSyxDQUFDLG9IQUFvSCxDQUFDLENBQUM7SUFDeEksQ0FBQztJQUNELE9BQU8sRUFDTixDQUFBO0FBQ0gsQ0FBQztBQVBELGtGQU9DO0FBR0QsU0FBZ0Isc0NBQXNDLENBQUMsTUFBaUM7SUFDdEYsSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLFlBQVksQ0FBQyxZQUFZLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUFDLE9BQU8sTUFBTSxDQUFDO0lBQUMsQ0FBQztJQUM1RixJQUFJLEtBQUssQ0F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