Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | 1x 239x 1x 260x 1x 21x 1x 21x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 10x | import { Documented, PrimitiveType } from './base-types';
import { Property } from './property';
export interface ResourceType extends Documented {
/**
* The attributes exposed by the resource type, if any.
*/
Attributes?: { [name: string]: Attribute };
/**
* The properties accepted by the resource type, if any.
*/
Properties?: { [name: string]: Property };
/**
* The ``Transform`` required by the resource type, if any.
*/
RequiredTransform?: string;
/**
* What kind of value the 'Ref' operator refers to, if any.
*/
RefKind?: string;
/**
* During a stack update, what kind of additional scrutiny changes to this resource should be subjected to
*
* @default None
*/
ScrutinyType?: ResourceScrutinyType;
}
export type Attribute = PrimitiveAttribute | ListAttribute;
export interface PrimitiveAttribute {
PrimitiveType: PrimitiveType;
}
export type ListAttribute = PrimitiveListAttribute | ComplexListAttribute;
export interface PrimitiveListAttribute {
Type: 'List';
PrimitiveItemType: PrimitiveType;
}
export interface ComplexListAttribute {
Type: 'List';
ItemType: string;
}
export function isPrimitiveAttribute(spec: Attribute): spec is PrimitiveAttribute {
return !!(spec as PrimitiveAttribute).PrimitiveType;
}
export function isListAttribute(spec: Attribute): spec is ListAttribute {
return (spec as ListAttribute).Type === 'List';
}
export function isPrimitiveListAttribute(spec: Attribute): spec is PrimitiveListAttribute {
return isListAttribute(spec) && !!(spec as PrimitiveListAttribute).PrimitiveItemType;
}
export function isComplexListAttribute(spec: Attribute): spec is ComplexListAttribute {
return isListAttribute(spec) && !!(spec as ComplexListAttribute).ItemType;
}
/**
* Type declaration for special values of the "Ref" attribute represents.
*
* The attribute can take on more values than these, but these are treated specially.
*/
export enum SpecialRefKind {
/**
* No '.ref' member is generated for this type, because it doesn't have a meaningful value.
*/
None = 'None',
/**
* The generated class will inherit from the built-in 'Arn' type.
*/
Arn = 'Arn'
}
export enum ResourceScrutinyType {
/**
* No additional scrutiny
*/
None = 'None',
/**
* An externally attached policy document to a resource
*
* (Common for SQS, SNS, S3, ...)
*/
ResourcePolicyResource = 'ResourcePolicyResource',
/**
* This is an IAM policy on an identity resource
*
* (Basically saying: this is AWS::IAM::Policy)
*/
IdentityPolicyResource = 'IdentityPolicyResource',
/**
* This is a Lambda Permission policy
*/
LambdaPermission = 'LambdaPermission',
/**
* An ingress rule object
*/
IngressRuleResource = 'IngressRuleResource',
/**
* A set of egress rules
*/
EgressRuleResource = 'EgressRuleResource',
}
export function isResourceScrutinyType(str: string): str is ResourceScrutinyType {
return (ResourceScrutinyType as any)[str] !== undefined;
} |