2 lines
80 KiB
JavaScript
2 lines
80 KiB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnDashboard=exports.CfnTrail=exports.CfnResourcePolicy=exports.CfnEventDataStore=exports.CfnChannel=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cdk=()=>{var tmp=require("../../core/lib");return cdk=()=>tmp,tmp},cfn_parse=()=>{var tmp=require("../../core/lib/helpers-internal");return cfn_parse=()=>tmp,tmp},cdk_errors=()=>{var tmp=require("../../core/lib/errors");return cdk_errors=()=>tmp,tmp};class CfnChannel extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudtrail.CfnChannel",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::CloudTrail::Channel";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnChannelPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnChannel(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}static isCfnChannel(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnChannel.CFN_RESOURCE_TYPE_NAME}static arnForChannel(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_cloudtrail_IChannelRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForChannel),error}return resource.channelRef.channelArn}_destinations;_name;_source;tags;_tagsRaw;cfnPropertyNames={destinations:"Destinations",name:"Name",source:"Source",tags:"Tags"};constructor(scope,id,props={}){super(scope,id,{type:CfnChannel.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudtrail_CfnChannelProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnChannel),error}this._destinations=props.destinations,this._name=props.name,this._source=props.source,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::CloudTrail::Channel",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags}get channelRef(){return{channelArn:this.ref}}get destinations(){return this._destinations}set destinations(value){cdk().traceProperty(this.node,"Destinations"),this._destinations=value}get name(){return this._name}set name(value){cdk().traceProperty(this.node,"Name"),this._name=value}get source(){return this._source}set source(value){cdk().traceProperty(this.node,"Source"),this._source=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get attrChannelArn(){return cdk().Token.asString(this.getAtt("ChannelArn",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{destinations:this._destinations,name:this._name,source:this._source,tags:this.tags.renderTags()}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnChannel.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnChannelPropsToCloudFormation(props)}}exports.CfnChannel=CfnChannel;function CfnChannelDestinationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("location",cdk().requiredValidator)(properties.location)),errors.collect(cdk().propertyValidator("location",cdk().validateString)(properties.location)),errors.collect(cdk().propertyValidator("type",cdk().requiredValidator)(properties.type)),errors.collect(cdk().propertyValidator("type",cdk().validateString)(properties.type)),errors.wrap('supplied properties not correct for "DestinationProperty"')}function convertCfnChannelDestinationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnChannelDestinationPropertyValidator(properties).assertSuccess(),{Location:cdk().stringToCloudFormation(properties.location),Type:cdk().stringToCloudFormation(properties.type)}):properties}function CfnChannelDestinationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("location","Location",properties.Location!=null?cfn_parse().FromCloudFormation.getString(properties.Location):void 0),ret.addPropertyResult("type","Type",properties.Type!=null?cfn_parse().FromCloudFormation.getString(properties.Type):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnChannelPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("destinations",cdk().listValidator(CfnChannelDestinationPropertyValidator))(properties.destinations)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("source",cdk().validateString)(properties.source)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnChannelProps"')}function convertCfnChannelPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnChannelPropsValidator(properties).assertSuccess(),{Destinations:cdk().listMapper(convertCfnChannelDestinationPropertyToCloudFormation)(properties.destinations),Name:cdk().stringToCloudFormation(properties.name),Source:cdk().stringToCloudFormation(properties.source),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnChannelPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("destinations","Destinations",properties.Destinations!=null?cfn_parse().FromCloudFormation.getArray(CfnChannelDestinationPropertyFromCloudFormation)(properties.Destinations):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("source","Source",properties.Source!=null?cfn_parse().FromCloudFormation.getString(properties.Source):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnEventDataStore extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudtrail.CfnEventDataStore",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::CloudTrail::EventDataStore";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnEventDataStorePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnEventDataStore(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}static isCfnEventDataStore(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnEventDataStore.CFN_RESOURCE_TYPE_NAME}static arnForEventDataStore(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_cloudtrail_IEventDataStoreRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForEventDataStore),error}return resource.eventDataStoreRef.eventDataStoreArn}_advancedEventSelectors;_billingMode;_contextKeySelectors;_federationEnabled;_federationRoleArn;_ingestionEnabled;_insightsDestination;_insightSelectors;_kmsKeyId;_maxEventSize;_multiRegionEnabled;_name;_organizationEnabled;_retentionPeriod;tags;_tagsRaw;_terminationProtectionEnabled;cfnPropertyNames={advancedEventSelectors:"AdvancedEventSelectors",billingMode:"BillingMode",contextKeySelectors:"ContextKeySelectors",federationEnabled:"FederationEnabled",federationRoleArn:"FederationRoleArn",ingestionEnabled:"IngestionEnabled",insightsDestination:"InsightsDestination",insightSelectors:"InsightSelectors",kmsKeyId:"KmsKeyId",maxEventSize:"MaxEventSize",multiRegionEnabled:"MultiRegionEnabled",name:"Name",organizationEnabled:"OrganizationEnabled",retentionPeriod:"RetentionPeriod",tags:"Tags",terminationProtectionEnabled:"TerminationProtectionEnabled"};constructor(scope,id,props={}){super(scope,id,{type:CfnEventDataStore.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudtrail_CfnEventDataStoreProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnEventDataStore),error}this._advancedEventSelectors=props.advancedEventSelectors,this._billingMode=props.billingMode,this._contextKeySelectors=props.contextKeySelectors,this._federationEnabled=props.federationEnabled,this._federationRoleArn=props.federationRoleArn,this._ingestionEnabled=props.ingestionEnabled,this._insightsDestination=props.insightsDestination,this._insightSelectors=props.insightSelectors,this._kmsKeyId=props.kmsKeyId,this._maxEventSize=props.maxEventSize,this._multiRegionEnabled=props.multiRegionEnabled,this._name=props.name,this._organizationEnabled=props.organizationEnabled,this._retentionPeriod=props.retentionPeriod,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::CloudTrail::EventDataStore",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags,this._terminationProtectionEnabled=props.terminationProtectionEnabled}get eventDataStoreRef(){return{eventDataStoreArn:this.ref}}get advancedEventSelectors(){return this._advancedEventSelectors}set advancedEventSelectors(value){cdk().traceProperty(this.node,"AdvancedEventSelectors"),this._advancedEventSelectors=value}get billingMode(){return this._billingMode}set billingMode(value){cdk().traceProperty(this.node,"BillingMode"),this._billingMode=value}get contextKeySelectors(){return this._contextKeySelectors}set contextKeySelectors(value){cdk().traceProperty(this.node,"ContextKeySelectors"),this._contextKeySelectors=value}get federationEnabled(){return this._federationEnabled}set federationEnabled(value){cdk().traceProperty(this.node,"FederationEnabled"),this._federationEnabled=value}get federationRoleArn(){return this._federationRoleArn}set federationRoleArn(value){cdk().traceProperty(this.node,"FederationRoleArn"),this._federationRoleArn=value}get ingestionEnabled(){return this._ingestionEnabled}set ingestionEnabled(value){cdk().traceProperty(this.node,"IngestionEnabled"),this._ingestionEnabled=value}get insightsDestination(){return this._insightsDestination}set insightsDestination(value){cdk().traceProperty(this.node,"InsightsDestination"),this._insightsDestination=value}get insightSelectors(){return this._insightSelectors}set insightSelectors(value){cdk().traceProperty(this.node,"InsightSelectors"),this._insightSelectors=value}get kmsKeyId(){return this._kmsKeyId}set kmsKeyId(value){cdk().traceProperty(this.node,"KmsKeyId"),this._kmsKeyId=value}get maxEventSize(){return this._maxEventSize}set maxEventSize(value){cdk().traceProperty(this.node,"MaxEventSize"),this._maxEventSize=value}get multiRegionEnabled(){return this._multiRegionEnabled}set multiRegionEnabled(value){cdk().traceProperty(this.node,"MultiRegionEnabled"),this._multiRegionEnabled=value}get name(){return this._name}set name(value){cdk().traceProperty(this.node,"Name"),this._name=value}get organizationEnabled(){return this._organizationEnabled}set organizationEnabled(value){cdk().traceProperty(this.node,"OrganizationEnabled"),this._organizationEnabled=value}get retentionPeriod(){return this._retentionPeriod}set retentionPeriod(value){cdk().traceProperty(this.node,"RetentionPeriod"),this._retentionPeriod=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get terminationProtectionEnabled(){return this._terminationProtectionEnabled}set terminationProtectionEnabled(value){cdk().traceProperty(this.node,"TerminationProtectionEnabled"),this._terminationProtectionEnabled=value}get attrCreatedTimestamp(){return cdk().Token.asString(this.getAtt("CreatedTimestamp",cdk().ResolutionTypeHint.STRING))}get attrEventDataStoreArn(){return cdk().Token.asString(this.getAtt("EventDataStoreArn",cdk().ResolutionTypeHint.STRING))}get attrStatus(){return cdk().Token.asString(this.getAtt("Status",cdk().ResolutionTypeHint.STRING))}get attrUpdatedTimestamp(){return cdk().Token.asString(this.getAtt("UpdatedTimestamp",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{advancedEventSelectors:this._advancedEventSelectors,billingMode:this._billingMode,contextKeySelectors:this._contextKeySelectors,federationEnabled:this._federationEnabled,federationRoleArn:this._federationRoleArn,ingestionEnabled:this._ingestionEnabled,insightsDestination:this._insightsDestination,insightSelectors:this._insightSelectors,kmsKeyId:this._kmsKeyId,maxEventSize:this._maxEventSize,multiRegionEnabled:this._multiRegionEnabled,name:this._name,organizationEnabled:this._organizationEnabled,retentionPeriod:this._retentionPeriod,tags:this.tags.renderTags(),terminationProtectionEnabled:this._terminationProtectionEnabled}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnEventDataStore.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnEventDataStorePropsToCloudFormation(props)}}exports.CfnEventDataStore=CfnEventDataStore;function CfnEventDataStoreAdvancedFieldSelectorPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("endsWith",cdk().listValidator(cdk().validateString))(properties.endsWith)),errors.collect(cdk().propertyValidator("equalTo",cdk().listValidator(cdk().validateString))(properties.equalTo)),errors.collect(cdk().propertyValidator("field",cdk().requiredValidator)(properties.field)),errors.collect(cdk().propertyValidator("field",cdk().validateString)(properties.field)),errors.collect(cdk().propertyValidator("notEndsWith",cdk().listValidator(cdk().validateString))(properties.notEndsWith)),errors.collect(cdk().propertyValidator("notEquals",cdk().listValidator(cdk().validateString))(properties.notEquals)),errors.collect(cdk().propertyValidator("notStartsWith",cdk().listValidator(cdk().validateString))(properties.notStartsWith)),errors.collect(cdk().propertyValidator("startsWith",cdk().listValidator(cdk().validateString))(properties.startsWith)),errors.wrap('supplied properties not correct for "AdvancedFieldSelectorProperty"')}function convertCfnEventDataStoreAdvancedFieldSelectorPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnEventDataStoreAdvancedFieldSelectorPropertyValidator(properties).assertSuccess(),{EndsWith:cdk().listMapper(cdk().stringToCloudFormation)(properties.endsWith),Equals:cdk().listMapper(cdk().stringToCloudFormation)(properties.equalTo),Field:cdk().stringToCloudFormation(properties.field),NotEndsWith:cdk().listMapper(cdk().stringToCloudFormation)(properties.notEndsWith),NotEquals:cdk().listMapper(cdk().stringToCloudFormation)(properties.notEquals),NotStartsWith:cdk().listMapper(cdk().stringToCloudFormation)(properties.notStartsWith),StartsWith:cdk().listMapper(cdk().stringToCloudFormation)(properties.startsWith)}):properties}function CfnEventDataStoreAdvancedFieldSelectorPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("endsWith","EndsWith",properties.EndsWith!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.EndsWith):void 0),ret.addPropertyResult("equalTo","Equals",properties.Equals!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.Equals):void 0),ret.addPropertyResult("field","Field",properties.Field!=null?cfn_parse().FromCloudFormation.getString(properties.Field):void 0),ret.addPropertyResult("notEndsWith","NotEndsWith",properties.NotEndsWith!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.NotEndsWith):void 0),ret.addPropertyResult("notEquals","NotEquals",properties.NotEquals!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.NotEquals):void 0),ret.addPropertyResult("notStartsWith","NotStartsWith",properties.NotStartsWith!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.NotStartsWith):void 0),ret.addPropertyResult("startsWith","StartsWith",properties.StartsWith!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.StartsWith):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventDataStoreAdvancedEventSelectorPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("fieldSelectors",cdk().requiredValidator)(properties.fieldSelectors)),errors.collect(cdk().propertyValidator("fieldSelectors",cdk().listValidator(CfnEventDataStoreAdvancedFieldSelectorPropertyValidator))(properties.fieldSelectors)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.wrap('supplied properties not correct for "AdvancedEventSelectorProperty"')}function convertCfnEventDataStoreAdvancedEventSelectorPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnEventDataStoreAdvancedEventSelectorPropertyValidator(properties).assertSuccess(),{FieldSelectors:cdk().listMapper(convertCfnEventDataStoreAdvancedFieldSelectorPropertyToCloudFormation)(properties.fieldSelectors),Name:cdk().stringToCloudFormation(properties.name)}):properties}function CfnEventDataStoreAdvancedEventSelectorPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("fieldSelectors","FieldSelectors",properties.FieldSelectors!=null?cfn_parse().FromCloudFormation.getArray(CfnEventDataStoreAdvancedFieldSelectorPropertyFromCloudFormation)(properties.FieldSelectors):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventDataStoreInsightSelectorPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("insightType",cdk().validateString)(properties.insightType)),errors.wrap('supplied properties not correct for "InsightSelectorProperty"')}function convertCfnEventDataStoreInsightSelectorPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnEventDataStoreInsightSelectorPropertyValidator(properties).assertSuccess(),{InsightType:cdk().stringToCloudFormation(properties.insightType)}):properties}function CfnEventDataStoreInsightSelectorPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("insightType","InsightType",properties.InsightType!=null?cfn_parse().FromCloudFormation.getString(properties.InsightType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventDataStoreContextKeySelectorPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("equalTo",cdk().requiredValidator)(properties.equalTo)),errors.collect(cdk().propertyValidator("equalTo",cdk().listValidator(cdk().validateString))(properties.equalTo)),errors.collect(cdk().propertyValidator("type",cdk().requiredValidator)(properties.type)),errors.collect(cdk().propertyValidator("type",cdk().validateString)(properties.type)),errors.wrap('supplied properties not correct for "ContextKeySelectorProperty"')}function convertCfnEventDataStoreContextKeySelectorPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnEventDataStoreContextKeySelectorPropertyValidator(properties).assertSuccess(),{Equals:cdk().listMapper(cdk().stringToCloudFormation)(properties.equalTo),Type:cdk().stringToCloudFormation(properties.type)}):properties}function CfnEventDataStoreContextKeySelectorPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("equalTo","Equals",properties.Equals!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.Equals):void 0),ret.addPropertyResult("type","Type",properties.Type!=null?cfn_parse().FromCloudFormation.getString(properties.Type):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventDataStorePropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("advancedEventSelectors",cdk().listValidator(CfnEventDataStoreAdvancedEventSelectorPropertyValidator))(properties.advancedEventSelectors)),errors.collect(cdk().propertyValidator("billingMode",cdk().validateString)(properties.billingMode)),errors.collect(cdk().propertyValidator("contextKeySelectors",cdk().listValidator(CfnEventDataStoreContextKeySelectorPropertyValidator))(properties.contextKeySelectors)),errors.collect(cdk().propertyValidator("federationEnabled",cdk().validateBoolean)(properties.federationEnabled)),errors.collect(cdk().propertyValidator("federationRoleArn",cdk().validateString)(properties.federationRoleArn)),errors.collect(cdk().propertyValidator("ingestionEnabled",cdk().validateBoolean)(properties.ingestionEnabled)),errors.collect(cdk().propertyValidator("insightSelectors",cdk().listValidator(CfnEventDataStoreInsightSelectorPropertyValidator))(properties.insightSelectors)),errors.collect(cdk().propertyValidator("insightsDestination",cdk().validateString)(properties.insightsDestination)),errors.collect(cdk().propertyValidator("kmsKeyId",cdk().validateString)(properties.kmsKeyId)),errors.collect(cdk().propertyValidator("maxEventSize",cdk().validateString)(properties.maxEventSize)),errors.collect(cdk().propertyValidator("multiRegionEnabled",cdk().validateBoolean)(properties.multiRegionEnabled)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("organizationEnabled",cdk().validateBoolean)(properties.organizationEnabled)),errors.collect(cdk().propertyValidator("retentionPeriod",cdk().validateNumber)(properties.retentionPeriod)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("terminationProtectionEnabled",cdk().validateBoolean)(properties.terminationProtectionEnabled)),errors.wrap('supplied properties not correct for "CfnEventDataStoreProps"')}function convertCfnEventDataStorePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnEventDataStorePropsValidator(properties).assertSuccess(),{AdvancedEventSelectors:cdk().listMapper(convertCfnEventDataStoreAdvancedEventSelectorPropertyToCloudFormation)(properties.advancedEventSelectors),BillingMode:cdk().stringToCloudFormation(properties.billingMode),ContextKeySelectors:cdk().listMapper(convertCfnEventDataStoreContextKeySelectorPropertyToCloudFormation)(properties.contextKeySelectors),FederationEnabled:cdk().booleanToCloudFormation(properties.federationEnabled),FederationRoleArn:cdk().stringToCloudFormation(properties.federationRoleArn),IngestionEnabled:cdk().booleanToCloudFormation(properties.ingestionEnabled),InsightSelectors:cdk().listMapper(convertCfnEventDataStoreInsightSelectorPropertyToCloudFormation)(properties.insightSelectors),InsightsDestination:cdk().stringToCloudFormation(properties.insightsDestination),KmsKeyId:cdk().stringToCloudFormation(properties.kmsKeyId),MaxEventSize:cdk().stringToCloudFormation(properties.maxEventSize),MultiRegionEnabled:cdk().booleanToCloudFormation(properties.multiRegionEnabled),Name:cdk().stringToCloudFormation(properties.name),OrganizationEnabled:cdk().booleanToCloudFormation(properties.organizationEnabled),RetentionPeriod:cdk().numberToCloudFormation(properties.retentionPeriod),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),TerminationProtectionEnabled:cdk().booleanToCloudFormation(properties.terminationProtectionEnabled)}):properties}function CfnEventDataStorePropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("advancedEventSelectors","AdvancedEventSelectors",properties.AdvancedEventSelectors!=null?cfn_parse().FromCloudFormation.getArray(CfnEventDataStoreAdvancedEventSelectorPropertyFromCloudFormation)(properties.AdvancedEventSelectors):void 0),ret.addPropertyResult("billingMode","BillingMode",properties.BillingMode!=null?cfn_parse().FromCloudFormation.getString(properties.BillingMode):void 0),ret.addPropertyResult("contextKeySelectors","ContextKeySelectors",properties.ContextKeySelectors!=null?cfn_parse().FromCloudFormation.getArray(CfnEventDataStoreContextKeySelectorPropertyFromCloudFormation)(properties.ContextKeySelectors):void 0),ret.addPropertyResult("federationEnabled","FederationEnabled",properties.FederationEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.FederationEnabled):void 0),ret.addPropertyResult("federationRoleArn","FederationRoleArn",properties.FederationRoleArn!=null?cfn_parse().FromCloudFormation.getString(properties.FederationRoleArn):void 0),ret.addPropertyResult("ingestionEnabled","IngestionEnabled",properties.IngestionEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.IngestionEnabled):void 0),ret.addPropertyResult("insightsDestination","InsightsDestination",properties.InsightsDestination!=null?cfn_parse().FromCloudFormation.getString(properties.InsightsDestination):void 0),ret.addPropertyResult("insightSelectors","InsightSelectors",properties.InsightSelectors!=null?cfn_parse().FromCloudFormation.getArray(CfnEventDataStoreInsightSelectorPropertyFromCloudFormation)(properties.InsightSelectors):void 0),ret.addPropertyResult("kmsKeyId","KmsKeyId",properties.KmsKeyId!=null?cfn_parse().FromCloudFormation.getString(properties.KmsKeyId):void 0),ret.addPropertyResult("maxEventSize","MaxEventSize",properties.MaxEventSize!=null?cfn_parse().FromCloudFormation.getString(properties.MaxEventSize):void 0),ret.addPropertyResult("multiRegionEnabled","MultiRegionEnabled",properties.MultiRegionEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.MultiRegionEnabled):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("organizationEnabled","OrganizationEnabled",properties.OrganizationEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.OrganizationEnabled):void 0),ret.addPropertyResult("retentionPeriod","RetentionPeriod",properties.RetentionPeriod!=null?cfn_parse().FromCloudFormation.getNumber(properties.RetentionPeriod):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("terminationProtectionEnabled","TerminationProtectionEnabled",properties.TerminationProtectionEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.TerminationProtectionEnabled):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnResourcePolicy extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudtrail.CfnResourcePolicy",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::CloudTrail::ResourcePolicy";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnResourcePolicyPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnResourcePolicy(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}static isCfnResourcePolicy(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME}_resourceArn;_resourcePolicy;cfnPropertyNames={resourceArn:"ResourceArn",resourcePolicy:"ResourcePolicy"};constructor(scope,id,props){super(scope,id,{type:CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudtrail_CfnResourcePolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnResourcePolicy),error}cdk().requireProperty(props,"resourceArn",this),cdk().requireProperty(props,"resourcePolicy",this),this._resourceArn=props.resourceArn,this._resourcePolicy=props.resourcePolicy}get resourcePolicyRef(){return{resourceArn:this.ref}}get resourceArn(){return this._resourceArn}set resourceArn(value){cdk().traceProperty(this.node,"ResourceArn"),this._resourceArn=value}get resourcePolicy(){return this._resourcePolicy}set resourcePolicy(value){cdk().traceProperty(this.node,"ResourcePolicy"),this._resourcePolicy=value}get cfnProperties(){return{resourceArn:this._resourceArn,resourcePolicy:this._resourcePolicy}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnResourcePolicyPropsToCloudFormation(props)}}exports.CfnResourcePolicy=CfnResourcePolicy;function CfnResourcePolicyPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("resourceArn",cdk().requiredValidator)(properties.resourceArn)),errors.collect(cdk().propertyValidator("resourceArn",cdk().validateString)(properties.resourceArn)),errors.collect(cdk().propertyValidator("resourcePolicy",cdk().requiredValidator)(properties.resourcePolicy)),errors.collect(cdk().propertyValidator("resourcePolicy",cdk().validateObject)(properties.resourcePolicy)),errors.wrap('supplied properties not correct for "CfnResourcePolicyProps"')}function convertCfnResourcePolicyPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnResourcePolicyPropsValidator(properties).assertSuccess(),{ResourceArn:cdk().stringToCloudFormation(properties.resourceArn),ResourcePolicy:cdk().objectToCloudFormation(properties.resourcePolicy)}):properties}function CfnResourcePolicyPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("resourceArn","ResourceArn",properties.ResourceArn!=null?cfn_parse().FromCloudFormation.getString(properties.ResourceArn):void 0),ret.addPropertyResult("resourcePolicy","ResourcePolicy",properties.ResourcePolicy!=null?cfn_parse().FromCloudFormation.getAny(properties.ResourcePolicy):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnTrail extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudtrail.CfnTrail",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::CloudTrail::Trail";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnTrailPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnTrail(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}static isCfnTrail(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnTrail.CFN_RESOURCE_TYPE_NAME}static fromTrailArn(scope,id,arn){class Import extends cdk().Resource{trailRef;constructor(scope2,id2,arn2){super(scope2,id2,{environmentFromArn:arn2});const variables=new(cfn_parse()).TemplateString("arn:${Partition}:cloudtrail:${Region}:${Account}:trail/${TrailName}").parse(arn2);this.trailRef={trailName:variables.TrailName,trailArn:arn2}}}return new Import(scope,id,arn)}static fromTrailName(scope,id,trailName){class Import extends cdk().Resource{trailRef;constructor(scope2,id2,trailName2){const arn=new(cfn_parse()).TemplateString("arn:${Partition}:cloudtrail:${Region}:${Account}:trail/${TrailName}").interpolate({Partition:cdk().Stack.of(scope2).partition,Region:cdk().Stack.of(scope2).region,Account:cdk().Stack.of(scope2).account,TrailName:trailName2});super(scope2,id2,{environmentFromArn:arn}),this.trailRef={trailName:trailName2,trailArn:arn}}}return new Import(scope,id,trailName)}static arnForTrail(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_cloudtrail_ITrailRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForTrail),error}return resource.trailRef.trailArn}_advancedEventSelectors;_aggregationConfigurations;_cloudWatchLogsLogGroupArn;_cloudWatchLogsRoleArn;_enableLogFileValidation;_eventSelectors;_includeGlobalServiceEvents;_insightSelectors;_isLogging;_isMultiRegionTrail;_isOrganizationTrail;_kmsKeyId;_s3BucketName;_s3KeyPrefix;_snsTopicName;tags;_tagsRaw;_trailName;cfnPropertyNames={advancedEventSelectors:"AdvancedEventSelectors",aggregationConfigurations:"AggregationConfigurations",cloudWatchLogsLogGroupArn:"CloudWatchLogsLogGroupArn",cloudWatchLogsRoleArn:"CloudWatchLogsRoleArn",enableLogFileValidation:"EnableLogFileValidation",eventSelectors:"EventSelectors",includeGlobalServiceEvents:"IncludeGlobalServiceEvents",insightSelectors:"InsightSelectors",isLogging:"IsLogging",isMultiRegionTrail:"IsMultiRegionTrail",isOrganizationTrail:"IsOrganizationTrail",kmsKeyId:"KMSKeyId",s3BucketName:"S3BucketName",s3KeyPrefix:"S3KeyPrefix",snsTopicName:"SnsTopicName",tags:"Tags",trailName:"TrailName"};constructor(scope,id,props){super(scope,id,{type:CfnTrail.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudtrail_CfnTrailProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnTrail),error}cdk().requireProperty(props,"isLogging",this),cdk().requireProperty(props,"s3BucketName",this),this._advancedEventSelectors=props.advancedEventSelectors,this._aggregationConfigurations=props.aggregationConfigurations,this._cloudWatchLogsLogGroupArn=cdk().getRefProperty(props.cloudWatchLogsLogGroupArn?.logGroupRef,"logGroupArn")??cdk().ensureStringOrUndefined(props.cloudWatchLogsLogGroupArn,"cloudWatchLogsLogGroupArn","logs.ILogGroupRef | string"),this._cloudWatchLogsRoleArn=cdk().getRefProperty(props.cloudWatchLogsRoleArn?.roleRef,"roleArn")??cdk().ensureStringOrUndefined(props.cloudWatchLogsRoleArn,"cloudWatchLogsRoleArn","iam.IRoleRef | string"),this._enableLogFileValidation=props.enableLogFileValidation,this._eventSelectors=props.eventSelectors,this._includeGlobalServiceEvents=props.includeGlobalServiceEvents,this._insightSelectors=props.insightSelectors,this._isLogging=props.isLogging,this._isMultiRegionTrail=props.isMultiRegionTrail,this._isOrganizationTrail=props.isOrganizationTrail,this._kmsKeyId=cdk().getRefProperty(props.kmsKeyId?.keyRef,"keyArn")??cdk().getRefProperty(props.kmsKeyId?.aliasRef,"aliasName")??cdk().getRefProperty(props.kmsKeyId?.keyRef,"keyId")??cdk().ensureStringOrUndefined(props.kmsKeyId,"kmsKeyId","kms.IKeyRef | kms.IAliasRef | string"),this._s3BucketName=cdk().getRefProperty(props.s3BucketName?.bucketRef,"bucketName")??cdk().ensureStringOrUndefined(props.s3BucketName,"s3BucketName","s3.IBucketRef | string"),this._s3KeyPrefix=props.s3KeyPrefix,this._snsTopicName=props.snsTopicName,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::CloudTrail::Trail",props.tags,{tagPropertyName:"tags"}),this._tagsRaw=props.tags,this._trailName=props.trailName}get trailRef(){return{trailName:this.ref,trailArn:this.attrArn}}get advancedEventSelectors(){return this._advancedEventSelectors}set advancedEventSelectors(value){cdk().traceProperty(this.node,"AdvancedEventSelectors"),this._advancedEventSelectors=value}get aggregationConfigurations(){return this._aggregationConfigurations}set aggregationConfigurations(value){cdk().traceProperty(this.node,"AggregationConfigurations"),this._aggregationConfigurations=value}get cloudWatchLogsLogGroupArn(){return this._cloudWatchLogsLogGroupArn}set cloudWatchLogsLogGroupArn(value){cdk().traceProperty(this.node,"CloudWatchLogsLogGroupArn"),this._cloudWatchLogsLogGroupArn=value}get cloudWatchLogsRoleArn(){return this._cloudWatchLogsRoleArn}set cloudWatchLogsRoleArn(value){cdk().traceProperty(this.node,"CloudWatchLogsRoleArn"),this._cloudWatchLogsRoleArn=value}get enableLogFileValidation(){return this._enableLogFileValidation}set enableLogFileValidation(value){cdk().traceProperty(this.node,"EnableLogFileValidation"),this._enableLogFileValidation=value}get eventSelectors(){return this._eventSelectors}set eventSelectors(value){cdk().traceProperty(this.node,"EventSelectors"),this._eventSelectors=value}get includeGlobalServiceEvents(){return this._includeGlobalServiceEvents}set includeGlobalServiceEvents(value){cdk().traceProperty(this.node,"IncludeGlobalServiceEvents"),this._includeGlobalServiceEvents=value}get insightSelectors(){return this._insightSelectors}set insightSelectors(value){cdk().traceProperty(this.node,"InsightSelectors"),this._insightSelectors=value}get isLogging(){return this._isLogging}set isLogging(value){cdk().traceProperty(this.node,"IsLogging"),this._isLogging=value}get isMultiRegionTrail(){return this._isMultiRegionTrail}set isMultiRegionTrail(value){cdk().traceProperty(this.node,"IsMultiRegionTrail"),this._isMultiRegionTrail=value}get isOrganizationTrail(){return this._isOrganizationTrail}set isOrganizationTrail(value){cdk().traceProperty(this.node,"IsOrganizationTrail"),this._isOrganizationTrail=value}get kmsKeyId(){return this._kmsKeyId}set kmsKeyId(value){cdk().traceProperty(this.node,"KMSKeyId"),this._kmsKeyId=value}get s3BucketName(){return this._s3BucketName}set s3BucketName(value){cdk().traceProperty(this.node,"S3BucketName"),this._s3BucketName=value}get s3KeyPrefix(){return this._s3KeyPrefix}set s3KeyPrefix(value){cdk().traceProperty(this.node,"S3KeyPrefix"),this._s3KeyPrefix=value}get snsTopicName(){return this._snsTopicName}set snsTopicName(value){cdk().traceProperty(this.node,"SnsTopicName"),this._snsTopicName=value}get tagsRaw(){return this._tagsRaw}set tagsRaw(value){cdk().traceProperty(this.node,"Tags"),this._tagsRaw=value}get trailName(){return this._trailName}set trailName(value){cdk().traceProperty(this.node,"TrailName"),this._trailName=value}get attrArn(){return cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING))}get attrSnsTopicArn(){return cdk().Token.asString(this.getAtt("SnsTopicArn",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{advancedEventSelectors:this._advancedEventSelectors,aggregationConfigurations:this._aggregationConfigurations,cloudWatchLogsLogGroupArn:this._cloudWatchLogsLogGroupArn,cloudWatchLogsRoleArn:this._cloudWatchLogsRoleArn,enableLogFileValidation:this._enableLogFileValidation,eventSelectors:this._eventSelectors,includeGlobalServiceEvents:this._includeGlobalServiceEvents,insightSelectors:this._insightSelectors,isLogging:this._isLogging,isMultiRegionTrail:this._isMultiRegionTrail,isOrganizationTrail:this._isOrganizationTrail,kmsKeyId:this._kmsKeyId,s3BucketName:this._s3BucketName,s3KeyPrefix:this._s3KeyPrefix,snsTopicName:this._snsTopicName,tags:this.tags.renderTags(),trailName:this._trailName}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnTrail.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnTrailPropsToCloudFormation(props)}}exports.CfnTrail=CfnTrail;function CfnTrailDataResourcePropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("type",cdk().requiredValidator)(properties.type)),errors.collect(cdk().propertyValidator("type",cdk().validateString)(properties.type)),errors.collect(cdk().propertyValidator("values",cdk().listValidator(cdk().validateString))(properties.values)),errors.wrap('supplied properties not correct for "DataResourceProperty"')}function convertCfnTrailDataResourcePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTrailDataResourcePropertyValidator(properties).assertSuccess(),{Type:cdk().stringToCloudFormation(properties.type),Values:cdk().listMapper(cdk().stringToCloudFormation)(properties.values)}):properties}function CfnTrailDataResourcePropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("type","Type",properties.Type!=null?cfn_parse().FromCloudFormation.getString(properties.Type):void 0),ret.addPropertyResult("values","Values",properties.Values!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.Values):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTrailEventSelectorPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("dataResources",cdk().listValidator(CfnTrailDataResourcePropertyValidator))(properties.dataResources)),errors.collect(cdk().propertyValidator("excludeManagementEventSources",cdk().listValidator(cdk().validateString))(properties.excludeManagementEventSources)),errors.collect(cdk().propertyValidator("includeManagementEvents",cdk().validateBoolean)(properties.includeManagementEvents)),errors.collect(cdk().propertyValidator("readWriteType",cdk().validateString)(properties.readWriteType)),errors.wrap('supplied properties not correct for "EventSelectorProperty"')}function convertCfnTrailEventSelectorPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTrailEventSelectorPropertyValidator(properties).assertSuccess(),{DataResources:cdk().listMapper(convertCfnTrailDataResourcePropertyToCloudFormation)(properties.dataResources),ExcludeManagementEventSources:cdk().listMapper(cdk().stringToCloudFormation)(properties.excludeManagementEventSources),IncludeManagementEvents:cdk().booleanToCloudFormation(properties.includeManagementEvents),ReadWriteType:cdk().stringToCloudFormation(properties.readWriteType)}):properties}function CfnTrailEventSelectorPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("dataResources","DataResources",properties.DataResources!=null?cfn_parse().FromCloudFormation.getArray(CfnTrailDataResourcePropertyFromCloudFormation)(properties.DataResources):void 0),ret.addPropertyResult("excludeManagementEventSources","ExcludeManagementEventSources",properties.ExcludeManagementEventSources!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.ExcludeManagementEventSources):void 0),ret.addPropertyResult("includeManagementEvents","IncludeManagementEvents",properties.IncludeManagementEvents!=null?cfn_parse().FromCloudFormation.getBoolean(properties.IncludeManagementEvents):void 0),ret.addPropertyResult("readWriteType","ReadWriteType",properties.ReadWriteType!=null?cfn_parse().FromCloudFormation.getString(properties.ReadWriteType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTrailAdvancedFieldSelectorPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("endsWith",cdk().listValidator(cdk().validateString))(properties.endsWith)),errors.collect(cdk().propertyValidator("equalTo",cdk().listValidator(cdk().validateString))(properties.equalTo)),errors.collect(cdk().propertyValidator("field",cdk().requiredValidator)(properties.field)),errors.collect(cdk().propertyValidator("field",cdk().validateString)(properties.field)),errors.collect(cdk().propertyValidator("notEndsWith",cdk().listValidator(cdk().validateString))(properties.notEndsWith)),errors.collect(cdk().propertyValidator("notEquals",cdk().listValidator(cdk().validateString))(properties.notEquals)),errors.collect(cdk().propertyValidator("notStartsWith",cdk().listValidator(cdk().validateString))(properties.notStartsWith)),errors.collect(cdk().propertyValidator("startsWith",cdk().listValidator(cdk().validateString))(properties.startsWith)),errors.wrap('supplied properties not correct for "AdvancedFieldSelectorProperty"')}function convertCfnTrailAdvancedFieldSelectorPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTrailAdvancedFieldSelectorPropertyValidator(properties).assertSuccess(),{EndsWith:cdk().listMapper(cdk().stringToCloudFormation)(properties.endsWith),Equals:cdk().listMapper(cdk().stringToCloudFormation)(properties.equalTo),Field:cdk().stringToCloudFormation(properties.field),NotEndsWith:cdk().listMapper(cdk().stringToCloudFormation)(properties.notEndsWith),NotEquals:cdk().listMapper(cdk().stringToCloudFormation)(properties.notEquals),NotStartsWith:cdk().listMapper(cdk().stringToCloudFormation)(properties.notStartsWith),StartsWith:cdk().listMapper(cdk().stringToCloudFormation)(properties.startsWith)}):properties}function CfnTrailAdvancedFieldSelectorPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("endsWith","EndsWith",properties.EndsWith!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.EndsWith):void 0),ret.addPropertyResult("equalTo","Equals",properties.Equals!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.Equals):void 0),ret.addPropertyResult("field","Field",properties.Field!=null?cfn_parse().FromCloudFormation.getString(properties.Field):void 0),ret.addPropertyResult("notEndsWith","NotEndsWith",properties.NotEndsWith!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.NotEndsWith):void 0),ret.addPropertyResult("notEquals","NotEquals",properties.NotEquals!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.NotEquals):void 0),ret.addPropertyResult("notStartsWith","NotStartsWith",properties.NotStartsWith!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.NotStartsWith):void 0),ret.addPropertyResult("startsWith","StartsWith",properties.StartsWith!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.StartsWith):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTrailAdvancedEventSelectorPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("fieldSelectors",cdk().requiredValidator)(properties.fieldSelectors)),errors.collect(cdk().propertyValidator("fieldSelectors",cdk().listValidator(CfnTrailAdvancedFieldSelectorPropertyValidator))(properties.fieldSelectors)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.wrap('supplied properties not correct for "AdvancedEventSelectorProperty"')}function convertCfnTrailAdvancedEventSelectorPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTrailAdvancedEventSelectorPropertyValidator(properties).assertSuccess(),{FieldSelectors:cdk().listMapper(convertCfnTrailAdvancedFieldSelectorPropertyToCloudFormation)(properties.fieldSelectors),Name:cdk().stringToCloudFormation(properties.name)}):properties}function CfnTrailAdvancedEventSelectorPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("fieldSelectors","FieldSelectors",properties.FieldSelectors!=null?cfn_parse().FromCloudFormation.getArray(CfnTrailAdvancedFieldSelectorPropertyFromCloudFormation)(properties.FieldSelectors):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTrailInsightSelectorPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("eventCategories",cdk().listValidator(cdk().validateString))(properties.eventCategories)),errors.collect(cdk().propertyValidator("insightType",cdk().validateString)(properties.insightType)),errors.wrap('supplied properties not correct for "InsightSelectorProperty"')}function convertCfnTrailInsightSelectorPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTrailInsightSelectorPropertyValidator(properties).assertSuccess(),{EventCategories:cdk().listMapper(cdk().stringToCloudFormation)(properties.eventCategories),InsightType:cdk().stringToCloudFormation(properties.insightType)}):properties}function CfnTrailInsightSelectorPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("eventCategories","EventCategories",properties.EventCategories!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.EventCategories):void 0),ret.addPropertyResult("insightType","InsightType",properties.InsightType!=null?cfn_parse().FromCloudFormation.getString(properties.InsightType):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTrailAggregationConfigurationPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("eventCategory",cdk().requiredValidator)(properties.eventCategory)),errors.collect(cdk().propertyValidator("eventCategory",cdk().validateString)(properties.eventCategory)),errors.collect(cdk().propertyValidator("templates",cdk().requiredValidator)(properties.templates)),errors.collect(cdk().propertyValidator("templates",cdk().listValidator(cdk().validateString))(properties.templates)),errors.wrap('supplied properties not correct for "AggregationConfigurationProperty"')}function convertCfnTrailAggregationConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTrailAggregationConfigurationPropertyValidator(properties).assertSuccess(),{EventCategory:cdk().stringToCloudFormation(properties.eventCategory),Templates:cdk().listMapper(cdk().stringToCloudFormation)(properties.templates)}):properties}function CfnTrailAggregationConfigurationPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("eventCategory","EventCategory",properties.EventCategory!=null?cfn_parse().FromCloudFormation.getString(properties.EventCategory):void 0),ret.addPropertyResult("templates","Templates",properties.Templates!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.Templates):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnTrailPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("advancedEventSelectors",cdk().listValidator(CfnTrailAdvancedEventSelectorPropertyValidator))(properties.advancedEventSelectors)),errors.collect(cdk().propertyValidator("aggregationConfigurations",cdk().listValidator(CfnTrailAggregationConfigurationPropertyValidator))(properties.aggregationConfigurations)),errors.collect(cdk().propertyValidator("cloudWatchLogsLogGroupArn",cdk().validateString)(properties.cloudWatchLogsLogGroupArn)),errors.collect(cdk().propertyValidator("cloudWatchLogsRoleArn",cdk().validateString)(properties.cloudWatchLogsRoleArn)),errors.collect(cdk().propertyValidator("enableLogFileValidation",cdk().validateBoolean)(properties.enableLogFileValidation)),errors.collect(cdk().propertyValidator("eventSelectors",cdk().listValidator(CfnTrailEventSelectorPropertyValidator))(properties.eventSelectors)),errors.collect(cdk().propertyValidator("includeGlobalServiceEvents",cdk().validateBoolean)(properties.includeGlobalServiceEvents)),errors.collect(cdk().propertyValidator("insightSelectors",cdk().listValidator(CfnTrailInsightSelectorPropertyValidator))(properties.insightSelectors)),errors.collect(cdk().propertyValidator("isLogging",cdk().requiredValidator)(properties.isLogging)),errors.collect(cdk().propertyValidator("isLogging",cdk().validateBoolean)(properties.isLogging)),errors.collect(cdk().propertyValidator("isMultiRegionTrail",cdk().validateBoolean)(properties.isMultiRegionTrail)),errors.collect(cdk().propertyValidator("isOrganizationTrail",cdk().validateBoolean)(properties.isOrganizationTrail)),errors.collect(cdk().propertyValidator("kmsKeyId",cdk().validateString)(properties.kmsKeyId)),errors.collect(cdk().propertyValidator("s3BucketName",cdk().requiredValidator)(properties.s3BucketName)),errors.collect(cdk().propertyValidator("s3BucketName",cdk().validateString)(properties.s3BucketName)),errors.collect(cdk().propertyValidator("s3KeyPrefix",cdk().validateString)(properties.s3KeyPrefix)),errors.collect(cdk().propertyValidator("snsTopicName",cdk().validateString)(properties.snsTopicName)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("trailName",cdk().validateString)(properties.trailName)),errors.wrap('supplied properties not correct for "CfnTrailProps"')}function convertCfnTrailPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnTrailPropsValidator(properties).assertSuccess(),{AdvancedEventSelectors:cdk().listMapper(convertCfnTrailAdvancedEventSelectorPropertyToCloudFormation)(properties.advancedEventSelectors),AggregationConfigurations:cdk().listMapper(convertCfnTrailAggregationConfigurationPropertyToCloudFormation)(properties.aggregationConfigurations),CloudWatchLogsLogGroupArn:cdk().stringToCloudFormation(properties.cloudWatchLogsLogGroupArn),CloudWatchLogsRoleArn:cdk().stringToCloudFormation(properties.cloudWatchLogsRoleArn),EnableLogFileValidation:cdk().booleanToCloudFormation(properties.enableLogFileValidation),EventSelectors:cdk().listMapper(convertCfnTrailEventSelectorPropertyToCloudFormation)(properties.eventSelectors),IncludeGlobalServiceEvents:cdk().booleanToCloudFormation(properties.includeGlobalServiceEvents),InsightSelectors:cdk().listMapper(convertCfnTrailInsightSelectorPropertyToCloudFormation)(properties.insightSelectors),IsLogging:cdk().booleanToCloudFormation(properties.isLogging),IsMultiRegionTrail:cdk().booleanToCloudFormation(properties.isMultiRegionTrail),IsOrganizationTrail:cdk().booleanToCloudFormation(properties.isOrganizationTrail),KMSKeyId:cdk().stringToCloudFormation(properties.kmsKeyId),S3BucketName:cdk().stringToCloudFormation(properties.s3BucketName),S3KeyPrefix:cdk().stringToCloudFormation(properties.s3KeyPrefix),SnsTopicName:cdk().stringToCloudFormation(properties.snsTopicName),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),TrailName:cdk().stringToCloudFormation(properties.trailName)}):properties}function CfnTrailPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("advancedEventSelectors","AdvancedEventSelectors",properties.AdvancedEventSelectors!=null?cfn_parse().FromCloudFormation.getArray(CfnTrailAdvancedEventSelectorPropertyFromCloudFormation)(properties.AdvancedEventSelectors):void 0),ret.addPropertyResult("aggregationConfigurations","AggregationConfigurations",properties.AggregationConfigurations!=null?cfn_parse().FromCloudFormation.getArray(CfnTrailAggregationConfigurationPropertyFromCloudFormation)(properties.AggregationConfigurations):void 0),ret.addPropertyResult("cloudWatchLogsLogGroupArn","CloudWatchLogsLogGroupArn",properties.CloudWatchLogsLogGroupArn!=null?cfn_parse().FromCloudFormation.getString(properties.CloudWatchLogsLogGroupArn):void 0),ret.addPropertyResult("cloudWatchLogsRoleArn","CloudWatchLogsRoleArn",properties.CloudWatchLogsRoleArn!=null?cfn_parse().FromCloudFormation.getString(properties.CloudWatchLogsRoleArn):void 0),ret.addPropertyResult("enableLogFileValidation","EnableLogFileValidation",properties.EnableLogFileValidation!=null?cfn_parse().FromCloudFormation.getBoolean(properties.EnableLogFileValidation):void 0),ret.addPropertyResult("eventSelectors","EventSelectors",properties.EventSelectors!=null?cfn_parse().FromCloudFormation.getArray(CfnTrailEventSelectorPropertyFromCloudFormation)(properties.EventSelectors):void 0),ret.addPropertyResult("includeGlobalServiceEvents","IncludeGlobalServiceEvents",properties.IncludeGlobalServiceEvents!=null?cfn_parse().FromCloudFormation.getBoolean(properties.IncludeGlobalServiceEvents):void 0),ret.addPropertyResult("insightSelectors","InsightSelectors",properties.InsightSelectors!=null?cfn_parse().FromCloudFormation.getArray(CfnTrailInsightSelectorPropertyFromCloudFormation)(properties.InsightSelectors):void 0),ret.addPropertyResult("isLogging","IsLogging",properties.IsLogging!=null?cfn_parse().FromCloudFormation.getBoolean(properties.IsLogging):void 0),ret.addPropertyResult("isMultiRegionTrail","IsMultiRegionTrail",properties.IsMultiRegionTrail!=null?cfn_parse().FromCloudFormation.getBoolean(properties.IsMultiRegionTrail):void 0),ret.addPropertyResult("isOrganizationTrail","IsOrganizationTrail",properties.IsOrganizationTrail!=null?cfn_parse().FromCloudFormation.getBoolean(properties.IsOrganizationTrail):void 0),ret.addPropertyResult("kmsKeyId","KMSKeyId",properties.KMSKeyId!=null?cfn_parse().FromCloudFormation.getString(properties.KMSKeyId):void 0),ret.addPropertyResult("s3BucketName","S3BucketName",properties.S3BucketName!=null?cfn_parse().FromCloudFormation.getString(properties.S3BucketName):void 0),ret.addPropertyResult("s3KeyPrefix","S3KeyPrefix",properties.S3KeyPrefix!=null?cfn_parse().FromCloudFormation.getString(properties.S3KeyPrefix):void 0),ret.addPropertyResult("snsTopicName","SnsTopicName",properties.SnsTopicName!=null?cfn_parse().FromCloudFormation.getString(properties.SnsTopicName):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("trailName","TrailName",properties.TrailName!=null?cfn_parse().FromCloudFormation.getString(properties.TrailName):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnDashboard extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_cloudtrail.CfnDashboard",version:"2.252.0"};static CFN_RESOURCE_TYPE_NAME="AWS::CloudTrail::Dashboard";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnDashboardPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnDashboard(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}static isCfnDashboard(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnDashboard.CFN_RESOURCE_TYPE_NAME}static arnForDashboard(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_cloudtrail_IDashboardRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForDashboard),error}return resource.dashboardRef.dashboardArn}cdkTagManager;_name;_refreshSchedule;_tags;_terminationProtectionEnabled;_widgets;cfnPropertyNames={tags:"Tags",name:"Name",refreshSchedule:"RefreshSchedule",terminationProtectionEnabled:"TerminationProtectionEnabled",widgets:"Widgets"};constructor(scope,id,props={}){super(scope,id,{type:CfnDashboard.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudtrail_CfnDashboardProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnDashboard),error}this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::CloudTrail::Dashboard",void 0,{tagPropertyName:"tags"}),this._name=props.name,this._refreshSchedule=props.refreshSchedule,this._tags=props.tags,this._terminationProtectionEnabled=props.terminationProtectionEnabled,this._widgets=props.widgets}get dashboardRef(){return{dashboardArn:this.ref}}get name(){return this._name}set name(value){cdk().traceProperty(this.node,"Name"),this._name=value}get refreshSchedule(){return this._refreshSchedule}set refreshSchedule(value){cdk().traceProperty(this.node,"RefreshSchedule"),this._refreshSchedule=value}get tags(){return this._tags}set tags(value){cdk().traceProperty(this.node,"Tags"),this._tags=value}get terminationProtectionEnabled(){return this._terminationProtectionEnabled}set terminationProtectionEnabled(value){cdk().traceProperty(this.node,"TerminationProtectionEnabled"),this._terminationProtectionEnabled=value}get widgets(){return this._widgets}set widgets(value){cdk().traceProperty(this.node,"Widgets"),this._widgets=value}get attrCreatedTimestamp(){return cdk().Token.asString(this.getAtt("CreatedTimestamp",cdk().ResolutionTypeHint.STRING))}get attrDashboardArn(){return cdk().Token.asString(this.getAtt("DashboardArn",cdk().ResolutionTypeHint.STRING))}get attrStatus(){return cdk().Token.asString(this.getAtt("Status",cdk().ResolutionTypeHint.STRING))}get attrType(){return cdk().Token.asString(this.getAtt("Type",cdk().ResolutionTypeHint.STRING))}get attrUpdatedTimestamp(){return cdk().Token.asString(this.getAtt("UpdatedTimestamp",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{tags:this.cdkTagManager.renderTags(this._tags),name:this._name,refreshSchedule:this._refreshSchedule,terminationProtectionEnabled:this._terminationProtectionEnabled,widgets:this._widgets}}inspect(inspector){try{jsiiDeprecationWarnings().aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnDashboard.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnDashboardPropsToCloudFormation(props)}}exports.CfnDashboard=CfnDashboard;function CfnDashboardWidgetPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("queryParameters",cdk().listValidator(cdk().validateString))(properties.queryParameters)),errors.collect(cdk().propertyValidator("queryStatement",cdk().requiredValidator)(properties.queryStatement)),errors.collect(cdk().propertyValidator("queryStatement",cdk().validateString)(properties.queryStatement)),errors.collect(cdk().propertyValidator("viewProperties",cdk().hashValidator(cdk().validateString))(properties.viewProperties)),errors.wrap('supplied properties not correct for "WidgetProperty"')}function convertCfnDashboardWidgetPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnDashboardWidgetPropertyValidator(properties).assertSuccess(),{QueryParameters:cdk().listMapper(cdk().stringToCloudFormation)(properties.queryParameters),QueryStatement:cdk().stringToCloudFormation(properties.queryStatement),ViewProperties:cdk().hashMapper(cdk().stringToCloudFormation)(properties.viewProperties)}):properties}function CfnDashboardWidgetPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("queryParameters","QueryParameters",properties.QueryParameters!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.QueryParameters):void 0),ret.addPropertyResult("queryStatement","QueryStatement",properties.QueryStatement!=null?cfn_parse().FromCloudFormation.getString(properties.QueryStatement):void 0),ret.addPropertyResult("viewProperties","ViewProperties",properties.ViewProperties!=null?cfn_parse().FromCloudFormation.getMap(cfn_parse().FromCloudFormation.getString)(properties.ViewProperties):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnDashboardFrequencyPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("unit",cdk().requiredValidator)(properties.unit)),errors.collect(cdk().propertyValidator("unit",cdk().validateString)(properties.unit)),errors.collect(cdk().propertyValidator("value",cdk().requiredValidator)(properties.value)),errors.collect(cdk().propertyValidator("value",cdk().validateNumber)(properties.value)),errors.wrap('supplied properties not correct for "FrequencyProperty"')}function convertCfnDashboardFrequencyPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnDashboardFrequencyPropertyValidator(properties).assertSuccess(),{Unit:cdk().stringToCloudFormation(properties.unit),Value:cdk().numberToCloudFormation(properties.value)}):properties}function CfnDashboardFrequencyPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("unit","Unit",properties.Unit!=null?cfn_parse().FromCloudFormation.getString(properties.Unit):void 0),ret.addPropertyResult("value","Value",properties.Value!=null?cfn_parse().FromCloudFormation.getNumber(properties.Value):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnDashboardRefreshSchedulePropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("frequency",CfnDashboardFrequencyPropertyValidator)(properties.frequency)),errors.collect(cdk().propertyValidator("status",cdk().validateString)(properties.status)),errors.collect(cdk().propertyValidator("timeOfDay",cdk().validateString)(properties.timeOfDay)),errors.wrap('supplied properties not correct for "RefreshScheduleProperty"')}function convertCfnDashboardRefreshSchedulePropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnDashboardRefreshSchedulePropertyValidator(properties).assertSuccess(),{Frequency:convertCfnDashboardFrequencyPropertyToCloudFormation(properties.frequency),Status:cdk().stringToCloudFormation(properties.status),TimeOfDay:cdk().stringToCloudFormation(properties.timeOfDay)}):properties}function CfnDashboardRefreshSchedulePropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("frequency","Frequency",properties.Frequency!=null?CfnDashboardFrequencyPropertyFromCloudFormation(properties.Frequency):void 0),ret.addPropertyResult("status","Status",properties.Status!=null?cfn_parse().FromCloudFormation.getString(properties.Status):void 0),ret.addPropertyResult("timeOfDay","TimeOfDay",properties.TimeOfDay!=null?cfn_parse().FromCloudFormation.getString(properties.TimeOfDay):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnDashboardPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.collect(cdk().propertyValidator("refreshSchedule",CfnDashboardRefreshSchedulePropertyValidator)(properties.refreshSchedule)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("terminationProtectionEnabled",cdk().validateBoolean)(properties.terminationProtectionEnabled)),errors.collect(cdk().propertyValidator("widgets",cdk().listValidator(CfnDashboardWidgetPropertyValidator))(properties.widgets)),errors.wrap('supplied properties not correct for "CfnDashboardProps"')}function convertCfnDashboardPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnDashboardPropsValidator(properties).assertSuccess(),{Name:cdk().stringToCloudFormation(properties.name),RefreshSchedule:convertCfnDashboardRefreshSchedulePropertyToCloudFormation(properties.refreshSchedule),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),TerminationProtectionEnabled:cdk().booleanToCloudFormation(properties.terminationProtectionEnabled),Widgets:cdk().listMapper(convertCfnDashboardWidgetPropertyToCloudFormation)(properties.widgets)}):properties}function CfnDashboardPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("refreshSchedule","RefreshSchedule",properties.RefreshSchedule!=null?CfnDashboardRefreshSchedulePropertyFromCloudFormation(properties.RefreshSchedule):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("terminationProtectionEnabled","TerminationProtectionEnabled",properties.TerminationProtectionEnabled!=null?cfn_parse().FromCloudFormation.getBoolean(properties.TerminationProtectionEnabled):void 0),ret.addPropertyResult("widgets","Widgets",properties.Widgets!=null?cfn_parse().FromCloudFormation.getArray(CfnDashboardWidgetPropertyFromCloudFormation)(properties.Widgets):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}
|