@cdktf/provider-azurerm
Version:
Prebuilt azurerm Provider for Terraform CDK (cdktf)
1,309 lines • 210 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiManagementApi = exports.ApiManagementApiTimeoutsOutputReference = exports.apiManagementApiTimeoutsToHclTerraform = exports.apiManagementApiTimeoutsToTerraform = exports.ApiManagementApiSubscriptionKeyParameterNamesOutputReference = exports.apiManagementApiSubscriptionKeyParameterNamesToHclTerraform = exports.apiManagementApiSubscriptionKeyParameterNamesToTerraform = exports.ApiManagementApiOpenidAuthenticationOutputReference = exports.apiManagementApiOpenidAuthenticationToHclTerraform = exports.apiManagementApiOpenidAuthenticationToTerraform = exports.ApiManagementApiOauth2AuthorizationOutputReference = exports.apiManagementApiOauth2AuthorizationToHclTerraform = exports.apiManagementApiOauth2AuthorizationToTerraform = exports.ApiManagementApiLicenseOutputReference = exports.apiManagementApiLicenseToHclTerraform = exports.apiManagementApiLicenseToTerraform = exports.ApiManagementApiImportOutputReference = exports.apiManagementApiImportToHclTerraform = exports.apiManagementApiImportToTerraform = exports.ApiManagementApiImportWsdlSelectorOutputReference = exports.apiManagementApiImportWsdlSelectorToHclTerraform = exports.apiManagementApiImportWsdlSelectorToTerraform = exports.ApiManagementApiContactOutputReference = exports.apiManagementApiContactToHclTerraform = exports.apiManagementApiContactToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function apiManagementApiContactToTerraform(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 {
email: cdktf.stringToTerraform(struct.email),
name: cdktf.stringToTerraform(struct.name),
url: cdktf.stringToTerraform(struct.url),
};
}
exports.apiManagementApiContactToTerraform = apiManagementApiContactToTerraform;
function apiManagementApiContactToHclTerraform(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 = {
email: {
value: cdktf.stringToHclTerraform(struct.email),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
url: {
value: cdktf.stringToHclTerraform(struct.url),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apiManagementApiContactToHclTerraform = apiManagementApiContactToHclTerraform;
class ApiManagementApiContactOutputReference 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._email !== undefined) {
hasAnyValues = true;
internalValueResult.email = this._email;
}
if (this._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._url !== undefined) {
hasAnyValues = true;
internalValueResult.url = this._url;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._email = undefined;
this._name = undefined;
this._url = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._email = value.email;
this._name = value.name;
this._url = value.url;
}
}
get email() {
return this.getStringAttribute('email');
}
set email(value) {
this._email = value;
}
resetEmail() {
this._email = undefined;
}
// Temporarily expose input value. Use with caution.
get emailInput() {
return this._email;
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
resetName() {
this._name = undefined;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get url() {
return this.getStringAttribute('url');
}
set url(value) {
this._url = value;
}
resetUrl() {
this._url = undefined;
}
// Temporarily expose input value. Use with caution.
get urlInput() {
return this._url;
}
}
exports.ApiManagementApiContactOutputReference = ApiManagementApiContactOutputReference;
_a = JSII_RTTI_SYMBOL_1;
ApiManagementApiContactOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.apiManagementApi.ApiManagementApiContactOutputReference", version: "12.27.0" };
function apiManagementApiImportWsdlSelectorToTerraform(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 {
endpoint_name: cdktf.stringToTerraform(struct.endpointName),
service_name: cdktf.stringToTerraform(struct.serviceName),
};
}
exports.apiManagementApiImportWsdlSelectorToTerraform = apiManagementApiImportWsdlSelectorToTerraform;
function apiManagementApiImportWsdlSelectorToHclTerraform(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 = {
endpoint_name: {
value: cdktf.stringToHclTerraform(struct.endpointName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
service_name: {
value: cdktf.stringToHclTerraform(struct.serviceName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apiManagementApiImportWsdlSelectorToHclTerraform = apiManagementApiImportWsdlSelectorToHclTerraform;
class ApiManagementApiImportWsdlSelectorOutputReference 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._endpointName !== undefined) {
hasAnyValues = true;
internalValueResult.endpointName = this._endpointName;
}
if (this._serviceName !== undefined) {
hasAnyValues = true;
internalValueResult.serviceName = this._serviceName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._endpointName = undefined;
this._serviceName = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._endpointName = value.endpointName;
this._serviceName = value.serviceName;
}
}
get endpointName() {
return this.getStringAttribute('endpoint_name');
}
set endpointName(value) {
this._endpointName = value;
}
// Temporarily expose input value. Use with caution.
get endpointNameInput() {
return this._endpointName;
}
get serviceName() {
return this.getStringAttribute('service_name');
}
set serviceName(value) {
this._serviceName = value;
}
// Temporarily expose input value. Use with caution.
get serviceNameInput() {
return this._serviceName;
}
}
exports.ApiManagementApiImportWsdlSelectorOutputReference = ApiManagementApiImportWsdlSelectorOutputReference;
_b = JSII_RTTI_SYMBOL_1;
ApiManagementApiImportWsdlSelectorOutputReference[_b] = { fqn: "@cdktf/provider-azurerm.apiManagementApi.ApiManagementApiImportWsdlSelectorOutputReference", version: "12.27.0" };
function apiManagementApiImportToTerraform(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 {
content_format: cdktf.stringToTerraform(struct.contentFormat),
content_value: cdktf.stringToTerraform(struct.contentValue),
wsdl_selector: apiManagementApiImportWsdlSelectorToTerraform(struct.wsdlSelector),
};
}
exports.apiManagementApiImportToTerraform = apiManagementApiImportToTerraform;
function apiManagementApiImportToHclTerraform(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 = {
content_format: {
value: cdktf.stringToHclTerraform(struct.contentFormat),
isBlock: false,
type: "simple",
storageClassType: "string",
},
content_value: {
value: cdktf.stringToHclTerraform(struct.contentValue),
isBlock: false,
type: "simple",
storageClassType: "string",
},
wsdl_selector: {
value: apiManagementApiImportWsdlSelectorToHclTerraform(struct.wsdlSelector),
isBlock: true,
type: "list",
storageClassType: "ApiManagementApiImportWsdlSelectorList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apiManagementApiImportToHclTerraform = apiManagementApiImportToHclTerraform;
class ApiManagementApiImportOutputReference 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;
// wsdl_selector - computed: false, optional: true, required: false
this._wsdlSelector = new ApiManagementApiImportWsdlSelectorOutputReference(this, "wsdl_selector");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._contentFormat !== undefined) {
hasAnyValues = true;
internalValueResult.contentFormat = this._contentFormat;
}
if (this._contentValue !== undefined) {
hasAnyValues = true;
internalValueResult.contentValue = this._contentValue;
}
if (this._wsdlSelector?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.wsdlSelector = this._wsdlSelector?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._contentFormat = undefined;
this._contentValue = undefined;
this._wsdlSelector.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._contentFormat = value.contentFormat;
this._contentValue = value.contentValue;
this._wsdlSelector.internalValue = value.wsdlSelector;
}
}
get contentFormat() {
return this.getStringAttribute('content_format');
}
set contentFormat(value) {
this._contentFormat = value;
}
// Temporarily expose input value. Use with caution.
get contentFormatInput() {
return this._contentFormat;
}
get contentValue() {
return this.getStringAttribute('content_value');
}
set contentValue(value) {
this._contentValue = value;
}
// Temporarily expose input value. Use with caution.
get contentValueInput() {
return this._contentValue;
}
get wsdlSelector() {
return this._wsdlSelector;
}
putWsdlSelector(value) {
this._wsdlSelector.internalValue = value;
}
resetWsdlSelector() {
this._wsdlSelector.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get wsdlSelectorInput() {
return this._wsdlSelector.internalValue;
}
}
exports.ApiManagementApiImportOutputReference = ApiManagementApiImportOutputReference;
_c = JSII_RTTI_SYMBOL_1;
ApiManagementApiImportOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.apiManagementApi.ApiManagementApiImportOutputReference", version: "12.27.0" };
function apiManagementApiLicenseToTerraform(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 {
name: cdktf.stringToTerraform(struct.name),
url: cdktf.stringToTerraform(struct.url),
};
}
exports.apiManagementApiLicenseToTerraform = apiManagementApiLicenseToTerraform;
function apiManagementApiLicenseToHclTerraform(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 = {
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
url: {
value: cdktf.stringToHclTerraform(struct.url),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apiManagementApiLicenseToHclTerraform = apiManagementApiLicenseToHclTerraform;
class ApiManagementApiLicenseOutputReference 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._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._url !== undefined) {
hasAnyValues = true;
internalValueResult.url = this._url;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._name = undefined;
this._url = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._name = value.name;
this._url = value.url;
}
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
resetName() {
this._name = undefined;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get url() {
return this.getStringAttribute('url');
}
set url(value) {
this._url = value;
}
resetUrl() {
this._url = undefined;
}
// Temporarily expose input value. Use with caution.
get urlInput() {
return this._url;
}
}
exports.ApiManagementApiLicenseOutputReference = ApiManagementApiLicenseOutputReference;
_d = JSII_RTTI_SYMBOL_1;
ApiManagementApiLicenseOutputReference[_d] = { fqn: "@cdktf/provider-azurerm.apiManagementApi.ApiManagementApiLicenseOutputReference", version: "12.27.0" };
function apiManagementApiOauth2AuthorizationToTerraform(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 {
authorization_server_name: cdktf.stringToTerraform(struct.authorizationServerName),
scope: cdktf.stringToTerraform(struct.scope),
};
}
exports.apiManagementApiOauth2AuthorizationToTerraform = apiManagementApiOauth2AuthorizationToTerraform;
function apiManagementApiOauth2AuthorizationToHclTerraform(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 = {
authorization_server_name: {
value: cdktf.stringToHclTerraform(struct.authorizationServerName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
scope: {
value: cdktf.stringToHclTerraform(struct.scope),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apiManagementApiOauth2AuthorizationToHclTerraform = apiManagementApiOauth2AuthorizationToHclTerraform;
class ApiManagementApiOauth2AuthorizationOutputReference 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._authorizationServerName !== undefined) {
hasAnyValues = true;
internalValueResult.authorizationServerName = this._authorizationServerName;
}
if (this._scope !== undefined) {
hasAnyValues = true;
internalValueResult.scope = this._scope;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._authorizationServerName = undefined;
this._scope = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._authorizationServerName = value.authorizationServerName;
this._scope = value.scope;
}
}
get authorizationServerName() {
return this.getStringAttribute('authorization_server_name');
}
set authorizationServerName(value) {
this._authorizationServerName = value;
}
// Temporarily expose input value. Use with caution.
get authorizationServerNameInput() {
return this._authorizationServerName;
}
get scope() {
return this.getStringAttribute('scope');
}
set scope(value) {
this._scope = value;
}
resetScope() {
this._scope = undefined;
}
// Temporarily expose input value. Use with caution.
get scopeInput() {
return this._scope;
}
}
exports.ApiManagementApiOauth2AuthorizationOutputReference = ApiManagementApiOauth2AuthorizationOutputReference;
_e = JSII_RTTI_SYMBOL_1;
ApiManagementApiOauth2AuthorizationOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.apiManagementApi.ApiManagementApiOauth2AuthorizationOutputReference", version: "12.27.0" };
function apiManagementApiOpenidAuthenticationToTerraform(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 {
bearer_token_sending_methods: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.bearerTokenSendingMethods),
openid_provider_name: cdktf.stringToTerraform(struct.openidProviderName),
};
}
exports.apiManagementApiOpenidAuthenticationToTerraform = apiManagementApiOpenidAuthenticationToTerraform;
function apiManagementApiOpenidAuthenticationToHclTerraform(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 = {
bearer_token_sending_methods: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.bearerTokenSendingMethods),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
openid_provider_name: {
value: cdktf.stringToHclTerraform(struct.openidProviderName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apiManagementApiOpenidAuthenticationToHclTerraform = apiManagementApiOpenidAuthenticationToHclTerraform;
class ApiManagementApiOpenidAuthenticationOutputReference 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._bearerTokenSendingMethods !== undefined) {
hasAnyValues = true;
internalValueResult.bearerTokenSendingMethods = this._bearerTokenSendingMethods;
}
if (this._openidProviderName !== undefined) {
hasAnyValues = true;
internalValueResult.openidProviderName = this._openidProviderName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._bearerTokenSendingMethods = undefined;
this._openidProviderName = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._bearerTokenSendingMethods = value.bearerTokenSendingMethods;
this._openidProviderName = value.openidProviderName;
}
}
get bearerTokenSendingMethods() {
return cdktf.Fn.tolist(this.getListAttribute('bearer_token_sending_methods'));
}
set bearerTokenSendingMethods(value) {
this._bearerTokenSendingMethods = value;
}
resetBearerTokenSendingMethods() {
this._bearerTokenSendingMethods = undefined;
}
// Temporarily expose input value. Use with caution.
get bearerTokenSendingMethodsInput() {
return this._bearerTokenSendingMethods;
}
get openidProviderName() {
return this.getStringAttribute('openid_provider_name');
}
set openidProviderName(value) {
this._openidProviderName = value;
}
// Temporarily expose input value. Use with caution.
get openidProviderNameInput() {
return this._openidProviderName;
}
}
exports.ApiManagementApiOpenidAuthenticationOutputReference = ApiManagementApiOpenidAuthenticationOutputReference;
_f = JSII_RTTI_SYMBOL_1;
ApiManagementApiOpenidAuthenticationOutputReference[_f] = { fqn: "@cdktf/provider-azurerm.apiManagementApi.ApiManagementApiOpenidAuthenticationOutputReference", version: "12.27.0" };
function apiManagementApiSubscriptionKeyParameterNamesToTerraform(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 {
header: cdktf.stringToTerraform(struct.header),
query: cdktf.stringToTerraform(struct.query),
};
}
exports.apiManagementApiSubscriptionKeyParameterNamesToTerraform = apiManagementApiSubscriptionKeyParameterNamesToTerraform;
function apiManagementApiSubscriptionKeyParameterNamesToHclTerraform(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 = {
header: {
value: cdktf.stringToHclTerraform(struct.header),
isBlock: false,
type: "simple",
storageClassType: "string",
},
query: {
value: cdktf.stringToHclTerraform(struct.query),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apiManagementApiSubscriptionKeyParameterNamesToHclTerraform = apiManagementApiSubscriptionKeyParameterNamesToHclTerraform;
class ApiManagementApiSubscriptionKeyParameterNamesOutputReference 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._header !== undefined) {
hasAnyValues = true;
internalValueResult.header = this._header;
}
if (this._query !== undefined) {
hasAnyValues = true;
internalValueResult.query = this._query;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._header = undefined;
this._query = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._header = value.header;
this._query = value.query;
}
}
get header() {
return this.getStringAttribute('header');
}
set header(value) {
this._header = value;
}
// Temporarily expose input value. Use with caution.
get headerInput() {
return this._header;
}
get query() {
return this.getStringAttribute('query');
}
set query(value) {
this._query = value;
}
// Temporarily expose input value. Use with caution.
get queryInput() {
return this._query;
}
}
exports.ApiManagementApiSubscriptionKeyParameterNamesOutputReference = ApiManagementApiSubscriptionKeyParameterNamesOutputReference;
_g = JSII_RTTI_SYMBOL_1;
ApiManagementApiSubscriptionKeyParameterNamesOutputReference[_g] = { fqn: "@cdktf/provider-azurerm.apiManagementApi.ApiManagementApiSubscriptionKeyParameterNamesOutputReference", version: "12.27.0" };
function apiManagementApiTimeoutsToTerraform(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),
read: cdktf.stringToTerraform(struct.read),
update: cdktf.stringToTerraform(struct.update),
};
}
exports.apiManagementApiTimeoutsToTerraform = apiManagementApiTimeoutsToTerraform;
function apiManagementApiTimeoutsToHclTerraform(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",
},
read: {
value: cdktf.stringToHclTerraform(struct.read),
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));
}
exports.apiManagementApiTimeoutsToHclTerraform = apiManagementApiTimeoutsToHclTerraform;
class ApiManagementApiTimeoutsOutputReference 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._read !== undefined) {
hasAnyValues = true;
internalValueResult.read = this._read;
}
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._read = 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._read = value.read;
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 read() {
return this.getStringAttribute('read');
}
set read(value) {
this._read = value;
}
resetRead() {
this._read = undefined;
}
// Temporarily expose input value. Use with caution.
get readInput() {
return this._read;
}
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.ApiManagementApiTimeoutsOutputReference = ApiManagementApiTimeoutsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
ApiManagementApiTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-azurerm.apiManagementApi.ApiManagementApiTimeoutsOutputReference", version: "12.27.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/api_management_api azurerm_api_management_api}
*/
class ApiManagementApi extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a ApiManagementApi 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 ApiManagementApi to import
* @param importFromId The id of the existing ApiManagementApi that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/api_management_api#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the ApiManagementApi to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_api_management_api", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/api_management_api azurerm_api_management_api} 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 ApiManagementApiConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'azurerm_api_management_api',
terraformGeneratorMetadata: {
providerName: 'azurerm',
providerVersion: '3.116.0',
providerVersionConstraint: '~> 3.10'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// contact - computed: false, optional: true, required: false
this._contact = new ApiManagementApiContactOutputReference(this, "contact");
// import - computed: false, optional: true, required: false
this._import = new ApiManagementApiImportOutputReference(this, "import");
// license - computed: false, optional: true, required: false
this._license = new ApiManagementApiLicenseOutputReference(this, "license");
// oauth2_authorization - computed: false, optional: true, required: false
this._oauth2Authorization = new ApiManagementApiOauth2AuthorizationOutputReference(this, "oauth2_authorization");
// openid_authentication - computed: false, optional: true, required: false
this._openidAuthentication = new ApiManagementApiOpenidAuthenticationOutputReference(this, "openid_authentication");
// subscription_key_parameter_names - computed: false, optional: true, required: false
this._subscriptionKeyParameterNames = new ApiManagementApiSubscriptionKeyParameterNamesOutputReference(this, "subscription_key_parameter_names");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new ApiManagementApiTimeoutsOutputReference(this, "timeouts");
this._apiManagementName = config.apiManagementName;
this._apiType = config.apiType;
this._description = config.description;
this._displayName = config.displayName;
this._id = config.id;
this._name = config.name;
this._path = config.path;
this._protocols = config.protocols;
this._resourceGroupName = config.resourceGroupName;
this._revision = config.revision;
this._revisionDescription = config.revisionDescription;
this._serviceUrl = config.serviceUrl;
this._soapPassThrough = config.soapPassThrough;
this._sourceApiId = config.sourceApiId;
this._subscriptionRequired = config.subscriptionRequired;
this._termsOfServiceUrl = config.termsOfServiceUrl;
this._version = config.version;
this._versionDescription = config.versionDescription;
this._versionSetId = config.versionSetId;
this._contact.internalValue = config.contact;
this._import.internalValue = config.import;
this._license.internalValue = config.license;
this._oauth2Authorization.internalValue = config.oauth2Authorization;
this._openidAuthentication.internalValue = config.openidAuthentication;
this._subscriptionKeyParameterNames.internalValue = config.subscriptionKeyParameterNames;
this._timeouts.internalValue = config.timeouts;
}
get apiManagementName() {
return this.getStringAttribute('api_management_name');
}
set apiManagementName(value) {
this._apiManagementName = value;
}
// Temporarily expose input value. Use with caution.
get apiManagementNameInput() {
return this._apiManagementName;
}
get apiType() {
return this.getStringAttribute('api_type');
}
set apiType(value) {
this._apiType = value;
}
resetApiType() {
this._apiType = undefined;
}
// Temporarily expose input value. Use with caution.
get apiTypeInput() {
return this._apiType;
}
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 displayName() {
return this.getStringAttribute('display_name');
}
set displayName(value) {
this._displayName = value;
}
resetDisplayName() {
this._displayName = undefined;
}
// Temporarily expose input value. Use with caution.
get displayNameInput() {
return this._displayName;
}
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;
}
// is_current - computed: true, optional: false, required: false
get isCurrent() {
return this.getBooleanAttribute('is_current');
}
// is_online - computed: true, optional: false, required: false
get isOnline() {
return this.getBooleanAttribute('is_online');
}
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 path() {
return this.getStringAttribute('path');
}
set path(value) {
this._path = value;
}
resetPath() {
this._path = undefined;
}
// Temporarily expose input value. Use with caution.
get pathInput() {
return this._path;
}
get protocols() {
return cdktf.Fn.tolist(this.getListAttribute('protocols'));
}
set protocols(value) {
this._protocols = value;
}
resetProtocols() {
this._protocols = undefined;
}
// Temporarily expose input value. Use with caution.
get protocolsInput() {
return this._protocols;
}
get resourceGroupName() {
return this.getStringAttribute('resource_group_name');
}
set resourceGroupName(value) {
this._resourceGroupName = value;
}
// Temporarily expose input value. Use with caution.
get resourceGroupNameInput() {
return this._resourceGroupName;
}
get revision() {
return this.getStringAttribute('revision');
}
set revision(value) {
this._revision = value;
}
// Temporarily expose input value. Use with caution.
get revisionInput() {
return this._revision;
}
get revisionDescription() {
return this.getStringAttribute('revision_description');
}
set revisionDescription(value) {
this._revisionDescription = value;
}
resetRevisionDescription() {
this._revisionDescription = undefined;
}
// Temporarily expose input value. Use with caution.
get revisionDescriptionInput() {
return this._revisionDescription;
}
get serviceUrl() {
return this.getStringAttribute('service_url');
}
set serviceUrl(value) {
this._serviceUrl = value;
}
resetServiceUrl() {
this._serviceUrl = undefined;
}
// Temporarily expose input value. Use with caution.
get serviceUrlInput() {
return this._serviceUrl;
}
get soapPassThrough() {
return this.getBooleanAttribute('soap_pass_through');
}
set soapPassThrough(value) {
this._soapPassThrough = value;
}
resetSoapPassThrough() {
this._soapPassThrough = undefined;
}
// Temporarily expose input value. Use with caution.
get soapPassThroughInput() {
return this._soapPassThrough;
}
get sourceApiId() {
return this.getStringAttribute('source_api_id');
}
set sourceApiId(value) {
this._sourceApiId = value;
}
resetSourceApiId() {
this._sourceApiId = undefined;
}
// Temporarily expose input value. Use with caution.
get sourceApiIdInput() {
return this._sourceApiId;
}
get subscriptionRequired() {
return this.getBooleanAttribute('subscription_required');
}
set subscriptionRequired(value) {
this._subscriptionRequired = value;
}
resetSubscriptionRequired() {
this._subscriptionRequired = undefined;
}
// Temporarily expose input value. Use with caution.
get subscriptionRequiredInput() {
return this._subscriptionRequired;
}
get termsOfServiceUrl() {
return this.getStringAttribute('terms_of_service_url');
}
set termsOfServiceUrl(value) {
this._termsOfServiceUrl = value;
}
resetTermsOfServiceUrl() {
this._termsOfServiceUrl = undefined;
}
// Temporarily expose input value. Use with caution.
get termsOfServiceUrlInput() {
return this._termsOfServiceUrl;
}
get version() {
return this.getStringAttribute('version');
}
set version(value) {
this._version = value;
}
resetVersion() {
this._version = undefined;
}
// Temporarily expose input value. Use with caution.
get versionInput() {
return this._version;
}
get versionDescription() {
return this.getStringAttribute('version_description');
}
set versionDescription(value) {
this._versionDescription = value;
}
resetVersionDescription() {
this._versionDescription = undefined;
}
// Temporarily expose input value. Use with caution.
get versionDescriptionInput() {
return this._versionDescription;
}
get versionSetId() {
return this.getStringAttribute('version_set_id');
}
set versionSetId(value) {
this._versionSetId = value;
}
resetVersionSetId() {
this._versionSetId = undefined;
}
// Temporarily expose input value. Use with caution.
get versionSetIdInput() {
return this._versionSetId;
}
get contact() {
return this._contact;
}
putContact(value) {
this._contact.internalValue = value;
}
resetContact() {
this._contact.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get contactInput() {
return this._contact.internalValue;
}
get import() {
return this._import;
}
putImport(value) {
this._import.internalValue = value;
}
resetImport() {
this._import.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get importInput() {
return this._import.internalValue;
}
get license() {
return this._license;
}
putLicense(value) {
this._license.internalValue = value;
}
resetLicense() {
this._license.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get licenseInput() {
return this._license.internalValue;
}
get oauth2Authorization() {
return this._oauth2Authorization;
}
putOauth2Authorization(value) {
this._oauth2Authorization.internalValue = value;
}
resetOauth2Authorization() {
this._oauth2Authorization.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get oauth2AuthorizationInput() {
return this._oauth2Authorization.internalValue;
}
get openidAuthentication() {
return this._openidAuthentication;
}
putOpenidAuthentication(value) {
this._openidAuthentication.internalValue = value;
}
resetOpenidAuthentication() {
this._openidAuthentication.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get openidAuthenticationInput() {
return this._openidAuthentication.internalValue;
}
get subscriptionKeyParameterNames() {
return this._subscriptionKeyParameterNames;
}
putSubscriptionKeyParam