@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,264 lines (1,263 loc) • 199 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Route53Record = exports.Route53RecordWeightedRoutingPolicyOutputReference = exports.Route53RecordTimeoutsOutputReference = exports.Route53RecordLatencyRoutingPolicyOutputReference = exports.Route53RecordGeoproximityRoutingPolicyOutputReference = exports.Route53RecordGeoproximityRoutingPolicyCoordinatesList = exports.Route53RecordGeoproximityRoutingPolicyCoordinatesOutputReference = exports.Route53RecordGeolocationRoutingPolicyOutputReference = exports.Route53RecordFailoverRoutingPolicyOutputReference = exports.Route53RecordCidrRoutingPolicyOutputReference = exports.Route53RecordAliasOutputReference = void 0;
exports.route53RecordAliasToTerraform = route53RecordAliasToTerraform;
exports.route53RecordAliasToHclTerraform = route53RecordAliasToHclTerraform;
exports.route53RecordCidrRoutingPolicyToTerraform = route53RecordCidrRoutingPolicyToTerraform;
exports.route53RecordCidrRoutingPolicyToHclTerraform = route53RecordCidrRoutingPolicyToHclTerraform;
exports.route53RecordFailoverRoutingPolicyToTerraform = route53RecordFailoverRoutingPolicyToTerraform;
exports.route53RecordFailoverRoutingPolicyToHclTerraform = route53RecordFailoverRoutingPolicyToHclTerraform;
exports.route53RecordGeolocationRoutingPolicyToTerraform = route53RecordGeolocationRoutingPolicyToTerraform;
exports.route53RecordGeolocationRoutingPolicyToHclTerraform = route53RecordGeolocationRoutingPolicyToHclTerraform;
exports.route53RecordGeoproximityRoutingPolicyCoordinatesToTerraform = route53RecordGeoproximityRoutingPolicyCoordinatesToTerraform;
exports.route53RecordGeoproximityRoutingPolicyCoordinatesToHclTerraform = route53RecordGeoproximityRoutingPolicyCoordinatesToHclTerraform;
exports.route53RecordGeoproximityRoutingPolicyToTerraform = route53RecordGeoproximityRoutingPolicyToTerraform;
exports.route53RecordGeoproximityRoutingPolicyToHclTerraform = route53RecordGeoproximityRoutingPolicyToHclTerraform;
exports.route53RecordLatencyRoutingPolicyToTerraform = route53RecordLatencyRoutingPolicyToTerraform;
exports.route53RecordLatencyRoutingPolicyToHclTerraform = route53RecordLatencyRoutingPolicyToHclTerraform;
exports.route53RecordTimeoutsToTerraform = route53RecordTimeoutsToTerraform;
exports.route53RecordTimeoutsToHclTerraform = route53RecordTimeoutsToHclTerraform;
exports.route53RecordWeightedRoutingPolicyToTerraform = route53RecordWeightedRoutingPolicyToTerraform;
exports.route53RecordWeightedRoutingPolicyToHclTerraform = route53RecordWeightedRoutingPolicyToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function route53RecordAliasToTerraform(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 {
evaluate_target_health: cdktf.booleanToTerraform(struct.evaluateTargetHealth),
name: cdktf.stringToTerraform(struct.name),
zone_id: cdktf.stringToTerraform(struct.zoneId),
};
}
function route53RecordAliasToHclTerraform(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 = {
evaluate_target_health: {
value: cdktf.booleanToHclTerraform(struct.evaluateTargetHealth),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
zone_id: {
value: cdktf.stringToHclTerraform(struct.zoneId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class Route53RecordAliasOutputReference 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._evaluateTargetHealth !== undefined) {
hasAnyValues = true;
internalValueResult.evaluateTargetHealth = this._evaluateTargetHealth;
}
if (this._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._zoneId !== undefined) {
hasAnyValues = true;
internalValueResult.zoneId = this._zoneId;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._evaluateTargetHealth = undefined;
this._name = undefined;
this._zoneId = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._evaluateTargetHealth = value.evaluateTargetHealth;
this._name = value.name;
this._zoneId = value.zoneId;
}
}
get evaluateTargetHealth() {
return this.getBooleanAttribute('evaluate_target_health');
}
set evaluateTargetHealth(value) {
this._evaluateTargetHealth = value;
}
// Temporarily expose input value. Use with caution.
get evaluateTargetHealthInput() {
return this._evaluateTargetHealth;
}
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 zoneId() {
return this.getStringAttribute('zone_id');
}
set zoneId(value) {
this._zoneId = value;
}
// Temporarily expose input value. Use with caution.
get zoneIdInput() {
return this._zoneId;
}
}
exports.Route53RecordAliasOutputReference = Route53RecordAliasOutputReference;
_a = JSII_RTTI_SYMBOL_1;
Route53RecordAliasOutputReference[_a] = { fqn: "@cdktf/provider-aws.route53Record.Route53RecordAliasOutputReference", version: "21.22.1" };
function route53RecordCidrRoutingPolicyToTerraform(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 {
collection_id: cdktf.stringToTerraform(struct.collectionId),
location_name: cdktf.stringToTerraform(struct.locationName),
};
}
function route53RecordCidrRoutingPolicyToHclTerraform(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 = {
collection_id: {
value: cdktf.stringToHclTerraform(struct.collectionId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
location_name: {
value: cdktf.stringToHclTerraform(struct.locationName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class Route53RecordCidrRoutingPolicyOutputReference 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._collectionId !== undefined) {
hasAnyValues = true;
internalValueResult.collectionId = this._collectionId;
}
if (this._locationName !== undefined) {
hasAnyValues = true;
internalValueResult.locationName = this._locationName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._collectionId = undefined;
this._locationName = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._collectionId = value.collectionId;
this._locationName = value.locationName;
}
}
get collectionId() {
return this.getStringAttribute('collection_id');
}
set collectionId(value) {
this._collectionId = value;
}
// Temporarily expose input value. Use with caution.
get collectionIdInput() {
return this._collectionId;
}
get locationName() {
return this.getStringAttribute('location_name');
}
set locationName(value) {
this._locationName = value;
}
// Temporarily expose input value. Use with caution.
get locationNameInput() {
return this._locationName;
}
}
exports.Route53RecordCidrRoutingPolicyOutputReference = Route53RecordCidrRoutingPolicyOutputReference;
_b = JSII_RTTI_SYMBOL_1;
Route53RecordCidrRoutingPolicyOutputReference[_b] = { fqn: "@cdktf/provider-aws.route53Record.Route53RecordCidrRoutingPolicyOutputReference", version: "21.22.1" };
function route53RecordFailoverRoutingPolicyToTerraform(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 {
type: cdktf.stringToTerraform(struct.type),
};
}
function route53RecordFailoverRoutingPolicyToHclTerraform(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 = {
type: {
value: cdktf.stringToHclTerraform(struct.type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class Route53RecordFailoverRoutingPolicyOutputReference 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._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._type = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._type = value.type;
}
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
}
exports.Route53RecordFailoverRoutingPolicyOutputReference = Route53RecordFailoverRoutingPolicyOutputReference;
_c = JSII_RTTI_SYMBOL_1;
Route53RecordFailoverRoutingPolicyOutputReference[_c] = { fqn: "@cdktf/provider-aws.route53Record.Route53RecordFailoverRoutingPolicyOutputReference", version: "21.22.1" };
function route53RecordGeolocationRoutingPolicyToTerraform(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 {
continent: cdktf.stringToTerraform(struct.continent),
country: cdktf.stringToTerraform(struct.country),
subdivision: cdktf.stringToTerraform(struct.subdivision),
};
}
function route53RecordGeolocationRoutingPolicyToHclTerraform(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 = {
continent: {
value: cdktf.stringToHclTerraform(struct.continent),
isBlock: false,
type: "simple",
storageClassType: "string",
},
country: {
value: cdktf.stringToHclTerraform(struct.country),
isBlock: false,
type: "simple",
storageClassType: "string",
},
subdivision: {
value: cdktf.stringToHclTerraform(struct.subdivision),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class Route53RecordGeolocationRoutingPolicyOutputReference 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._continent !== undefined) {
hasAnyValues = true;
internalValueResult.continent = this._continent;
}
if (this._country !== undefined) {
hasAnyValues = true;
internalValueResult.country = this._country;
}
if (this._subdivision !== undefined) {
hasAnyValues = true;
internalValueResult.subdivision = this._subdivision;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._continent = undefined;
this._country = undefined;
this._subdivision = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._continent = value.continent;
this._country = value.country;
this._subdivision = value.subdivision;
}
}
get continent() {
return this.getStringAttribute('continent');
}
set continent(value) {
this._continent = value;
}
resetContinent() {
this._continent = undefined;
}
// Temporarily expose input value. Use with caution.
get continentInput() {
return this._continent;
}
get country() {
return this.getStringAttribute('country');
}
set country(value) {
this._country = value;
}
resetCountry() {
this._country = undefined;
}
// Temporarily expose input value. Use with caution.
get countryInput() {
return this._country;
}
get subdivision() {
return this.getStringAttribute('subdivision');
}
set subdivision(value) {
this._subdivision = value;
}
resetSubdivision() {
this._subdivision = undefined;
}
// Temporarily expose input value. Use with caution.
get subdivisionInput() {
return this._subdivision;
}
}
exports.Route53RecordGeolocationRoutingPolicyOutputReference = Route53RecordGeolocationRoutingPolicyOutputReference;
_d = JSII_RTTI_SYMBOL_1;
Route53RecordGeolocationRoutingPolicyOutputReference[_d] = { fqn: "@cdktf/provider-aws.route53Record.Route53RecordGeolocationRoutingPolicyOutputReference", version: "21.22.1" };
function route53RecordGeoproximityRoutingPolicyCoordinatesToTerraform(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 {
latitude: cdktf.stringToTerraform(struct.latitude),
longitude: cdktf.stringToTerraform(struct.longitude),
};
}
function route53RecordGeoproximityRoutingPolicyCoordinatesToHclTerraform(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 = {
latitude: {
value: cdktf.stringToHclTerraform(struct.latitude),
isBlock: false,
type: "simple",
storageClassType: "string",
},
longitude: {
value: cdktf.stringToHclTerraform(struct.longitude),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class Route53RecordGeoproximityRoutingPolicyCoordinatesOutputReference 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() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._latitude !== undefined) {
hasAnyValues = true;
internalValueResult.latitude = this._latitude;
}
if (this._longitude !== undefined) {
hasAnyValues = true;
internalValueResult.longitude = this._longitude;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._latitude = undefined;
this._longitude = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._latitude = value.latitude;
this._longitude = value.longitude;
}
}
get latitude() {
return this.getStringAttribute('latitude');
}
set latitude(value) {
this._latitude = value;
}
// Temporarily expose input value. Use with caution.
get latitudeInput() {
return this._latitude;
}
get longitude() {
return this.getStringAttribute('longitude');
}
set longitude(value) {
this._longitude = value;
}
// Temporarily expose input value. Use with caution.
get longitudeInput() {
return this._longitude;
}
}
exports.Route53RecordGeoproximityRoutingPolicyCoordinatesOutputReference = Route53RecordGeoproximityRoutingPolicyCoordinatesOutputReference;
_e = JSII_RTTI_SYMBOL_1;
Route53RecordGeoproximityRoutingPolicyCoordinatesOutputReference[_e] = { fqn: "@cdktf/provider-aws.route53Record.Route53RecordGeoproximityRoutingPolicyCoordinatesOutputReference", version: "21.22.1" };
class Route53RecordGeoproximityRoutingPolicyCoordinatesList 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 Route53RecordGeoproximityRoutingPolicyCoordinatesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.Route53RecordGeoproximityRoutingPolicyCoordinatesList = Route53RecordGeoproximityRoutingPolicyCoordinatesList;
_f = JSII_RTTI_SYMBOL_1;
Route53RecordGeoproximityRoutingPolicyCoordinatesList[_f] = { fqn: "@cdktf/provider-aws.route53Record.Route53RecordGeoproximityRoutingPolicyCoordinatesList", version: "21.22.1" };
function route53RecordGeoproximityRoutingPolicyToTerraform(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 {
aws_region: cdktf.stringToTerraform(struct.awsRegion),
bias: cdktf.numberToTerraform(struct.bias),
local_zone_group: cdktf.stringToTerraform(struct.localZoneGroup),
coordinates: cdktf.listMapper(route53RecordGeoproximityRoutingPolicyCoordinatesToTerraform, true)(struct.coordinates),
};
}
function route53RecordGeoproximityRoutingPolicyToHclTerraform(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 = {
aws_region: {
value: cdktf.stringToHclTerraform(struct.awsRegion),
isBlock: false,
type: "simple",
storageClassType: "string",
},
bias: {
value: cdktf.numberToHclTerraform(struct.bias),
isBlock: false,
type: "simple",
storageClassType: "number",
},
local_zone_group: {
value: cdktf.stringToHclTerraform(struct.localZoneGroup),
isBlock: false,
type: "simple",
storageClassType: "string",
},
coordinates: {
value: cdktf.listMapperHcl(route53RecordGeoproximityRoutingPolicyCoordinatesToHclTerraform, true)(struct.coordinates),
isBlock: true,
type: "set",
storageClassType: "Route53RecordGeoproximityRoutingPolicyCoordinatesList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class Route53RecordGeoproximityRoutingPolicyOutputReference 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;
// coordinates - computed: false, optional: true, required: false
this._coordinates = new Route53RecordGeoproximityRoutingPolicyCoordinatesList(this, "coordinates", true);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._awsRegion !== undefined) {
hasAnyValues = true;
internalValueResult.awsRegion = this._awsRegion;
}
if (this._bias !== undefined) {
hasAnyValues = true;
internalValueResult.bias = this._bias;
}
if (this._localZoneGroup !== undefined) {
hasAnyValues = true;
internalValueResult.localZoneGroup = this._localZoneGroup;
}
if (this._coordinates?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.coordinates = this._coordinates?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._awsRegion = undefined;
this._bias = undefined;
this._localZoneGroup = undefined;
this._coordinates.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._awsRegion = value.awsRegion;
this._bias = value.bias;
this._localZoneGroup = value.localZoneGroup;
this._coordinates.internalValue = value.coordinates;
}
}
get awsRegion() {
return this.getStringAttribute('aws_region');
}
set awsRegion(value) {
this._awsRegion = value;
}
resetAwsRegion() {
this._awsRegion = undefined;
}
// Temporarily expose input value. Use with caution.
get awsRegionInput() {
return this._awsRegion;
}
get bias() {
return this.getNumberAttribute('bias');
}
set bias(value) {
this._bias = value;
}
resetBias() {
this._bias = undefined;
}
// Temporarily expose input value. Use with caution.
get biasInput() {
return this._bias;
}
get localZoneGroup() {
return this.getStringAttribute('local_zone_group');
}
set localZoneGroup(value) {
this._localZoneGroup = value;
}
resetLocalZoneGroup() {
this._localZoneGroup = undefined;
}
// Temporarily expose input value. Use with caution.
get localZoneGroupInput() {
return this._localZoneGroup;
}
get coordinates() {
return this._coordinates;
}
putCoordinates(value) {
this._coordinates.internalValue = value;
}
resetCoordinates() {
this._coordinates.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get coordinatesInput() {
return this._coordinates.internalValue;
}
}
exports.Route53RecordGeoproximityRoutingPolicyOutputReference = Route53RecordGeoproximityRoutingPolicyOutputReference;
_g = JSII_RTTI_SYMBOL_1;
Route53RecordGeoproximityRoutingPolicyOutputReference[_g] = { fqn: "@cdktf/provider-aws.route53Record.Route53RecordGeoproximityRoutingPolicyOutputReference", version: "21.22.1" };
function route53RecordLatencyRoutingPolicyToTerraform(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 {
region: cdktf.stringToTerraform(struct.region),
};
}
function route53RecordLatencyRoutingPolicyToHclTerraform(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 = {
region: {
value: cdktf.stringToHclTerraform(struct.region),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class Route53RecordLatencyRoutingPolicyOutputReference 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._region !== undefined) {
hasAnyValues = true;
internalValueResult.region = this._region;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._region = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._region = value.region;
}
}
get region() {
return this.getStringAttribute('region');
}
set region(value) {
this._region = value;
}
// Temporarily expose input value. Use with caution.
get regionInput() {
return this._region;
}
}
exports.Route53RecordLatencyRoutingPolicyOutputReference = Route53RecordLatencyRoutingPolicyOutputReference;
_h = JSII_RTTI_SYMBOL_1;
Route53RecordLatencyRoutingPolicyOutputReference[_h] = { fqn: "@cdktf/provider-aws.route53Record.Route53RecordLatencyRoutingPolicyOutputReference", version: "21.22.1" };
function route53RecordTimeoutsToTerraform(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 {
create: cdktf.stringToTerraform(struct.create),
delete: cdktf.stringToTerraform(struct.delete),
update: cdktf.stringToTerraform(struct.update),
};
}
function route53RecordTimeoutsToHclTerraform(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 = {
create: {
value: cdktf.stringToHclTerraform(struct.create),
isBlock: false,
type: "simple",
storageClassType: "string",
},
delete: {
value: cdktf.stringToHclTerraform(struct.delete),
isBlock: false,
type: "simple",
storageClassType: "string",
},
update: {
value: cdktf.stringToHclTerraform(struct.update),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class Route53RecordTimeoutsOutputReference 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);
this.isEmptyObject = false;
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._create !== undefined) {
hasAnyValues = true;
internalValueResult.create = this._create;
}
if (this._delete !== undefined) {
hasAnyValues = true;
internalValueResult.delete = this._delete;
}
if (this._update !== undefined) {
hasAnyValues = true;
internalValueResult.update = this._update;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._create = undefined;
this._delete = undefined;
this._update = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._create = value.create;
this._delete = value.delete;
this._update = value.update;
}
}
get create() {
return this.getStringAttribute('create');
}
set create(value) {
this._create = value;
}
resetCreate() {
this._create = undefined;
}
// Temporarily expose input value. Use with caution.
get createInput() {
return this._create;
}
get delete() {
return this.getStringAttribute('delete');
}
set delete(value) {
this._delete = value;
}
resetDelete() {
this._delete = undefined;
}
// Temporarily expose input value. Use with caution.
get deleteInput() {
return this._delete;
}
get update() {
return this.getStringAttribute('update');
}
set update(value) {
this._update = value;
}
resetUpdate() {
this._update = undefined;
}
// Temporarily expose input value. Use with caution.
get updateInput() {
return this._update;
}
}
exports.Route53RecordTimeoutsOutputReference = Route53RecordTimeoutsOutputReference;
_j = JSII_RTTI_SYMBOL_1;
Route53RecordTimeoutsOutputReference[_j] = { fqn: "@cdktf/provider-aws.route53Record.Route53RecordTimeoutsOutputReference", version: "21.22.1" };
function route53RecordWeightedRoutingPolicyToTerraform(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 {
weight: cdktf.numberToTerraform(struct.weight),
};
}
function route53RecordWeightedRoutingPolicyToHclTerraform(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 = {
weight: {
value: cdktf.numberToHclTerraform(struct.weight),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class Route53RecordWeightedRoutingPolicyOutputReference 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._weight !== undefined) {
hasAnyValues = true;
internalValueResult.weight = this._weight;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._weight = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._weight = value.weight;
}
}
get weight() {
return this.getNumberAttribute('weight');
}
set weight(value) {
this._weight = value;
}
// Temporarily expose input value. Use with caution.
get weightInput() {
return this._weight;
}
}
exports.Route53RecordWeightedRoutingPolicyOutputReference = Route53RecordWeightedRoutingPolicyOutputReference;
_k = JSII_RTTI_SYMBOL_1;
Route53RecordWeightedRoutingPolicyOutputReference[_k] = { fqn: "@cdktf/provider-aws.route53Record.Route53RecordWeightedRoutingPolicyOutputReference", version: "21.22.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/route53_record aws_route53_record}
*/
class Route53Record extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a Route53Record 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 Route53Record to import
* @param importFromId The id of the existing Route53Record that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/route53_record#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the Route53Record to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_route53_record", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/route53_record aws_route53_record} 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 Route53RecordConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_route53_record',
terraformGeneratorMetadata: {
providerName: 'aws',
providerVersion: '6.25.0',
providerVersionConstraint: '~> 6.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// alias - computed: false, optional: true, required: false
this._alias = new Route53RecordAliasOutputReference(this, "alias");
// cidr_routing_policy - computed: false, optional: true, required: false
this._cidrRoutingPolicy = new Route53RecordCidrRoutingPolicyOutputReference(this, "cidr_routing_policy");
// failover_routing_policy - computed: false, optional: true, required: false
this._failoverRoutingPolicy = new Route53RecordFailoverRoutingPolicyOutputReference(this, "failover_routing_policy");
// geolocation_routing_policy - computed: false, optional: true, required: false
this._geolocationRoutingPolicy = new Route53RecordGeolocationRoutingPolicyOutputReference(this, "geolocation_routing_policy");
// geoproximity_routing_policy - computed: false, optional: true, required: false
this._geoproximityRoutingPolicy = new Route53RecordGeoproximityRoutingPolicyOutputReference(this, "geoproximity_routing_policy");
// latency_routing_policy - computed: false, optional: true, required: false
this._latencyRoutingPolicy = new Route53RecordLatencyRoutingPolicyOutputReference(this, "latency_routing_policy");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new Route53RecordTimeoutsOutputReference(this, "timeouts");
// weighted_routing_policy - computed: false, optional: true, required: false
this._weightedRoutingPolicy = new Route53RecordWeightedRoutingPolicyOutputReference(this, "weighted_routing_policy");
this._allowOverwrite = config.allowOverwrite;
this._healthCheckId = config.healthCheckId;
this._id = config.id;
this._multivalueAnswerRoutingPolicy = config.multivalueAnswerRoutingPolicy;
this._name = config.name;
this._records = config.records;
this._setIdentifier = config.setIdentifier;
this._ttl = config.ttl;
this._type = config.type;
this._zoneId = config.zoneId;
this._alias.internalValue = config.alias;
this._cidrRoutingPolicy.internalValue = config.cidrRoutingPolicy;
this._failoverRoutingPolicy.internalValue = config.failoverRoutingPolicy;
this._geolocationRoutingPolicy.internalValue = config.geolocationRoutingPolicy;
this._geoproximityRoutingPolicy.internalValue = config.geoproximityRoutingPolicy;
this._latencyRoutingPolicy.internalValue = config.latencyRoutingPolicy;
this._timeouts.internalValue = config.timeouts;
this._weightedRoutingPolicy.internalValue = config.weightedRoutingPolicy;
}
get allowOverwrite() {
return this.getBooleanAttribute('allow_overwrite');
}
set allowOverwrite(value) {
this._allowOverwrite = value;
}
resetAllowOverwrite() {
this._allowOverwrite = undefined;
}
// Temporarily expose input value. Use with caution.
get allowOverwriteInput() {
return this._allowOverwrite;
}
// fqdn - computed: true, optional: false, required: false
get fqdn() {
return this.getStringAttribute('fqdn');
}
get healthCheckId() {
return this.getStringAttribute('health_check_id');
}
set healthCheckId(value) {
this._healthCheckId = value;
}
resetHealthCheckId() {
this._healthCheckId = undefined;
}
// Temporarily expose input value. Use with caution.
get healthCheckIdInput() {
return this._healthCheckId;
}
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 multivalueAnswerRoutingPolicy() {
return this.getBooleanAttribute('multivalue_answer_routing_policy');
}
set multivalueAnswerRoutingPolicy(value) {
this._multivalueAnswerRoutingPolicy = value;
}
resetMultivalueAnswerRoutingPolicy() {
this._multivalueAnswerRoutingPolicy = undefined;
}
// Temporarily expose input value. Use with caution.
get multivalueAnswerRoutingPolicyInput() {
return this._multivalueAnswerRoutingPolicy;
}
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 records() {
return cdktf.Fn.tolist(this.getListAttribute('records'));
}
set records(value) {
this._records = value;
}
resetRecords() {
this._records = undefined;
}
// Temporarily expose input value. Use with caution.
get recordsInput() {
return this._records;
}
get setIdentifier() {
return this.getStringAttribute('set_identifier');
}
set setIdentifier(value) {
this._setIdentifier = value;
}
resetSetIdentifier() {
this._setIdentifier = undefined;
}
// Temporarily expose input value. Use with caution.
get setIdentifierInput() {
return this._setIdentifier;
}
get ttl() {
return this.getNumberAttribute('ttl');
}
set ttl(value) {
this._ttl = value;
}
resetTtl() {
this._ttl = undefined;
}
// Temporarily expose input value. Use with caution.
get ttlInput() {
return this._ttl;
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
get zoneId() {
return this.getStringAttribute('zone_id');
}
set zoneId(value) {
this._zoneId = value;
}
// Temporarily expose input value. Use with caution.
get zoneIdInput() {
return this._zoneId;
}
get alias() {
return this._alias;
}
putAlias(value) {
this._alias.internalValue = value;
}
resetAlias() {
this._alias.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get aliasInput() {
return this._alias.internalValue;
}
get cidrRoutingPolicy() {
return this._cidrRoutingPolicy;
}
putCidrRoutingPolicy(value) {
this._cidrRoutingPolicy.internalValue = value;
}
resetCidrRoutingPolicy() {
this._cidrRoutingPolicy.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get cidrRoutingPolicyInput() {
return this._cidrRoutingPolicy.internalValue;
}
get failoverRoutingPolicy() {
return this._failoverRoutingPolicy;
}
putFailoverRoutingPolicy(value) {
this._failoverRoutingPolicy.internalValue = value;
}
resetFailoverRoutingPolicy() {
this._failoverRoutingPolicy.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get failoverRoutingPolicyInput() {
return this._failoverRoutingPolicy.internalValue;
}
get geolocationRoutingPolicy() {
return this._geolocationRoutingPolicy;
}
putGeolocationRoutingPolicy(value) {
this._geolocationRoutingPolicy.internalValue = value;
}
resetGeolocationRoutingPolicy() {
this._geolocationRoutingPolicy.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get geolocationRoutingPolicyInput() {
return this._geolocationRoutingPolicy.internalValue;
}
get geoproximityRoutingPolicy() {
return this._geoproximityRoutingPolicy;
}
putGeoproximityRoutingPolicy(value) {
this._geoproximityRoutingPolicy.internalValue = value;
}
resetGeoproximityRoutingPolicy() {
this._geoproximityRoutingPolicy.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get geoproximityRoutingPolicyInput() {
return this._geoproximityRoutingPolicy.internalValue;
}
get latencyRoutingPolicy() {
return this._latencyRoutingPolicy;
}
putLatencyRoutingPolicy(value) {
this._latencyRoutingPolicy.internalValue = value;