export interface CloudFormationResourceSpecification { readonly ResourceSpecificationVersion: string; readonly ResourceTypes: Record; /** * Not really valid for this to be a plain property, but it happens in practice anyway */ readonly PropertyTypes: Record; } /** * SAM has defined a custom extension to the CFN resource specification */ export interface SAMResourceSpecification { readonly Globals?: Record; readonly ResourceSpecificationTransform: string; readonly ResourceSpecificationVersion: string; readonly ResourceTypes: Record; /** * Not really valid for this to be a plain property, but it happens in practice anyway */ readonly PropertyTypes: Record; } /** * We don't have the tightest possible typing on this, since we only need a couple of fields. */ export declare namespace resourcespec { interface ResourceType { readonly AdditionalProperties?: boolean; readonly Documentation?: string; readonly Properties?: Record; readonly Attributes?: Record; } interface CfnTypeDefinition { readonly Type?: string; readonly PrimitiveType?: string; readonly ItemType?: string; readonly PrimitiveItemType?: string; readonly DuplicatesAllowed?: boolean; } interface PropertyType extends CfnTypeDefinition { readonly Documentation?: string; readonly Properties?: Record; } /** * Used for PropertyTypes that alias a single other type (usually Json) */ interface SingleTypeAlias extends CfnTypeDefinition { readonly Documentation?: string; } interface Property extends CfnTypeDefinition { readonly Documentation?: string; readonly Required?: boolean; readonly UpdateType: 'Mutable' | 'Immutable' | 'Conditional'; } interface Attribute extends CfnTypeDefinition { readonly Documentation?: string; readonly Required?: boolean; } interface SAMResourceType { readonly AdditionalProperties?: boolean; readonly Documentation?: string; readonly Properties?: Record; readonly Attributes?: Record; } interface SAMPropertyType { readonly Documentation?: string; readonly Properties?: Record; } interface SAMSingleTypeAlias extends SAMTypeDefinition { readonly Documentation?: string; } interface SAMTypeDefinition extends CfnTypeDefinition { readonly Types?: string[]; readonly PrimitiveTypes?: string[]; readonly ItemTypes?: string[]; readonly PrimitiveItemTypes?: string[]; readonly InclusiveItemPattern?: boolean; readonly InclusiveItemTypes?: string[]; readonly InclusivePrimitiveItemTypes?: string[]; } interface SAMProperty extends Property, SAMTypeDefinition { } function isPropType(x: PropertyType | Property): x is PropertyType | SAMPropertyType; }