@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,201 lines • 166 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AmplifyApp = exports.AmplifyAppCustomRuleList = exports.AmplifyAppCustomRuleOutputReference = exports.amplifyAppCustomRuleToHclTerraform = exports.amplifyAppCustomRuleToTerraform = exports.AmplifyAppCacheConfigOutputReference = exports.amplifyAppCacheConfigToHclTerraform = exports.amplifyAppCacheConfigToTerraform = exports.AmplifyAppAutoBranchCreationConfigOutputReference = exports.amplifyAppAutoBranchCreationConfigToHclTerraform = exports.amplifyAppAutoBranchCreationConfigToTerraform = exports.AmplifyAppProductionBranchList = exports.AmplifyAppProductionBranchOutputReference = exports.amplifyAppProductionBranchToHclTerraform = exports.amplifyAppProductionBranchToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function amplifyAppProductionBranchToTerraform(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.amplifyAppProductionBranchToTerraform = amplifyAppProductionBranchToTerraform;
function amplifyAppProductionBranchToHclTerraform(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.amplifyAppProductionBranchToHclTerraform = amplifyAppProductionBranchToHclTerraform;
class AmplifyAppProductionBranchOutputReference 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;
}
}
// branch_name - computed: true, optional: false, required: false
get branchName() {
return this.getStringAttribute('branch_name');
}
// last_deploy_time - computed: true, optional: false, required: false
get lastDeployTime() {
return this.getStringAttribute('last_deploy_time');
}
// status - computed: true, optional: false, required: false
get status() {
return this.getStringAttribute('status');
}
// thumbnail_url - computed: true, optional: false, required: false
get thumbnailUrl() {
return this.getStringAttribute('thumbnail_url');
}
}
exports.AmplifyAppProductionBranchOutputReference = AmplifyAppProductionBranchOutputReference;
_a = JSII_RTTI_SYMBOL_1;
AmplifyAppProductionBranchOutputReference[_a] = { fqn: "@cdktf/provider-aws.amplifyApp.AmplifyAppProductionBranchOutputReference", version: "19.50.0" };
class AmplifyAppProductionBranchList 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 AmplifyAppProductionBranchOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.AmplifyAppProductionBranchList = AmplifyAppProductionBranchList;
_b = JSII_RTTI_SYMBOL_1;
AmplifyAppProductionBranchList[_b] = { fqn: "@cdktf/provider-aws.amplifyApp.AmplifyAppProductionBranchList", version: "19.50.0" };
function amplifyAppAutoBranchCreationConfigToTerraform(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 {
basic_auth_credentials: cdktf.stringToTerraform(struct.basicAuthCredentials),
build_spec: cdktf.stringToTerraform(struct.buildSpec),
enable_auto_build: cdktf.booleanToTerraform(struct.enableAutoBuild),
enable_basic_auth: cdktf.booleanToTerraform(struct.enableBasicAuth),
enable_performance_mode: cdktf.booleanToTerraform(struct.enablePerformanceMode),
enable_pull_request_preview: cdktf.booleanToTerraform(struct.enablePullRequestPreview),
environment_variables: cdktf.hashMapper(cdktf.stringToTerraform)(struct.environmentVariables),
framework: cdktf.stringToTerraform(struct.framework),
pull_request_environment_name: cdktf.stringToTerraform(struct.pullRequestEnvironmentName),
stage: cdktf.stringToTerraform(struct.stage),
};
}
exports.amplifyAppAutoBranchCreationConfigToTerraform = amplifyAppAutoBranchCreationConfigToTerraform;
function amplifyAppAutoBranchCreationConfigToHclTerraform(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 = {
basic_auth_credentials: {
value: cdktf.stringToHclTerraform(struct.basicAuthCredentials),
isBlock: false,
type: "simple",
storageClassType: "string",
},
build_spec: {
value: cdktf.stringToHclTerraform(struct.buildSpec),
isBlock: false,
type: "simple",
storageClassType: "string",
},
enable_auto_build: {
value: cdktf.booleanToHclTerraform(struct.enableAutoBuild),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enable_basic_auth: {
value: cdktf.booleanToHclTerraform(struct.enableBasicAuth),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enable_performance_mode: {
value: cdktf.booleanToHclTerraform(struct.enablePerformanceMode),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enable_pull_request_preview: {
value: cdktf.booleanToHclTerraform(struct.enablePullRequestPreview),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
environment_variables: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.environmentVariables),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
framework: {
value: cdktf.stringToHclTerraform(struct.framework),
isBlock: false,
type: "simple",
storageClassType: "string",
},
pull_request_environment_name: {
value: cdktf.stringToHclTerraform(struct.pullRequestEnvironmentName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
stage: {
value: cdktf.stringToHclTerraform(struct.stage),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.amplifyAppAutoBranchCreationConfigToHclTerraform = amplifyAppAutoBranchCreationConfigToHclTerraform;
class AmplifyAppAutoBranchCreationConfigOutputReference 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._basicAuthCredentials !== undefined) {
hasAnyValues = true;
internalValueResult.basicAuthCredentials = this._basicAuthCredentials;
}
if (this._buildSpec !== undefined) {
hasAnyValues = true;
internalValueResult.buildSpec = this._buildSpec;
}
if (this._enableAutoBuild !== undefined) {
hasAnyValues = true;
internalValueResult.enableAutoBuild = this._enableAutoBuild;
}
if (this._enableBasicAuth !== undefined) {
hasAnyValues = true;
internalValueResult.enableBasicAuth = this._enableBasicAuth;
}
if (this._enablePerformanceMode !== undefined) {
hasAnyValues = true;
internalValueResult.enablePerformanceMode = this._enablePerformanceMode;
}
if (this._enablePullRequestPreview !== undefined) {
hasAnyValues = true;
internalValueResult.enablePullRequestPreview = this._enablePullRequestPreview;
}
if (this._environmentVariables !== undefined) {
hasAnyValues = true;
internalValueResult.environmentVariables = this._environmentVariables;
}
if (this._framework !== undefined) {
hasAnyValues = true;
internalValueResult.framework = this._framework;
}
if (this._pullRequestEnvironmentName !== undefined) {
hasAnyValues = true;
internalValueResult.pullRequestEnvironmentName = this._pullRequestEnvironmentName;
}
if (this._stage !== undefined) {
hasAnyValues = true;
internalValueResult.stage = this._stage;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._basicAuthCredentials = undefined;
this._buildSpec = undefined;
this._enableAutoBuild = undefined;
this._enableBasicAuth = undefined;
this._enablePerformanceMode = undefined;
this._enablePullRequestPreview = undefined;
this._environmentVariables = undefined;
this._framework = undefined;
this._pullRequestEnvironmentName = undefined;
this._stage = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._basicAuthCredentials = value.basicAuthCredentials;
this._buildSpec = value.buildSpec;
this._enableAutoBuild = value.enableAutoBuild;
this._enableBasicAuth = value.enableBasicAuth;
this._enablePerformanceMode = value.enablePerformanceMode;
this._enablePullRequestPreview = value.enablePullRequestPreview;
this._environmentVariables = value.environmentVariables;
this._framework = value.framework;
this._pullRequestEnvironmentName = value.pullRequestEnvironmentName;
this._stage = value.stage;
}
}
get basicAuthCredentials() {
return this.getStringAttribute('basic_auth_credentials');
}
set basicAuthCredentials(value) {
this._basicAuthCredentials = value;
}
resetBasicAuthCredentials() {
this._basicAuthCredentials = undefined;
}
// Temporarily expose input value. Use with caution.
get basicAuthCredentialsInput() {
return this._basicAuthCredentials;
}
get buildSpec() {
return this.getStringAttribute('build_spec');
}
set buildSpec(value) {
this._buildSpec = value;
}
resetBuildSpec() {
this._buildSpec = undefined;
}
// Temporarily expose input value. Use with caution.
get buildSpecInput() {
return this._buildSpec;
}
get enableAutoBuild() {
return this.getBooleanAttribute('enable_auto_build');
}
set enableAutoBuild(value) {
this._enableAutoBuild = value;
}
resetEnableAutoBuild() {
this._enableAutoBuild = undefined;
}
// Temporarily expose input value. Use with caution.
get enableAutoBuildInput() {
return this._enableAutoBuild;
}
get enableBasicAuth() {
return this.getBooleanAttribute('enable_basic_auth');
}
set enableBasicAuth(value) {
this._enableBasicAuth = value;
}
resetEnableBasicAuth() {
this._enableBasicAuth = undefined;
}
// Temporarily expose input value. Use with caution.
get enableBasicAuthInput() {
return this._enableBasicAuth;
}
get enablePerformanceMode() {
return this.getBooleanAttribute('enable_performance_mode');
}
set enablePerformanceMode(value) {
this._enablePerformanceMode = value;
}
resetEnablePerformanceMode() {
this._enablePerformanceMode = undefined;
}
// Temporarily expose input value. Use with caution.
get enablePerformanceModeInput() {
return this._enablePerformanceMode;
}
get enablePullRequestPreview() {
return this.getBooleanAttribute('enable_pull_request_preview');
}
set enablePullRequestPreview(value) {
this._enablePullRequestPreview = value;
}
resetEnablePullRequestPreview() {
this._enablePullRequestPreview = undefined;
}
// Temporarily expose input value. Use with caution.
get enablePullRequestPreviewInput() {
return this._enablePullRequestPreview;
}
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 framework() {
return this.getStringAttribute('framework');
}
set framework(value) {
this._framework = value;
}
resetFramework() {
this._framework = undefined;
}
// Temporarily expose input value. Use with caution.
get frameworkInput() {
return this._framework;
}
get pullRequestEnvironmentName() {
return this.getStringAttribute('pull_request_environment_name');
}
set pullRequestEnvironmentName(value) {
this._pullRequestEnvironmentName = value;
}
resetPullRequestEnvironmentName() {
this._pullRequestEnvironmentName = undefined;
}
// Temporarily expose input value. Use with caution.
get pullRequestEnvironmentNameInput() {
return this._pullRequestEnvironmentName;
}
get stage() {
return this.getStringAttribute('stage');
}
set stage(value) {
this._stage = value;
}
resetStage() {
this._stage = undefined;
}
// Temporarily expose input value. Use with caution.
get stageInput() {
return this._stage;
}
}
exports.AmplifyAppAutoBranchCreationConfigOutputReference = AmplifyAppAutoBranchCreationConfigOutputReference;
_c = JSII_RTTI_SYMBOL_1;
AmplifyAppAutoBranchCreationConfigOutputReference[_c] = { fqn: "@cdktf/provider-aws.amplifyApp.AmplifyAppAutoBranchCreationConfigOutputReference", version: "19.50.0" };
function amplifyAppCacheConfigToTerraform(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),
};
}
exports.amplifyAppCacheConfigToTerraform = amplifyAppCacheConfigToTerraform;
function amplifyAppCacheConfigToHclTerraform(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));
}
exports.amplifyAppCacheConfigToHclTerraform = amplifyAppCacheConfigToHclTerraform;
class AmplifyAppCacheConfigOutputReference 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.AmplifyAppCacheConfigOutputReference = AmplifyAppCacheConfigOutputReference;
_d = JSII_RTTI_SYMBOL_1;
AmplifyAppCacheConfigOutputReference[_d] = { fqn: "@cdktf/provider-aws.amplifyApp.AmplifyAppCacheConfigOutputReference", version: "19.50.0" };
function amplifyAppCustomRuleToTerraform(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 {
condition: cdktf.stringToTerraform(struct.condition),
source: cdktf.stringToTerraform(struct.source),
status: cdktf.stringToTerraform(struct.status),
target: cdktf.stringToTerraform(struct.target),
};
}
exports.amplifyAppCustomRuleToTerraform = amplifyAppCustomRuleToTerraform;
function amplifyAppCustomRuleToHclTerraform(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 = {
condition: {
value: cdktf.stringToHclTerraform(struct.condition),
isBlock: false,
type: "simple",
storageClassType: "string",
},
source: {
value: cdktf.stringToHclTerraform(struct.source),
isBlock: false,
type: "simple",
storageClassType: "string",
},
status: {
value: cdktf.stringToHclTerraform(struct.status),
isBlock: false,
type: "simple",
storageClassType: "string",
},
target: {
value: cdktf.stringToHclTerraform(struct.target),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.amplifyAppCustomRuleToHclTerraform = amplifyAppCustomRuleToHclTerraform;
class AmplifyAppCustomRuleOutputReference 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._condition !== undefined) {
hasAnyValues = true;
internalValueResult.condition = this._condition;
}
if (this._source !== undefined) {
hasAnyValues = true;
internalValueResult.source = this._source;
}
if (this._status !== undefined) {
hasAnyValues = true;
internalValueResult.status = this._status;
}
if (this._target !== undefined) {
hasAnyValues = true;
internalValueResult.target = this._target;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._condition = undefined;
this._source = undefined;
this._status = undefined;
this._target = 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._condition = value.condition;
this._source = value.source;
this._status = value.status;
this._target = value.target;
}
}
get condition() {
return this.getStringAttribute('condition');
}
set condition(value) {
this._condition = value;
}
resetCondition() {
this._condition = undefined;
}
// Temporarily expose input value. Use with caution.
get conditionInput() {
return this._condition;
}
get source() {
return this.getStringAttribute('source');
}
set source(value) {
this._source = value;
}
// Temporarily expose input value. Use with caution.
get sourceInput() {
return this._source;
}
get status() {
return this.getStringAttribute('status');
}
set status(value) {
this._status = value;
}
resetStatus() {
this._status = undefined;
}
// Temporarily expose input value. Use with caution.
get statusInput() {
return this._status;
}
get target() {
return this.getStringAttribute('target');
}
set target(value) {
this._target = value;
}
// Temporarily expose input value. Use with caution.
get targetInput() {
return this._target;
}
}
exports.AmplifyAppCustomRuleOutputReference = AmplifyAppCustomRuleOutputReference;
_e = JSII_RTTI_SYMBOL_1;
AmplifyAppCustomRuleOutputReference[_e] = { fqn: "@cdktf/provider-aws.amplifyApp.AmplifyAppCustomRuleOutputReference", version: "19.50.0" };
class AmplifyAppCustomRuleList 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 AmplifyAppCustomRuleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.AmplifyAppCustomRuleList = AmplifyAppCustomRuleList;
_f = JSII_RTTI_SYMBOL_1;
AmplifyAppCustomRuleList[_f] = { fqn: "@cdktf/provider-aws.amplifyApp.AmplifyAppCustomRuleList", version: "19.50.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/amplify_app aws_amplify_app}
*/
class AmplifyApp extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a AmplifyApp 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 AmplifyApp to import
* @param importFromId The id of the existing AmplifyApp that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/amplify_app#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the AmplifyApp to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_amplify_app", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/amplify_app aws_amplify_app} 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 AmplifyAppConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_amplify_app',
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
});
// production_branch - computed: true, optional: false, required: false
this._productionBranch = new AmplifyAppProductionBranchList(this, "production_branch", false);
// auto_branch_creation_config - computed: false, optional: true, required: false
this._autoBranchCreationConfig = new AmplifyAppAutoBranchCreationConfigOutputReference(this, "auto_branch_creation_config");
// cache_config - computed: false, optional: true, required: false
this._cacheConfig = new AmplifyAppCacheConfigOutputReference(this, "cache_config");
// custom_rule - computed: false, optional: true, required: false
this._customRule = new AmplifyAppCustomRuleList(this, "custom_rule", false);
this._accessToken = config.accessToken;
this._autoBranchCreationPatterns = config.autoBranchCreationPatterns;
this._basicAuthCredentials = config.basicAuthCredentials;
this._buildSpec = config.buildSpec;
this._customHeaders = config.customHeaders;
this._description = config.description;
this._enableAutoBranchCreation = config.enableAutoBranchCreation;
this._enableBasicAuth = config.enableBasicAuth;
this._enableBranchAutoBuild = config.enableBranchAutoBuild;
this._enableBranchAutoDeletion = config.enableBranchAutoDeletion;
this._environmentVariables = config.environmentVariables;
this._iamServiceRoleArn = config.iamServiceRoleArn;
this._id = config.id;
this._name = config.name;
this._oauthToken = config.oauthToken;
this._platform = config.platform;
this._repository = config.repository;
this._tags = config.tags;
this._tagsAll = config.tagsAll;
this._autoBranchCreationConfig.internalValue = config.autoBranchCreationConfig;
this._cacheConfig.internalValue = config.cacheConfig;
this._customRule.internalValue = config.customRule;
}
get accessToken() {
return this.getStringAttribute('access_token');
}
set accessToken(value) {
this._accessToken = value;
}
resetAccessToken() {
this._accessToken = undefined;
}
// Temporarily expose input value. Use with caution.
get accessTokenInput() {
return this._accessToken;
}
// arn - computed: true, optional: false, required: false
get arn() {
return this.getStringAttribute('arn');
}
get autoBranchCreationPatterns() {
return cdktf.Fn.tolist(this.getListAttribute('auto_branch_creation_patterns'));
}
set autoBranchCreationPatterns(value) {
this._autoBranchCreationPatterns = value;
}
resetAutoBranchCreationPatterns() {
this._autoBranchCreationPatterns = undefined;
}
// Temporarily expose input value. Use with caution.
get autoBranchCreationPatternsInput() {
return this._autoBranchCreationPatterns;
}
get basicAuthCredentials() {
return this.getStringAttribute('basic_auth_credentials');
}
set basicAuthCredentials(value) {
this._basicAuthCredentials = value;
}
resetBasicAuthCredentials() {
this._basicAuthCredentials = undefined;
}
// Temporarily expose input value. Use with caution.
get basicAuthCredentialsInput() {
return this._basicAuthCredentials;
}
get buildSpec() {
return this.getStringAttribute('build_spec');
}
set buildSpec(value) {
this._buildSpec = value;
}
resetBuildSpec() {
this._buildSpec = undefined;
}
// Temporarily expose input value. Use with caution.
get buildSpecInput() {
return this._buildSpec;
}
get customHeaders() {
return this.getStringAttribute('custom_headers');
}
set customHeaders(value) {
this._customHeaders = value;
}
resetCustomHeaders() {
this._customHeaders = undefined;
}
// Temporarily expose input value. Use with caution.
get customHeadersInput() {
return this._customHeaders;
}
// default_domain - computed: true, optional: false, required: false
get defaultDomain() {
return this.getStringAttribute('default_domain');
}
get description() {
return this.getStringAttribute('description');
}
set description(value) {
this._description = value;
}
resetDescription() {
this._description = undefined;
}
// Temporarily expose input value. Use with caution.
get descriptionInput() {
return this._description;
}
get enableAutoBranchCreation() {
return this.getBooleanAttribute('enable_auto_branch_creation');
}
set enableAutoBranchCreation(value) {
this._enableAutoBranchCreation = value;
}
resetEnableAutoBranchCreation() {
this._enableAutoBranchCreation = undefined;
}
// Temporarily expose input value. Use with caution.
get enableAutoBranchCreationInput() {
return this._enableAutoBranchCreation;
}
get enableBasicAuth() {
return this.getBooleanAttribute('enable_basic_auth');
}
set enableBasicAuth(value) {
this._enableBasicAuth = value;
}
resetEnableBasicAuth() {
this._enableBasicAuth = undefined;
}
// Temporarily expose input value. Use with caution.
get enableBasicAuthInput() {
return this._enableBasicAuth;
}
get enableBranchAutoBuild() {
return this.getBooleanAttribute('enable_branch_auto_build');
}
set enableBranchAutoBuild(value) {
this._enableBranchAutoBuild = value;
}
resetEnableBranchAutoBuild() {
this._enableBranchAutoBuild = undefined;
}
// Temporarily expose input value. Use with caution.
get enableBranchAutoBuildInput() {
return this._enableBranchAutoBuild;
}
get enableBranchAutoDeletion() {
return this.getBooleanAttribute('enable_branch_auto_deletion');
}
set enableBranchAutoDeletion(value) {
this._enableBranchAutoDeletion = value;
}
resetEnableBranchAutoDeletion() {
this._enableBranchAutoDeletion = undefined;
}
// Temporarily expose input value. Use with caution.
get enableBranchAutoDeletionInput() {
return this._enableBranchAutoDeletion;
}
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 iamServiceRoleArn() {
return this.getStringAttribute('iam_service_role_arn');
}
set iamServiceRoleArn(value) {
this._iamServiceRoleArn = value;
}
resetIamServiceRoleArn() {
this._iamServiceRoleArn = undefined;
}
// Temporarily expose input value. Use with caution.
get iamServiceRoleArnInput() {
return this._iamServiceRoleArn;
}
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 oauthToken() {
return this.getStringAttribute('oauth_token');
}
set oauthToken(value) {
this._oauthToken = value;
}
resetOauthToken() {
this._oauthToken = undefined;
}
// Temporarily expose input value. Use with caution.
get oauthTokenInput() {
return this._oauthToken;
}
get platform() {
return this.getStringAttribute('platform');
}
set platform(value) {
this._platform = value;
}
resetPlatform() {
this._platform = undefined;
}
// Temporarily expose input value. Use with caution.
get platformInput() {
return this._platform;
}
get productionBranch() {
return this._productionBranch;
}
get repository() {
return this.getStringAttribute('repository');
}
set repository(value) {
this._repository = value;
}
resetRepository() {
this._repository = undefined;
}
// Temporarily expose input value. Use with caution.
get repositoryInput() {
return this._repository;
}
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 autoBranchCreationConfig() {
return this._autoBranchCreationConfig;
}
putAutoBranchCreationConfig(value) {
this._autoBranchCreationConfig.internalValue = value;
}
resetAutoBranchCreationConfig() {
this._autoBranchCreationConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get autoBranchCreationConfigInput() {
return this._autoBranchCreationConfig.internalValue;
}
get cacheConfig() {
return this._cacheConfig;
}
putCacheConfig(value) {
this._cacheConfig.internalValue = value;
}
resetCacheConfig() {
this._cacheConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get cacheConfigInput() {
return this._cacheConfig.internalValue;
}
get customRule() {
return this._customRule;
}
putCustomRule(value) {
this._customRule.internalValue = value;
}
resetCustomRule() {
this._customRule.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get customRuleInput() {
return this._customRule.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
access_token: cdktf.stringToTerraform(this._accessToken),
auto_branch_creation_patterns: cdktf.listMapper(cdktf.stringToTerraform, false)(this._autoBranchCreationPatterns),
basic_auth_credentials: cdktf.stringToTerraform(this._basicAuthCredentials),
build_spec: cdktf.stringToTerraform(this._buildSpec),
custom_headers: cdktf.stringToTerraform(this._customHeaders),
description: cdktf.stringToTerraform(this._description),
enable_auto_branch_creation: cdktf.booleanToTerraform(this._enableAutoBranchCreation),
enable_basic_auth: cdktf.booleanToTerraform(this._enableBasicAuth),
enable_branch_auto_build: cdktf.booleanToTerraform(this._enableBranchAutoBuild),
enable_branch_auto_deletion: cdktf.booleanToTerraform(this._enableBranchAutoDeletion),
environment_variables: cdktf.hashMapper(cdktf.stringToTerraform)(this._environmentVariables),
iam_service_role_arn: cdktf.stringToTerraform(this._iamServiceRoleArn),
id: cdktf.stringToTerraform(this._id),
name: cdktf.stringToTerraform(this._name),
oauth_token: cdktf.stringToTerraform(this._oauthToken),
platform: cdktf.stringToTerraform(this._platform),
repository: cdktf.stringToTerraform(this._repository),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
auto_branch_creation_config: amplifyAppAutoBranchCreationConfigToTerraform(this._autoBranchCreationConfig.internalValue),
cache_config: amplifyAppCacheConfigToTerraform(this._cacheConfig.internalValue),
custom_rule: cdktf.listMapper(amplifyAppCustomRuleToTerraform, true)(this._customRule.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
access_token: {
value: cdktf.stringToHclTerraform(this._accessToken),
isBlock: false,
type: "simple",
storageClassType: "string",
},
auto_branch_creation_patterns: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._autoBranchCreationPatterns),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
basic_auth_credentials: {
value: cdktf.stringToHclTerraform(this._basicAuthCredentials),
isBlock: false,
type: "simple",
storageClassType: "string",
},
build_spec: {
value: cdktf.stringToHclTerraform(this._buildSpec),
isBlock: false,
type: "simple",
storageClassType: "string",
},
custom_headers: {
value: cdktf.stringToHclTerraform(this._customHeaders),
isBlock: false,
type: "simple",
storageClassType: "string",
},
description: {
value: cdktf.stringToHclTerraform(this._description),
isBlock: false,
type: "simple",
storageClassType: "string",
},
enable_auto_branch_creation: {
value: cdktf.booleanToHclTerraform(this._enableAutoBranchCreation),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enable_basic_auth: {
value: cdktf.booleanToHclTerraform(this._enableBasicAuth),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enable_branch_auto_build: {
value: cdktf.booleanToHclTerraform(this._enableBranchAutoBuild),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enable_branch_auto_deletion: {
value: cdktf.booleanToHclTerraform(this._enableBranchAutoDeletion),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
environment_variables: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._environmentVariables),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
iam_service_role_arn: {
value: cdktf.stringToHclTerraform(this._iamServiceRoleArn),
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",
},
oauth_token: {
value: cdktf.stringToHclTerraform(this._oauthToken),
isBlock: false,
type: "simple",
storageClassType: "string",
},
platform: {
value: cdktf.stringToHclTerraform(this._platform),
isBlock: false,
type: "simple",
storageClassType: "string",
},
repository: {
value: cdktf.stringToHclTerraform(this._repository),
isBlock: false,
type: "simple",
storageClassType: "string",
},
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",
},
auto_branch_creation_config: {
value: amplifyAppAutoBranchCreationConfigToHclTerraform(this._autoBranchCreationConfig.internalValue),
isBlock: true,
type: "list",
storageClassType: "AmplifyAppAutoBranchCreationConfigList",
},
cache_config: {
value: amplifyAppCacheConfigToHclTerraform(this._cacheConfig.internalValue),
isBlock: true,
type: "list",
storageClassType: "AmplifyAppCacheConfigList",
},
custom_rule: {
value: cdktf.listMapperHcl(amplifyAppCustomRuleToHclTerraform, true)(this._customRule.internalValue),
isBlock: true,
type: "list",
storageClassType: "AmplifyAppCustomRuleList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.AmplifyApp = AmplifyApp;
_g = JSII_RTTI_SYMBOL_1;
AmplifyApp[_g] = { fqn: "@cdktf/provider-aws.amplifyApp.AmplifyApp", version: "19.50.0" };
// =================
// STATIC PROPERTIES
// =================
AmplifyApp.tfResourceType = "aws_amplify_app";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYW1wbGlmeS1hcHAvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFTQSwrQkFBK0I7QUEwRy9CLFNBQWdCLHFDQUFxQyxDQUFDLE1BQW1DO0lBQ3ZGLElBQUksQ0FBQyxLQUFLLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEtBQUssQ0FBQyxZQUFZLENBQUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFBQyxPQUFPLE1BQU0sQ0FBQztJQUFDLENBQUM7SUFDNUYsSUFBSSxLQUFLLENBQUMsZ0JBQWdCLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUNuQyxNQUFNLElBQUksS0FBSyxDQUFDLG9IQUFvSCxDQUFDLENBQUM7SUFDeEksQ0FBQztJQUNELE9BQU8sRUFDTixDQUFBO0FBQ0gsQ0FBQztBQVBELHNGQU9DO0FBR0QsU0FBZ0Isd0NBQXdDLENBQUMsTUFBbUM7SUFDMUYsSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLFlBQVksQ0FBQyxZQUFZLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUFDLE9BQU8sTUF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