@cdktf/provider-azuread
Version:
Prebuilt azuread Provider for Terraform CDK (cdktf)
1,240 lines • 182 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServicePrincipal = exports.ServicePrincipalTimeoutsOutputReference = exports.ServicePrincipalSamlSingleSignOnOutputReference = exports.ServicePrincipalFeaturesList = exports.ServicePrincipalFeaturesOutputReference = exports.ServicePrincipalFeatureTagsList = exports.ServicePrincipalFeatureTagsOutputReference = exports.ServicePrincipalOauth2PermissionScopesList = exports.ServicePrincipalOauth2PermissionScopesOutputReference = exports.ServicePrincipalAppRolesList = exports.ServicePrincipalAppRolesOutputReference = void 0;
exports.servicePrincipalAppRolesToTerraform = servicePrincipalAppRolesToTerraform;
exports.servicePrincipalAppRolesToHclTerraform = servicePrincipalAppRolesToHclTerraform;
exports.servicePrincipalOauth2PermissionScopesToTerraform = servicePrincipalOauth2PermissionScopesToTerraform;
exports.servicePrincipalOauth2PermissionScopesToHclTerraform = servicePrincipalOauth2PermissionScopesToHclTerraform;
exports.servicePrincipalFeatureTagsToTerraform = servicePrincipalFeatureTagsToTerraform;
exports.servicePrincipalFeatureTagsToHclTerraform = servicePrincipalFeatureTagsToHclTerraform;
exports.servicePrincipalFeaturesToTerraform = servicePrincipalFeaturesToTerraform;
exports.servicePrincipalFeaturesToHclTerraform = servicePrincipalFeaturesToHclTerraform;
exports.servicePrincipalSamlSingleSignOnToTerraform = servicePrincipalSamlSingleSignOnToTerraform;
exports.servicePrincipalSamlSingleSignOnToHclTerraform = servicePrincipalSamlSingleSignOnToHclTerraform;
exports.servicePrincipalTimeoutsToTerraform = servicePrincipalTimeoutsToTerraform;
exports.servicePrincipalTimeoutsToHclTerraform = servicePrincipalTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function servicePrincipalAppRolesToTerraform(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 {};
}
function servicePrincipalAppRolesToHclTerraform(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;
}
class ServicePrincipalAppRolesOutputReference 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;
}
}
// allowed_member_types - computed: true, optional: false, required: false
get allowedMemberTypes() {
return this.getListAttribute('allowed_member_types');
}
// description - computed: true, optional: false, required: false
get description() {
return this.getStringAttribute('description');
}
// display_name - computed: true, optional: false, required: false
get displayName() {
return this.getStringAttribute('display_name');
}
// enabled - computed: true, optional: false, required: false
get enabled() {
return this.getBooleanAttribute('enabled');
}
// id - computed: true, optional: false, required: false
get id() {
return this.getStringAttribute('id');
}
// value - computed: true, optional: false, required: false
get value() {
return this.getStringAttribute('value');
}
}
exports.ServicePrincipalAppRolesOutputReference = ServicePrincipalAppRolesOutputReference;
_a = JSII_RTTI_SYMBOL_1;
ServicePrincipalAppRolesOutputReference[_a] = { fqn: "@cdktf/provider-azuread.servicePrincipal.ServicePrincipalAppRolesOutputReference", version: "13.3.0" };
class ServicePrincipalAppRolesList 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 ServicePrincipalAppRolesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ServicePrincipalAppRolesList = ServicePrincipalAppRolesList;
_b = JSII_RTTI_SYMBOL_1;
ServicePrincipalAppRolesList[_b] = { fqn: "@cdktf/provider-azuread.servicePrincipal.ServicePrincipalAppRolesList", version: "13.3.0" };
function servicePrincipalOauth2PermissionScopesToTerraform(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 {};
}
function servicePrincipalOauth2PermissionScopesToHclTerraform(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;
}
class ServicePrincipalOauth2PermissionScopesOutputReference 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;
}
}
// admin_consent_description - computed: true, optional: false, required: false
get adminConsentDescription() {
return this.getStringAttribute('admin_consent_description');
}
// admin_consent_display_name - computed: true, optional: false, required: false
get adminConsentDisplayName() {
return this.getStringAttribute('admin_consent_display_name');
}
// enabled - computed: true, optional: false, required: false
get enabled() {
return this.getBooleanAttribute('enabled');
}
// id - computed: true, optional: false, required: false
get id() {
return this.getStringAttribute('id');
}
// type - computed: true, optional: false, required: false
get type() {
return this.getStringAttribute('type');
}
// user_consent_description - computed: true, optional: false, required: false
get userConsentDescription() {
return this.getStringAttribute('user_consent_description');
}
// user_consent_display_name - computed: true, optional: false, required: false
get userConsentDisplayName() {
return this.getStringAttribute('user_consent_display_name');
}
// value - computed: true, optional: false, required: false
get value() {
return this.getStringAttribute('value');
}
}
exports.ServicePrincipalOauth2PermissionScopesOutputReference = ServicePrincipalOauth2PermissionScopesOutputReference;
_c = JSII_RTTI_SYMBOL_1;
ServicePrincipalOauth2PermissionScopesOutputReference[_c] = { fqn: "@cdktf/provider-azuread.servicePrincipal.ServicePrincipalOauth2PermissionScopesOutputReference", version: "13.3.0" };
class ServicePrincipalOauth2PermissionScopesList 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 ServicePrincipalOauth2PermissionScopesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ServicePrincipalOauth2PermissionScopesList = ServicePrincipalOauth2PermissionScopesList;
_d = JSII_RTTI_SYMBOL_1;
ServicePrincipalOauth2PermissionScopesList[_d] = { fqn: "@cdktf/provider-azuread.servicePrincipal.ServicePrincipalOauth2PermissionScopesList", version: "13.3.0" };
function servicePrincipalFeatureTagsToTerraform(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 {
custom_single_sign_on: cdktf.booleanToTerraform(struct.customSingleSignOn),
enterprise: cdktf.booleanToTerraform(struct.enterprise),
gallery: cdktf.booleanToTerraform(struct.gallery),
hide: cdktf.booleanToTerraform(struct.hide),
};
}
function servicePrincipalFeatureTagsToHclTerraform(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 = {
custom_single_sign_on: {
value: cdktf.booleanToHclTerraform(struct.customSingleSignOn),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enterprise: {
value: cdktf.booleanToHclTerraform(struct.enterprise),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
gallery: {
value: cdktf.booleanToHclTerraform(struct.gallery),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
hide: {
value: cdktf.booleanToHclTerraform(struct.hide),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ServicePrincipalFeatureTagsOutputReference 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._customSingleSignOn !== undefined) {
hasAnyValues = true;
internalValueResult.customSingleSignOn = this._customSingleSignOn;
}
if (this._enterprise !== undefined) {
hasAnyValues = true;
internalValueResult.enterprise = this._enterprise;
}
if (this._gallery !== undefined) {
hasAnyValues = true;
internalValueResult.gallery = this._gallery;
}
if (this._hide !== undefined) {
hasAnyValues = true;
internalValueResult.hide = this._hide;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._customSingleSignOn = undefined;
this._enterprise = undefined;
this._gallery = undefined;
this._hide = 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._customSingleSignOn = value.customSingleSignOn;
this._enterprise = value.enterprise;
this._gallery = value.gallery;
this._hide = value.hide;
}
}
get customSingleSignOn() {
return this.getBooleanAttribute('custom_single_sign_on');
}
set customSingleSignOn(value) {
this._customSingleSignOn = value;
}
resetCustomSingleSignOn() {
this._customSingleSignOn = undefined;
}
// Temporarily expose input value. Use with caution.
get customSingleSignOnInput() {
return this._customSingleSignOn;
}
get enterprise() {
return this.getBooleanAttribute('enterprise');
}
set enterprise(value) {
this._enterprise = value;
}
resetEnterprise() {
this._enterprise = undefined;
}
// Temporarily expose input value. Use with caution.
get enterpriseInput() {
return this._enterprise;
}
get gallery() {
return this.getBooleanAttribute('gallery');
}
set gallery(value) {
this._gallery = value;
}
resetGallery() {
this._gallery = undefined;
}
// Temporarily expose input value. Use with caution.
get galleryInput() {
return this._gallery;
}
get hide() {
return this.getBooleanAttribute('hide');
}
set hide(value) {
this._hide = value;
}
resetHide() {
this._hide = undefined;
}
// Temporarily expose input value. Use with caution.
get hideInput() {
return this._hide;
}
}
exports.ServicePrincipalFeatureTagsOutputReference = ServicePrincipalFeatureTagsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
ServicePrincipalFeatureTagsOutputReference[_e] = { fqn: "@cdktf/provider-azuread.servicePrincipal.ServicePrincipalFeatureTagsOutputReference", version: "13.3.0" };
class ServicePrincipalFeatureTagsList 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 ServicePrincipalFeatureTagsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ServicePrincipalFeatureTagsList = ServicePrincipalFeatureTagsList;
_f = JSII_RTTI_SYMBOL_1;
ServicePrincipalFeatureTagsList[_f] = { fqn: "@cdktf/provider-azuread.servicePrincipal.ServicePrincipalFeatureTagsList", version: "13.3.0" };
function servicePrincipalFeaturesToTerraform(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 {
custom_single_sign_on_app: cdktf.booleanToTerraform(struct.customSingleSignOnApp),
enterprise_application: cdktf.booleanToTerraform(struct.enterpriseApplication),
gallery_application: cdktf.booleanToTerraform(struct.galleryApplication),
visible_to_users: cdktf.booleanToTerraform(struct.visibleToUsers),
};
}
function servicePrincipalFeaturesToHclTerraform(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 = {
custom_single_sign_on_app: {
value: cdktf.booleanToHclTerraform(struct.customSingleSignOnApp),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enterprise_application: {
value: cdktf.booleanToHclTerraform(struct.enterpriseApplication),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
gallery_application: {
value: cdktf.booleanToHclTerraform(struct.galleryApplication),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
visible_to_users: {
value: cdktf.booleanToHclTerraform(struct.visibleToUsers),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ServicePrincipalFeaturesOutputReference 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._customSingleSignOnApp !== undefined) {
hasAnyValues = true;
internalValueResult.customSingleSignOnApp = this._customSingleSignOnApp;
}
if (this._enterpriseApplication !== undefined) {
hasAnyValues = true;
internalValueResult.enterpriseApplication = this._enterpriseApplication;
}
if (this._galleryApplication !== undefined) {
hasAnyValues = true;
internalValueResult.galleryApplication = this._galleryApplication;
}
if (this._visibleToUsers !== undefined) {
hasAnyValues = true;
internalValueResult.visibleToUsers = this._visibleToUsers;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._customSingleSignOnApp = undefined;
this._enterpriseApplication = undefined;
this._galleryApplication = undefined;
this._visibleToUsers = 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._customSingleSignOnApp = value.customSingleSignOnApp;
this._enterpriseApplication = value.enterpriseApplication;
this._galleryApplication = value.galleryApplication;
this._visibleToUsers = value.visibleToUsers;
}
}
get customSingleSignOnApp() {
return this.getBooleanAttribute('custom_single_sign_on_app');
}
set customSingleSignOnApp(value) {
this._customSingleSignOnApp = value;
}
resetCustomSingleSignOnApp() {
this._customSingleSignOnApp = undefined;
}
// Temporarily expose input value. Use with caution.
get customSingleSignOnAppInput() {
return this._customSingleSignOnApp;
}
get enterpriseApplication() {
return this.getBooleanAttribute('enterprise_application');
}
set enterpriseApplication(value) {
this._enterpriseApplication = value;
}
resetEnterpriseApplication() {
this._enterpriseApplication = undefined;
}
// Temporarily expose input value. Use with caution.
get enterpriseApplicationInput() {
return this._enterpriseApplication;
}
get galleryApplication() {
return this.getBooleanAttribute('gallery_application');
}
set galleryApplication(value) {
this._galleryApplication = value;
}
resetGalleryApplication() {
this._galleryApplication = undefined;
}
// Temporarily expose input value. Use with caution.
get galleryApplicationInput() {
return this._galleryApplication;
}
get visibleToUsers() {
return this.getBooleanAttribute('visible_to_users');
}
set visibleToUsers(value) {
this._visibleToUsers = value;
}
resetVisibleToUsers() {
this._visibleToUsers = undefined;
}
// Temporarily expose input value. Use with caution.
get visibleToUsersInput() {
return this._visibleToUsers;
}
}
exports.ServicePrincipalFeaturesOutputReference = ServicePrincipalFeaturesOutputReference;
_g = JSII_RTTI_SYMBOL_1;
ServicePrincipalFeaturesOutputReference[_g] = { fqn: "@cdktf/provider-azuread.servicePrincipal.ServicePrincipalFeaturesOutputReference", version: "13.3.0" };
class ServicePrincipalFeaturesList 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 ServicePrincipalFeaturesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ServicePrincipalFeaturesList = ServicePrincipalFeaturesList;
_h = JSII_RTTI_SYMBOL_1;
ServicePrincipalFeaturesList[_h] = { fqn: "@cdktf/provider-azuread.servicePrincipal.ServicePrincipalFeaturesList", version: "13.3.0" };
function servicePrincipalSamlSingleSignOnToTerraform(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 {
relay_state: cdktf.stringToTerraform(struct.relayState),
};
}
function servicePrincipalSamlSingleSignOnToHclTerraform(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 = {
relay_state: {
value: cdktf.stringToHclTerraform(struct.relayState),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ServicePrincipalSamlSingleSignOnOutputReference 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._relayState !== undefined) {
hasAnyValues = true;
internalValueResult.relayState = this._relayState;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._relayState = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._relayState = value.relayState;
}
}
get relayState() {
return this.getStringAttribute('relay_state');
}
set relayState(value) {
this._relayState = value;
}
resetRelayState() {
this._relayState = undefined;
}
// Temporarily expose input value. Use with caution.
get relayStateInput() {
return this._relayState;
}
}
exports.ServicePrincipalSamlSingleSignOnOutputReference = ServicePrincipalSamlSingleSignOnOutputReference;
_j = JSII_RTTI_SYMBOL_1;
ServicePrincipalSamlSingleSignOnOutputReference[_j] = { fqn: "@cdktf/provider-azuread.servicePrincipal.ServicePrincipalSamlSingleSignOnOutputReference", version: "13.3.0" };
function servicePrincipalTimeoutsToTerraform(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),
};
}
function servicePrincipalTimeoutsToHclTerraform(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));
}
class ServicePrincipalTimeoutsOutputReference 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.ServicePrincipalTimeoutsOutputReference = ServicePrincipalTimeoutsOutputReference;
_k = JSII_RTTI_SYMBOL_1;
ServicePrincipalTimeoutsOutputReference[_k] = { fqn: "@cdktf/provider-azuread.servicePrincipal.ServicePrincipalTimeoutsOutputReference", version: "13.3.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/azuread/3.3.0/docs/resources/service_principal azuread_service_principal}
*/
class ServicePrincipal extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a ServicePrincipal 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 ServicePrincipal to import
* @param importFromId The id of the existing ServicePrincipal that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azuread/3.3.0/docs/resources/service_principal#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the ServicePrincipal to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azuread_service_principal", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/azuread/3.3.0/docs/resources/service_principal azuread_service_principal} 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 ServicePrincipalConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'azuread_service_principal',
terraformGeneratorMetadata: {
providerName: 'azuread',
providerVersion: '3.3.0',
providerVersionConstraint: '~> 3.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// app_role_ids - computed: true, optional: false, required: false
this._appRoleIds = new cdktf.StringMap(this, "app_role_ids");
// app_roles - computed: true, optional: false, required: false
this._appRoles = new ServicePrincipalAppRolesList(this, "app_roles", false);
// oauth2_permission_scope_ids - computed: true, optional: false, required: false
this._oauth2PermissionScopeIds = new cdktf.StringMap(this, "oauth2_permission_scope_ids");
// oauth2_permission_scopes - computed: true, optional: false, required: false
this._oauth2PermissionScopes = new ServicePrincipalOauth2PermissionScopesList(this, "oauth2_permission_scopes", false);
// feature_tags - computed: false, optional: true, required: false
this._featureTags = new ServicePrincipalFeatureTagsList(this, "feature_tags", false);
// features - computed: false, optional: true, required: false
this._features = new ServicePrincipalFeaturesList(this, "features", false);
// saml_single_sign_on - computed: false, optional: true, required: false
this._samlSingleSignOn = new ServicePrincipalSamlSingleSignOnOutputReference(this, "saml_single_sign_on");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new ServicePrincipalTimeoutsOutputReference(this, "timeouts");
this._accountEnabled = config.accountEnabled;
this._alternativeNames = config.alternativeNames;
this._appRoleAssignmentRequired = config.appRoleAssignmentRequired;
this._clientId = config.clientId;
this._description = config.description;
this._id = config.id;
this._loginUrl = config.loginUrl;
this._notes = config.notes;
this._notificationEmailAddresses = config.notificationEmailAddresses;
this._owners = config.owners;
this._preferredSingleSignOnMode = config.preferredSingleSignOnMode;
this._tags = config.tags;
this._useExisting = config.useExisting;
this._featureTags.internalValue = config.featureTags;
this._features.internalValue = config.features;
this._samlSingleSignOn.internalValue = config.samlSingleSignOn;
this._timeouts.internalValue = config.timeouts;
}
get accountEnabled() {
return this.getBooleanAttribute('account_enabled');
}
set accountEnabled(value) {
this._accountEnabled = value;
}
resetAccountEnabled() {
this._accountEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get accountEnabledInput() {
return this._accountEnabled;
}
get alternativeNames() {
return cdktf.Fn.tolist(this.getListAttribute('alternative_names'));
}
set alternativeNames(value) {
this._alternativeNames = value;
}
resetAlternativeNames() {
this._alternativeNames = undefined;
}
// Temporarily expose input value. Use with caution.
get alternativeNamesInput() {
return this._alternativeNames;
}
get appRoleAssignmentRequired() {
return this.getBooleanAttribute('app_role_assignment_required');
}
set appRoleAssignmentRequired(value) {
this._appRoleAssignmentRequired = value;
}
resetAppRoleAssignmentRequired() {
this._appRoleAssignmentRequired = undefined;
}
// Temporarily expose input value. Use with caution.
get appRoleAssignmentRequiredInput() {
return this._appRoleAssignmentRequired;
}
get appRoleIds() {
return this._appRoleIds;
}
get appRoles() {
return this._appRoles;
}
// application_tenant_id - computed: true, optional: false, required: false
get applicationTenantId() {
return this.getStringAttribute('application_tenant_id');
}
get clientId() {
return this.getStringAttribute('client_id');
}
set clientId(value) {
this._clientId = value;
}
// Temporarily expose input value. Use with caution.
get clientIdInput() {
return this._clientId;
}
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;
}
// display_name - computed: true, optional: false, required: false
get displayName() {
return this.getStringAttribute('display_name');
}
// homepage_url - computed: true, optional: false, required: false
get homepageUrl() {
return this.getStringAttribute('homepage_url');
}
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 loginUrl() {
return this.getStringAttribute('login_url');
}
set loginUrl(value) {
this._loginUrl = value;
}
resetLoginUrl() {
this._loginUrl = undefined;
}
// Temporarily expose input value. Use with caution.
get loginUrlInput() {
return this._loginUrl;
}
// logout_url - computed: true, optional: false, required: false
get logoutUrl() {
return this.getStringAttribute('logout_url');
}
get notes() {
return this.getStringAttribute('notes');
}
set notes(value) {
this._notes = value;
}
resetNotes() {
this._notes = undefined;
}
// Temporarily expose input value. Use with caution.
get notesInput() {
return this._notes;
}
get notificationEmailAddresses() {
return cdktf.Fn.tolist(this.getListAttribute('notification_email_addresses'));
}
set notificationEmailAddresses(value) {
this._notificationEmailAddresses = value;
}
resetNotificationEmailAddresses() {
this._notificationEmailAddresses = undefined;
}
// Temporarily expose input value. Use with caution.
get notificationEmailAddressesInput() {
return this._notificationEmailAddresses;
}
get oauth2PermissionScopeIds() {
return this._oauth2PermissionScopeIds;
}
get oauth2PermissionScopes() {
return this._oauth2PermissionScopes;
}
// object_id - computed: true, optional: false, required: false
get objectId() {
return this.getStringAttribute('object_id');
}
get owners() {
return cdktf.Fn.tolist(this.getListAttribute('owners'));
}
set owners(value) {
this._owners = value;
}
resetOwners() {
this._owners = undefined;
}
// Temporarily expose input value. Use with caution.
get ownersInput() {
return this._owners;
}
get preferredSingleSignOnMode() {
return this.getStringAttribute('preferred_single_sign_on_mode');
}
set preferredSingleSignOnMode(value) {
this._preferredSingleSignOnMode = value;
}
resetPreferredSingleSignOnMode() {
this._preferredSingleSignOnMode = undefined;
}
// Temporarily expose input value. Use with caution.
get preferredSingleSignOnModeInput() {
return this._preferredSingleSignOnMode;
}
// redirect_uris - computed: true, optional: false, required: false
get redirectUris() {
return this.getListAttribute('redirect_uris');
}
// saml_metadata_url - computed: true, optional: false, required: false
get samlMetadataUrl() {
return this.getStringAttribute('saml_metadata_url');
}
// service_principal_names - computed: true, optional: false, required: false
get servicePrincipalNames() {
return this.getListAttribute('service_principal_names');
}
// sign_in_audience - computed: true, optional: false, required: false
get signInAudience() {
return this.getStringAttribute('sign_in_audience');
}
get tags() {
return cdktf.Fn.tolist(this.getListAttribute('tags'));
}
set tags(value) {
this._tags = value;
}
resetTags() {
this._tags = undefined;
}
// Temporarily expose input value. Use with caution.
get tagsInput() {
return this._tags;
}
// type - computed: true, optional: false, required: false
get type() {
return this.getStringAttribute('type');
}
get useExisting() {
return this.getBooleanAttribute('use_existing');
}
set useExisting(value) {
this._useExisting = value;
}
resetUseExisting() {
this._useExisting = undefined;
}
// Temporarily expose input value. Use with caution.
get useExistingInput() {
return this._useExisting;
}
get featureTags() {
return this._featureTags;
}
putFeatureTags(value) {
this._featureTags.internalValue = value;
}
resetFeatureTags() {
this._featureTags.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get featureTagsInput() {
return this._featureTags.internalValue;
}
get features() {
return this._features;
}
putFeatures(value) {
this._features.internalValue = value;
}
resetFeatures() {
this._features.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get featuresInput() {
return this._features.internalValue;
}
get samlSingleSignOn() {
return this._samlSingleSignOn;
}
putSamlSingleSignOn(value) {
this._samlSingleSignOn.internalValue = value;
}
resetSamlSingleSignOn() {
this._samlSingleSignOn.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get samlSingleSignOnInput() {
return this._samlSingleSignOn.internalValue;
}
get timeouts() {
return this._timeouts;
}
putTimeouts(value) {
this._timeouts.internalValue = value;
}
resetTimeouts() {
this._timeouts.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get timeoutsInput() {
return this._timeouts.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
account_enabled: cdktf.booleanToTerraform(this._accountEnabled),
alternative_names: cdktf.listMapper(cdktf.stringToTerraform, false)(this._alternativeNames),
app_role_assignment_required: cdktf.booleanToTerraform(this._appRoleAssignmentRequired),
client_id: cdktf.stringToTerraform(this._clientId),
description: cdktf.stringToTerraform(this._description),
id: cdktf.stringToTerraform(this._id),
login_url: cdktf.stringToTerraform(this._loginUrl),
notes: cdktf.stringToTerraform(this._notes),
notification_email_addresses: cdktf.listMapper(cdktf.stringToTerraform, false)(this._notificationEmailAddresses),
owners: cdktf.listMapper(cdktf.stringToTerraform, false)(this._owners),
preferred_single_sign_on_mode: cdktf.stringToTerraform(this._preferredSingleSignOnMode),
tags: cdktf.listMapper(cdktf.stringToTerraform, false)(this._tags),
use_existing: cdktf.booleanToTerraform(this._useExisting),
feature_tags: cdktf.listMapper(servicePrincipalFeatureTagsToTerraform, true)(this._featureTags.internalValue),
features: cdktf.listMapper(servicePrincipalFeaturesToTerraform, true)(this._features.internalValue),
saml_single_sign_on: servicePrincipalSamlSingleSignOnToTerraform(this._samlSingleSignOn.internalValue),
timeouts: servicePrincipalTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
account_enabled: {
value: cdktf.booleanToHclTerraform(this._accountEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
alternative_names: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._alternativeNames),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
app_role_assignment_required: {
value: cdktf.booleanToHclTerraform(this._appRoleAssignmentRequired),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
client_id: {
value: cdktf.stringToHclTerraform(this._clientId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
description: {
value: cdktf.stringToHclTerraform(this._description),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
login_url: {
value: cdktf.stringToHclTerraform(this._loginUrl),
isBlock: false,
type: "simple",
storageClassType: "string",
},
notes: {
value: cdktf.stringToHclTerraform(this._notes),
isBlock: false,
type: "simple",
storageClassType: "string",
},
notification_email_addresses: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._notifi