From 2368ab695e2b424c9612f4a3f3b3fb0908a993dd Mon Sep 17 00:00:00 2001 From: Mike Cowgill Date: Tue, 23 Apr 2019 03:19:23 -0700 Subject: [PATCH] feat(cdk): Expose props in CFN resources and remove propertyOverrides (#2372) Modify the generation of CFN resources to create Class members for each CloudFormation Property. This removes the need for the property override solution implemented previously. CloudFormation Resource attributes are now prefixed with `attr` instead of resource name. The RefKind patches are removed. All L2 resources have been updated to consume the new attribute names. The Ref attributes are removed and the new `refAsString` is used. Added tagging support for AppSync, AppMesh, StepFunctions. Token now supports `number` types, so the generated code no longer treats number as non-tokenizable. BREAKING CHANGE: All L1 (CFN) Resources have attributes prefixed with `attr`. For example, in S3 `bucket.bucketArn` is now `bucket.attrArn`. The property overrides for typed properties has been removed, instead users can now directly access CloudFormation properties on the class. Fixes #2100 --- .../@aws-cdk/aws-apigateway/lib/deployment.ts | 2 +- .../@aws-cdk/aws-apigateway/lib/resource.ts | 2 +- .../@aws-cdk/aws-apigateway/lib/restapi.ts | 2 +- .../@aws-cdk/aws-apigateway/lib/vpc-link.ts | 4 +- .../aws-apigateway/test/test.resource.ts | 2 +- .../lib/scalable-target.ts | 4 +- .../lib/step-scaling-action.ts | 4 +- .../lib/target-tracking-scaling-policy.ts | 4 +- .../aws-autoscaling/lib/auto-scaling-group.ts | 2 +- .../aws-autoscaling/lib/lifecycle-hook.ts | 2 +- .../lib/step-scaling-action.ts | 4 +- .../lib/target-tracking-scaling-policy.ts | 2 +- .../aws-certificatemanager/lib/certificate.ts | 2 +- .../aws-cloudformation/lib/custom-resource.ts | 2 +- .../aws-cloudfront/lib/web_distribution.ts | 4 +- .../test/integ.cloudfront-s3.ts | 4 +- packages/@aws-cdk/aws-cloudtrail/lib/index.ts | 8 +- packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts | 4 +- .../@aws-cdk/aws-codebuild/lib/project.ts | 4 +- .../@aws-cdk/aws-codecommit/lib/repository.ts | 8 +- .../lib/lambda/deployment-group.ts | 4 +- .../lib/server/deployment-group.ts | 2 +- .../@aws-cdk/aws-codepipeline/lib/pipeline.ts | 2 +- .../aws-cognito/lib/user-pool-client.ts | 8 +- .../@aws-cdk/aws-cognito/lib/user-pool.ts | 8 +- packages/@aws-cdk/aws-config/lib/rule.ts | 16 +- packages/@aws-cdk/aws-dynamodb/lib/table.ts | 6 +- .../@aws-cdk/aws-ec2/lib/security-group.ts | 6 +- packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts | 16 +- packages/@aws-cdk/aws-ec2/lib/vpc.ts | 32 +- packages/@aws-cdk/aws-ec2/lib/vpn.ts | 6 +- packages/@aws-cdk/aws-ec2/test/test.vpc.ts | 2 +- packages/@aws-cdk/aws-ecr/lib/repository.ts | 4 +- .../@aws-cdk/aws-ecs/lib/base/base-service.ts | 4 +- .../aws-ecs/lib/base/task-definition.ts | 4 +- packages/@aws-cdk/aws-ecs/lib/cluster.ts | 4 +- packages/@aws-cdk/aws-eks/lib/cluster.ts | 8 +- .../lib/load-balancer.ts | 10 +- .../lib/shared/base-load-balancer.ts | 10 +- .../lib/shared/base-target-group.ts | 8 +- packages/@aws-cdk/aws-events/lib/rule.ts | 4 +- packages/@aws-cdk/aws-glue/lib/database.ts | 2 +- packages/@aws-cdk/aws-glue/lib/table.ts | 2 +- packages/@aws-cdk/aws-iam/lib/group.ts | 8 +- packages/@aws-cdk/aws-iam/lib/role.ts | 6 +- packages/@aws-cdk/aws-iam/lib/user.ts | 4 +- packages/@aws-cdk/aws-kinesis/lib/stream.ts | 4 +- packages/@aws-cdk/aws-kms/lib/key.ts | 2 +- packages/@aws-cdk/aws-lambda/lib/alias.ts | 4 +- packages/@aws-cdk/aws-lambda/lib/function.ts | 2 +- .../@aws-cdk/aws-lambda/lib/lambda-version.ts | 4 +- packages/@aws-cdk/aws-lambda/lib/layers.ts | 2 +- .../aws-logs/lib/cross-account-destination.ts | 4 +- packages/@aws-cdk/aws-logs/lib/log-group.ts | 4 +- packages/@aws-cdk/aws-logs/lib/log-stream.ts | 2 +- packages/@aws-cdk/aws-rds/lib/cluster.ts | 8 +- packages/@aws-cdk/aws-rds/lib/instance.ts | 32 +- packages/@aws-cdk/aws-rds/lib/option-group.ts | 2 +- .../@aws-cdk/aws-rds/lib/parameter-group.ts | 6 +- .../@aws-cdk/aws-route53/lib/hosted-zone.ts | 2 +- packages/@aws-cdk/aws-s3/lib/bucket.ts | 12 +- .../@aws-cdk/aws-secretsmanager/lib/secret.ts | 6 +- .../lib/alias-target-instance.ts | 2 +- .../lib/cname-instance.ts | 2 +- .../lib/http-namespace.ts | 4 +- .../aws-servicediscovery/lib/ip-instance.ts | 2 +- .../lib/non-ip-instance.ts | 2 +- .../lib/private-dns-namespace.ts | 4 +- .../lib/public-dns-namespace.ts | 4 +- .../aws-servicediscovery/lib/service.ts | 6 +- .../@aws-cdk/aws-ses/lib/receipt-rule-set.ts | 2 +- packages/@aws-cdk/aws-ses/lib/receipt-rule.ts | 2 +- packages/@aws-cdk/aws-sns/lib/topic.ts | 2 +- packages/@aws-cdk/aws-sqs/lib/queue.ts | 4 +- packages/@aws-cdk/aws-ssm/lib/parameter.ts | 12 +- .../aws-stepfunctions/lib/activity.ts | 4 +- .../aws-stepfunctions/lib/state-machine.ts | 4 +- packages/@aws-cdk/cdk/lib/cfn-resource.ts | 73 +- packages/@aws-cdk/cdk/test/test.resource.ts | 55 +- packages/@aws-cdk/cdk/test/test.tag-aspect.ts | 6 +- .../build-tools/add-missing-refkinds.ts | 60 - .../cfnspec/build-tools/set-refkind.ts | 44 - .../@aws-cdk/cfnspec/lib/schema/property.ts | 11 +- packages/@aws-cdk/cfnspec/package.json | 1 - .../spec-source/600_RefKinds_patch.json | 4864 ----------------- tools/awslint/lib/rules/cfn-resource.ts | 15 +- tools/awslint/lib/rules/construct.ts | 2 +- tools/awslint/lib/rules/resource.ts | 11 +- tools/cfn2ts/lib/codegen.ts | 175 +- tools/cfn2ts/lib/genspec.ts | 44 +- 90 files changed, 417 insertions(+), 5352 deletions(-) delete mode 100644 packages/@aws-cdk/cfnspec/build-tools/add-missing-refkinds.ts delete mode 100644 packages/@aws-cdk/cfnspec/build-tools/set-refkind.ts delete mode 100644 packages/@aws-cdk/cfnspec/spec-source/600_RefKinds_patch.json diff --git a/packages/@aws-cdk/aws-apigateway/lib/deployment.ts b/packages/@aws-cdk/aws-apigateway/lib/deployment.ts index 13245884277d0..e7f0d0ae7dbe7 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/deployment.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/deployment.ts @@ -76,7 +76,7 @@ export class Deployment extends Resource { } this.api = props.api; - this.deploymentId = Lazy.stringValue({ produce: () => this.resource.deploymentId }); + this.deploymentId = Lazy.stringValue({ produce: () => this.resource.refAsString }); } /** diff --git a/packages/@aws-cdk/aws-apigateway/lib/resource.ts b/packages/@aws-cdk/aws-apigateway/lib/resource.ts index 6bf890eb5a60d..440fac0c1d824 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/resource.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/resource.ts @@ -211,7 +211,7 @@ export class Resource extends ResourceBase { }; const resource = new CfnResource(this, 'Resource', resourceProps); - this.resourceId = resource.resourceId; + this.resourceId = resource.refAsString; this.restApi = props.parent.restApi; // render resource path (special case for root) diff --git a/packages/@aws-cdk/aws-apigateway/lib/restapi.ts b/packages/@aws-cdk/aws-apigateway/lib/restapi.ts index baba37991b047..494547be2633a 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/restapi.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/restapi.ts @@ -228,7 +228,7 @@ export class RestApi extends Resource implements IRestApi { this.configureCloudWatchRole(resource); } - this.root = new RootResource(this, props, resource.restApiRootResourceId); + this.root = new RootResource(this, props, resource.attrRootResourceId); } /** diff --git a/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts b/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts index 00a5fd3ded451..d8cccae9dca9f 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/vpc-link.ts @@ -45,6 +45,6 @@ export class VpcLink extends Resource { targetArns: props.targets.map(nlb => nlb.loadBalancerArn) }); - this.vpcLinkId = cfnResource.vpcLinkId; + this.vpcLinkId = cfnResource.refAsString; } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-apigateway/test/test.resource.ts b/packages/@aws-cdk/aws-apigateway/test/test.resource.ts index 627998d524f3c..c306bcd281098 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.resource.ts +++ b/packages/@aws-cdk/aws-apigateway/test/test.resource.ts @@ -286,4 +286,4 @@ export = { } } -}; \ No newline at end of file +}; diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts index f14695a236043..4e5cad53bcb8d 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/scalable-target.ts @@ -119,7 +119,7 @@ export class ScalableTarget extends Resource implements IScalableTarget { serviceNamespace: props.serviceNamespace }); - this.scalableTargetId = resource.scalableTargetId; + this.scalableTargetId = resource.refAsString; } /** @@ -269,4 +269,4 @@ export enum ServiceNamespace { * Custom Resource */ CustomResource = 'custom-resource', -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts index b9c042022c9be..a77b9860ebaf2 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-action.ts @@ -93,7 +93,7 @@ export class StepScalingAction extends cdk.Construct { } as CfnScalingPolicy.StepScalingPolicyConfigurationProperty }); - this.scalingPolicyArn = resource.scalingPolicyArn; + this.scalingPolicyArn = resource.refAsString; } /** @@ -190,4 +190,4 @@ export interface AdjustmentTier { * @default +Infinity */ readonly upperBound?: number; -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-applicationautoscaling/lib/target-tracking-scaling-policy.ts b/packages/@aws-cdk/aws-applicationautoscaling/lib/target-tracking-scaling-policy.ts index 3e5a6733aeef4..d4c8487474592 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/lib/target-tracking-scaling-policy.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/lib/target-tracking-scaling-policy.ts @@ -141,7 +141,7 @@ export class TargetTrackingScalingPolicy extends cdk.Construct { } }); - this.scalingPolicyArn = resource.scalingPolicyArn; + this.scalingPolicyArn = resource.refAsString; } } @@ -171,4 +171,4 @@ export enum PredefinedMetric { SageMakerVariantInvocationsPerInstance = 'SageMakerVariantInvocationsPerInstance', ECSServiceAverageCPUUtilization = 'ECSServiceAverageCPUUtilization', ECSServiceAverageMemoryUtilization = 'ECSServiceAverageMemoryUtilization', -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts b/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts index 9b2c3e84857d1..e2ad9f9437fbd 100644 --- a/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts +++ b/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts @@ -442,7 +442,7 @@ export class AutoScalingGroup extends AutoScalingGroupBase implements this.autoScalingGroup = new CfnAutoScalingGroup(this, 'ASG', asgProps); this.osType = machineImage.os.type; - this.autoScalingGroupName = this.autoScalingGroup.autoScalingGroupName; + this.autoScalingGroupName = this.autoScalingGroup.refAsString; this.autoScalingGroupArn = Stack.of(this).formatArn({ service: 'autoscaling', resource: 'autoScalingGroup:*:autoScalingGroupName', diff --git a/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook.ts b/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook.ts index 5859f2b969584..9ab2cf235237b 100644 --- a/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook.ts +++ b/packages/@aws-cdk/aws-autoscaling/lib/lifecycle-hook.ts @@ -116,7 +116,7 @@ export class LifecycleHook extends Resource implements ILifecycleHook { // lifecycle hook. resource.node.addDependency(this.role); - this.lifecycleHookName = resource.lifecycleHookName; + this.lifecycleHookName = resource.refAsString; } } diff --git a/packages/@aws-cdk/aws-autoscaling/lib/step-scaling-action.ts b/packages/@aws-cdk/aws-autoscaling/lib/step-scaling-action.ts index a0eeed3f0fca4..fd8a8215006aa 100644 --- a/packages/@aws-cdk/aws-autoscaling/lib/step-scaling-action.ts +++ b/packages/@aws-cdk/aws-autoscaling/lib/step-scaling-action.ts @@ -81,7 +81,7 @@ export class StepScalingAction extends cdk.Construct { stepAdjustments: cdk.Lazy.anyValue({ produce: () => this.adjustments }), }); - this.scalingPolicyArn = resource.scalingPolicyArn; + this.scalingPolicyArn = resource.refAsString; } /** @@ -178,4 +178,4 @@ export interface AdjustmentTier { * @default +Infinity */ readonly upperBound?: number; -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-autoscaling/lib/target-tracking-scaling-policy.ts b/packages/@aws-cdk/aws-autoscaling/lib/target-tracking-scaling-policy.ts index 7074f87d12882..2bf1193c2e352 100644 --- a/packages/@aws-cdk/aws-autoscaling/lib/target-tracking-scaling-policy.ts +++ b/packages/@aws-cdk/aws-autoscaling/lib/target-tracking-scaling-policy.ts @@ -143,7 +143,7 @@ export class TargetTrackingScalingPolicy extends cdk.Construct { } }); - this.scalingPolicyArn = this.resource.scalingPolicyArn; + this.scalingPolicyArn = this.resource.refAsString; } } diff --git a/packages/@aws-cdk/aws-certificatemanager/lib/certificate.ts b/packages/@aws-cdk/aws-certificatemanager/lib/certificate.ts index 4f2f05c215798..0ca9bcbba7f68 100644 --- a/packages/@aws-cdk/aws-certificatemanager/lib/certificate.ts +++ b/packages/@aws-cdk/aws-certificatemanager/lib/certificate.ts @@ -87,7 +87,7 @@ export class Certificate extends Resource implements ICertificate { domainValidationOptions: allDomainNames.map(domainValidationOption), }); - this.certificateArn = cert.certificateArn; + this.certificateArn = cert.refAsString; /** * Return the domain validation options for the given domain diff --git a/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts b/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts index 29746da866f9c..7ee6585420999 100644 --- a/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts +++ b/packages/@aws-cdk/aws-cloudformation/lib/custom-resource.ts @@ -116,7 +116,7 @@ function uppercaseProperties(props: Properties): Properties { function renderResourceType(resourceType?: string) { if (!resourceType) { - return CfnCustomResource.resourceTypeName; + return CfnCustomResource.cfnResourceTypeName; } if (!resourceType.startsWith('Custom::')) { diff --git a/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts index 25eca3e0b9489..75753c2ebf3c9 100644 --- a/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts +++ b/packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts @@ -714,8 +714,8 @@ export class CloudFrontWebDistribution extends cdk.Construct implements IDistrib } const distribution = new CfnDistribution(this, 'CFDistribution', { distributionConfig }); - this.domainName = distribution.distributionDomainName; - this.distributionId = distribution.distributionId; + this.domainName = distribution.attrDomainName; + this.distributionId = distribution.refAsString; } private toBehavior(input: BehaviorWithOrigin, protoPolicy?: ViewerProtocolPolicy) { diff --git a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-s3.ts b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-s3.ts index 8ccc04736a3bb..0dd1f6b89a1ea 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-s3.ts +++ b/packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-s3.ts @@ -17,14 +17,14 @@ const dist = new cloudfront.CloudFrontWebDistribution(stack, 'Distribution', { behaviors: [{ isDefaultBehavior: true }], s3OriginSource: { s3BucketSource: bucket, - originAccessIdentityId: oai.cloudFrontOriginAccessIdentityId, + originAccessIdentityId: oai.refAsString, }, }] }); bucket.addToResourcePolicy(new iam.PolicyStatement({ actions: ['s3:Get*', 's3:List*'], resources: [bucket.bucketArn, bucket.arnForObjects('*')], - principals: [new iam.CanonicalUserPrincipal(oai.cloudFrontOriginAccessIdentityS3CanonicalUserId)] + principals: [new iam.CanonicalUserPrincipal(oai.attrS3CanonicalUserId)], })); new cdk.CfnOutput(stack, 'DistributionDomainName', { value: dist.domainName }); diff --git a/packages/@aws-cdk/aws-cloudtrail/lib/index.ts b/packages/@aws-cdk/aws-cloudtrail/lib/index.ts index 70b04e2099f45..7ca64ae6d0ff7 100644 --- a/packages/@aws-cdk/aws-cloudtrail/lib/index.ts +++ b/packages/@aws-cdk/aws-cloudtrail/lib/index.ts @@ -156,7 +156,7 @@ export class Trail extends Resource { logsRole.addToPolicy(new iam.PolicyStatement({ actions: ["logs:PutLogEvents", "logs:CreateLogStream"], - resources: [logGroup.logGroupArn], + resources: [logGroup.attrArn], })); } if (props.managementEvents) { @@ -177,14 +177,14 @@ export class Trail extends Resource { kmsKeyId: props.kmsKey && props.kmsKey.keyArn, s3BucketName: s3bucket.bucketName, s3KeyPrefix: props.s3KeyPrefix, - cloudWatchLogsLogGroupArn: logGroup && logGroup.logGroupArn, + cloudWatchLogsLogGroupArn: logGroup && logGroup.attrArn, cloudWatchLogsRoleArn: logsRole && logsRole.roleArn, snsTopicName: props.snsTopic, eventSelectors: this.eventSelectors }); - this.trailArn = trail.trailArn; - this.trailSnsTopicArn = trail.trailSnsTopicArn; + this.trailArn = trail.attrArn; + this.trailSnsTopicArn = trail.attrSnsTopicArn; const s3BucketPolicy = s3bucket.node.findChild("Policy").node.findChild("Resource") as s3.CfnBucketPolicy; trail.node.addDependency(s3BucketPolicy); diff --git a/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts b/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts index 52097fc45b6e6..249d4bc81f16e 100644 --- a/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts +++ b/packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts @@ -141,8 +141,8 @@ export class Alarm extends Resource implements IAlarm { ...metricJson(props.metric) }); - this.alarmArn = alarm.alarmArn; - this.alarmName = alarm.alarmName; + this.alarmArn = alarm.attrArn; + this.alarmName = alarm.refAsString; this.metric = props.metric; this.annotation = { // tslint:disable-next-line:max-line-length diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 0fb8136fb8de5..96f411214d662 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -706,8 +706,8 @@ export class Project extends ProjectBase { }); const resourceIdentifiers = new ResourceIdentifiers(this, { - arn: resource.projectArn, - name: resource.projectName, + arn: resource.attrArn, + name: resource.refAsString, arnComponents: { service: 'codebuild', resource: 'project', diff --git a/packages/@aws-cdk/aws-codecommit/lib/repository.ts b/packages/@aws-cdk/aws-codecommit/lib/repository.ts index 1e3d2b7c7ada7..cbd32c91bb936 100644 --- a/packages/@aws-cdk/aws-codecommit/lib/repository.ts +++ b/packages/@aws-cdk/aws-codecommit/lib/repository.ts @@ -284,19 +284,19 @@ export class Repository extends RepositoryBase { } public get repositoryArn() { - return this.repository.repositoryArn; + return this.repository.attrArn; } public get repositoryCloneUrlHttp() { - return this.repository.repositoryCloneUrlHttp; + return this.repository.attrCloneUrlHttp; } public get repositoryCloneUrlSsh() { - return this.repository.repositoryCloneUrlSsh; + return this.repository.attrCloneUrlSsh; } public get repositoryName() { - return this.repository.repositoryName; + return this.repository.attrName; } /** diff --git a/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts index 1befdb56f5093..fc3cfad6f4179 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts @@ -166,7 +166,7 @@ export class LambdaDeploymentGroup extends cdk.Resource implements ILambdaDeploy autoRollbackConfiguration: cdk.Lazy.anyValue({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }), }); - this.deploymentGroupName = resource.deploymentGroupName; + this.deploymentGroupName = resource.refAsString; this.deploymentGroupArn = arnForDeploymentGroup(this.application.applicationName, this.deploymentGroupName); if (props.preHook) { @@ -179,7 +179,7 @@ export class LambdaDeploymentGroup extends cdk.Resource implements ILambdaDeploy (props.alias.node.findChild('Resource') as lambda.CfnAlias).options.updatePolicy = { codeDeployLambdaAliasUpdate: { applicationName: this.application.applicationName, - deploymentGroupName: resource.deploymentGroupName, + deploymentGroupName: resource.refAsString, beforeAllowTrafficHook: cdk.Lazy.stringValue({ produce: () => this.preHook && this.preHook.functionName }), afterAllowTrafficHook: cdk.Lazy.stringValue({ produce: () => this.postHook && this.postHook.functionName }), } diff --git a/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts index 53cd780aa134f..77d5831cef0b9 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts @@ -303,7 +303,7 @@ export class ServerDeploymentGroup extends ServerDeploymentGroupBase { autoRollbackConfiguration: cdk.Lazy.anyValue({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }), }); - this.deploymentGroupName = resource.deploymentGroupName; + this.deploymentGroupName = resource.refAsString; this.deploymentGroupArn = arnForDeploymentGroup(this.application.applicationName, this.deploymentGroupName); } diff --git a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts index c32b587daa7db..890355bd8e29e 100644 --- a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts +++ b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts @@ -256,7 +256,7 @@ export class Pipeline extends PipelineBase { this.artifactBucket.grantReadWrite(this.role); this.pipelineName = codePipeline.refAsString; - this.pipelineVersion = codePipeline.pipelineVersion; + this.pipelineVersion = codePipeline.attrVersion; this.crossRegionReplicationBuckets = props.crossRegionReplicationBuckets || {}; this.artifactStores = {}; diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts index c8ff0eda0e111..4d60cd828b4c5 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts @@ -76,8 +76,8 @@ export class UserPoolClient extends Resource { explicitAuthFlows: props.enabledAuthFlows }); - this.userPoolClientId = resource.userPoolClientId; - this.userPoolClientClientSecret = resource.userPoolClientClientSecret; - this.userPoolClientName = resource.userPoolClientName; + this.userPoolClientId = resource.refAsString; + this.userPoolClientClientSecret = resource.attrClientSecret; + this.userPoolClientName = resource.attrName; } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts index dd59ca6d6fea7..a02db19683011 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool.ts @@ -395,10 +395,10 @@ export class UserPool extends Resource implements IUserPool { autoVerifiedAttributes: props.autoVerifiedAttributes, lambdaConfig: Lazy.anyValue({ produce: () => this.triggers }) }); - this.userPoolId = userPool.userPoolId; - this.userPoolArn = userPool.userPoolArn; - this.userPoolProviderName = userPool.userPoolProviderName; - this.userPoolProviderUrl = userPool.userPoolProviderUrl; + this.userPoolId = userPool.refAsString; + this.userPoolArn = userPool.attrArn; + this.userPoolProviderName = userPool.attrProviderName; + this.userPoolProviderUrl = userPool.attrProviderUrl; } /** diff --git a/packages/@aws-cdk/aws-config/lib/rule.ts b/packages/@aws-cdk/aws-config/lib/rule.ts index c1910f1c23d4b..e41ea24a889a6 100644 --- a/packages/@aws-cdk/aws-config/lib/rule.ts +++ b/packages/@aws-cdk/aws-config/lib/rule.ts @@ -262,10 +262,10 @@ export class ManagedRule extends RuleNew { } }); - this.configRuleName = rule.configRuleName; - this.configRuleArn = rule.configRuleArn; - this.configRuleId = rule.configRuleId; - this.configRuleComplianceType = rule.configRuleComplianceType; + this.configRuleName = rule.refAsString; + this.configRuleArn = rule.attrArn; + this.configRuleId = rule.attrConfigRuleId; + this.configRuleComplianceType = rule.attrComplianceType; this.isManaged = true; } @@ -366,10 +366,10 @@ export class CustomRule extends RuleNew { } }); - this.configRuleName = rule.configRuleName; - this.configRuleArn = rule.configRuleArn; - this.configRuleId = rule.configRuleId; - this.configRuleComplianceType = rule.configRuleComplianceType; + this.configRuleName = rule.refAsString; + this.configRuleArn = rule.attrArn; + this.configRuleId = rule.attrConfigRuleId; + this.configRuleComplianceType = rule.attrComplianceType; if (props.configurationChanges) { this.isCustomWithChanges = true; diff --git a/packages/@aws-cdk/aws-dynamodb/lib/table.ts b/packages/@aws-cdk/aws-dynamodb/lib/table.ts index 7a82d95e8c646..f5ff1c6f7768d 100644 --- a/packages/@aws-cdk/aws-dynamodb/lib/table.ts +++ b/packages/@aws-cdk/aws-dynamodb/lib/table.ts @@ -248,9 +248,9 @@ export class Table extends Resource { if (props.tableName) { this.node.addMetadata('aws:cdk:hasPhysicalName', props.tableName); } - this.tableArn = this.table.tableArn; - this.tableName = this.table.tableName; - this.tableStreamArn = this.table.tableStreamArn; + this.tableArn = this.table.attrArn; + this.tableName = this.table.refAsString; + this.tableStreamArn = this.table.attrStreamArn; this.scalingRole = this.makeScalingRole(); diff --git a/packages/@aws-cdk/aws-ec2/lib/security-group.ts b/packages/@aws-cdk/aws-ec2/lib/security-group.ts index 31f6946d92ea2..8bd0948c75d0e 100644 --- a/packages/@aws-cdk/aws-ec2/lib/security-group.ts +++ b/packages/@aws-cdk/aws-ec2/lib/security-group.ts @@ -280,9 +280,9 @@ export class SecurityGroup extends SecurityGroupBase { vpcId: props.vpc.vpcId, }); - this.securityGroupId = this.securityGroup.securityGroupId; - this.securityGroupVpcId = this.securityGroup.securityGroupVpcId; - this.securityGroupName = this.securityGroup.securityGroupName; + this.securityGroupId = this.securityGroup.attrGroupId; + this.securityGroupVpcId = this.securityGroup.attrVpcId; + this.securityGroupName = this.securityGroup.refAsString; this.addDefaultEgressRule(); } diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts index 227ab0aac1596..9582322ca133d 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts @@ -179,10 +179,10 @@ export class GatewayVpcEndpoint extends VpcEndpoint implements IGatewayVpcEndpoi vpcId: props.vpc.vpcId }); - this.vpcEndpointId = endpoint.vpcEndpointId; - this.vpcEndpointCreationTimestamp = endpoint.vpcEndpointCreationTimestamp; - this.vpcEndpointDnsEntries = endpoint.vpcEndpointDnsEntries; - this.vpcEndpointNetworkInterfaceIds = endpoint.vpcEndpointNetworkInterfaceIds; + this.vpcEndpointId = endpoint.refAsString; + this.vpcEndpointCreationTimestamp = endpoint.attrCreationTimestamp; + this.vpcEndpointDnsEntries = endpoint.attrDnsEntries; + this.vpcEndpointNetworkInterfaceIds = endpoint.attrNetworkInterfaceIds; } } @@ -381,10 +381,10 @@ export class InterfaceVpcEndpoint extends VpcEndpoint implements IInterfaceVpcEn vpcId: props.vpc.vpcId }); - this.vpcEndpointId = endpoint.vpcEndpointId; - this.vpcEndpointCreationTimestamp = endpoint.vpcEndpointCreationTimestamp; - this.vpcEndpointDnsEntries = endpoint.vpcEndpointDnsEntries; - this.vpcEndpointNetworkInterfaceIds = endpoint.vpcEndpointNetworkInterfaceIds; + this.vpcEndpointId = endpoint.refAsString; + this.vpcEndpointCreationTimestamp = endpoint.attrCreationTimestamp; + this.vpcEndpointDnsEntries = endpoint.attrDnsEntries; + this.vpcEndpointNetworkInterfaceIds = endpoint.attrNetworkInterfaceIds; } } diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc.ts b/packages/@aws-cdk/aws-ec2/lib/vpc.ts index ff468d5408679..b8bf5f146ce68 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc.ts @@ -781,11 +781,11 @@ export class Vpc extends VpcBase { instanceTenancy, }); - this.vpcDefaultNetworkAcl = this.resource.vpcDefaultNetworkAcl; - this.vpcCidrBlockAssociations = this.resource.vpcCidrBlockAssociations; - this.vpcCidrBlock = this.resource.vpcCidrBlock; - this.vpcDefaultSecurityGroup = this.resource.vpcDefaultSecurityGroup; - this.vpcIpv6CidrBlocks = this.resource.vpcIpv6CidrBlocks; + this.vpcDefaultNetworkAcl = this.resource.attrDefaultNetworkAcl; + this.vpcCidrBlockAssociations = this.resource.attrCidrBlockAssociations; + this.vpcCidrBlock = this.resource.attrCidrBlock; + this.vpcDefaultSecurityGroup = this.resource.attrDefaultSecurityGroup; + this.vpcIpv6CidrBlocks = this.resource.attrIpv6CidrBlocks; this.node.applyAspect(new cdk.Tag(NAME_TAG, this.node.path)); @@ -794,7 +794,7 @@ export class Vpc extends VpcBase { const maxAZs = props.maxAZs !== undefined ? props.maxAZs : 3; this.availabilityZones = this.availabilityZones.slice(0, maxAZs); - this.vpcId = this.resource.vpcId; + this.vpcId = this.resource.refAsString; this.subnetConfiguration = ifUndefined(props.subnetConfiguration, Vpc.DEFAULT_SUBNETS); // subnetConfiguration and natGateways must be set before calling createSubnets @@ -843,10 +843,10 @@ export class Vpc extends VpcBase { const attachment = new CfnVPCGatewayAttachment(this, 'VPCVPNGW', { vpcId: this.vpcId, - vpnGatewayId: vpnGateway.vpnGatewayName + vpnGatewayId: vpnGateway.refAsString, }); - this.vpnGatewayId = vpnGateway.vpnGatewayName; + this.vpnGatewayId = vpnGateway.refAsString; // Propagate routes on route tables associated with the right subnets const vpnRoutePropagation = props.vpnRoutePropagation || [{ subnetType: SubnetType.Private }]; @@ -933,7 +933,7 @@ export class Vpc extends VpcBase { natSubnets = natSubnets.slice(0, natCount); for (const sub of natSubnets) { const gateway = sub.addNatGateway(); - this.natGatewayByAZ[sub.availabilityZone] = gateway.natGatewayId; + this.natGatewayByAZ[sub.availabilityZone] = gateway.refAsString; this.natDependencies.push(gateway); } } @@ -998,7 +998,7 @@ export class Vpc extends VpcBase { } // These values will be used to recover the config upon provider import - const includeResourceTypes = [CfnSubnet.resourceTypeName]; + const includeResourceTypes = [CfnSubnet.cfnResourceTypeName]; subnet.node.applyAspect(new cdk.Tag(SUBNETNAME_TAG, subnetConfig.name, {includeResourceTypes})); subnet.node.applyAspect(new cdk.Tag(SUBNETTYPE_TAG, subnetTypeTagValue(subnetConfig.subnetType), {includeResourceTypes})); }); @@ -1115,11 +1115,11 @@ export class Subnet extends cdk.Resource implements ISubnet { availabilityZone: props.availabilityZone, mapPublicIpOnLaunch: props.mapPublicIpOnLaunch, }); - this.subnetId = subnet.subnetId; - this.subnetVpcId = subnet.subnetVpcId; - this.subnetAvailabilityZone = subnet.subnetAvailabilityZone; - this.subnetIpv6CidrBlocks = subnet.subnetIpv6CidrBlocks; - this.subnetNetworkAclAssociationId = subnet.subnetNetworkAclAssociationId; + this.subnetId = subnet.refAsString; + this.subnetVpcId = subnet.attrVpcId; + this.subnetAvailabilityZone = subnet.attrAvailabilityZone; + this.subnetIpv6CidrBlocks = subnet.attrIpv6CidrBlocks; + this.subnetNetworkAclAssociationId = subnet.attrNetworkAclAssociationId; const table = new CfnRouteTable(this, 'RouteTable', { vpcId: props.vpcId, @@ -1203,7 +1203,7 @@ export class PublicSubnet extends Subnet implements IPublicSubnet { subnetId: this.subnetId, allocationId: new CfnEIP(this, `EIP`, { domain: 'vpc' - }).eipAllocationId, + }).attrAllocationId, }); return ngw; } diff --git a/packages/@aws-cdk/aws-ec2/lib/vpn.ts b/packages/@aws-cdk/aws-ec2/lib/vpn.ts index b607dddc22a93..63e4a2fd562c0 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpn.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpn.ts @@ -162,7 +162,7 @@ export class VpnConnection extends cdk.Construct implements IVpnConnection { type }); - this.customerGatewayId = customerGateway.customerGatewayName; + this.customerGatewayId = customerGateway.refAsString; this.customerGatewayAsn = bgpAsn; this.customerGatewayIp = props.ip; @@ -199,13 +199,13 @@ export class VpnConnection extends cdk.Construct implements IVpnConnection { const vpnConnection = new CfnVPNConnection(this, 'Resource', { type, - customerGatewayId: customerGateway.customerGatewayName, + customerGatewayId: customerGateway.refAsString, staticRoutesOnly: props.staticRoutes ? true : false, vpnGatewayId: props.vpc.vpnGatewayId, vpnTunnelOptionsSpecifications: props.tunnelOptions }); - this.vpnId = vpnConnection.vpnConnectionName; + this.vpnId = vpnConnection.refAsString; if (props.staticRoutes) { props.staticRoutes.forEach(route => { diff --git a/packages/@aws-cdk/aws-ec2/test/test.vpc.ts b/packages/@aws-cdk/aws-ec2/test/test.vpc.ts index 7d4f011a25686..4600d5721f0d3 100644 --- a/packages/@aws-cdk/aws-ec2/test/test.vpc.ts +++ b/packages/@aws-cdk/aws-ec2/test/test.vpc.ts @@ -565,7 +565,7 @@ export = { const vpc = new Vpc(stack, 'TheVPC'); // overwrite to set propagate - vpc.node.applyAspect(new Tag('BusinessUnit', 'Marketing', {includeResourceTypes: [CfnVPC.resourceTypeName]})); + vpc.node.applyAspect(new Tag('BusinessUnit', 'Marketing', {includeResourceTypes: [CfnVPC.cfnResourceTypeName]})); vpc.node.applyAspect(new Tag('VpcType', 'Good')); expect(stack).to(haveResource("AWS::EC2::VPC", hasTags(toCfnTags(allTags)))); const taggables = ['Subnet', 'InternetGateway', 'NatGateway', 'RouteTable']; diff --git a/packages/@aws-cdk/aws-ecr/lib/repository.ts b/packages/@aws-cdk/aws-ecr/lib/repository.ts index d8227d75edced..ac33bbc458a27 100644 --- a/packages/@aws-cdk/aws-ecr/lib/repository.ts +++ b/packages/@aws-cdk/aws-ecr/lib/repository.ts @@ -356,8 +356,8 @@ export class Repository extends RepositoryBase { props.lifecycleRules.forEach(this.addLifecycleRule.bind(this)); } - this.repositoryName = resource.repositoryName; - this.repositoryArn = resource.repositoryArn; + this.repositoryName = resource.refAsString; + this.repositoryArn = resource.attrArn; } public addToResourcePolicy(statement: iam.PolicyStatement) { diff --git a/packages/@aws-cdk/aws-ecs/lib/base/base-service.ts b/packages/@aws-cdk/aws-ecs/lib/base/base-service.ts index ff2c41da4eaa8..a7f22e24836f5 100644 --- a/packages/@aws-cdk/aws-ecs/lib/base/base-service.ts +++ b/packages/@aws-cdk/aws-ecs/lib/base/base-service.ts @@ -158,14 +158,14 @@ export abstract class BaseService extends Resource ...additionalProps }); - this.serviceArn = this.resource.serviceArn; + this.serviceArn = this.resource.refAsString; // This is a workaround for CFN bug that returns the cluster name instead of the service name when long ARN formats // are enabled for the principal in a given region. const longArnEnabled = props.longArnEnabled !== undefined ? props.longArnEnabled : false; this.serviceName = longArnEnabled ? cdk.Fn.select(2, cdk.Fn.split('/', this.serviceArn)) - : this.resource.serviceName; + : this.resource.attrName; this.clusterName = clusterName; this.cluster = props.cluster; diff --git a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts index fa1e6419f699d..0b99b08e229de 100644 --- a/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/base/task-definition.ts @@ -283,7 +283,7 @@ export class TaskDefinition extends TaskDefinitionBase { props.placementConstraints.forEach(pc => this.addPlacementConstraint(pc)); } - this.taskDefinitionArn = taskDef.taskDefinitionArn; + this.taskDefinitionArn = taskDef.refAsString; } public get executionRole(): iam.IRole | undefined { @@ -533,4 +533,4 @@ function isEc2Compatible(compatibility: Compatibility): boolean { */ function isFargateCompatible(compatibility: Compatibility): boolean { return [Compatibility.Fargate, Compatibility.Ec2AndFargate].includes(compatibility); -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-ecs/lib/cluster.ts b/packages/@aws-cdk/aws-ecs/lib/cluster.ts index d1714637a1fb5..4ac0dcbffb6a4 100644 --- a/packages/@aws-cdk/aws-ecs/lib/cluster.ts +++ b/packages/@aws-cdk/aws-ecs/lib/cluster.ts @@ -71,8 +71,8 @@ export class Cluster extends Resource implements ICluster { const cluster = new CfnCluster(this, 'Resource', {clusterName: props.clusterName}); this.vpc = props.vpc; - this.clusterArn = cluster.clusterArn; - this.clusterName = cluster.clusterName; + this.clusterArn = cluster.attrArn; + this.clusterName = cluster.refAsString; } /** diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index c33c1bdae2fc8..17f93dc3b1acd 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -238,10 +238,10 @@ export class Cluster extends Resource implements ICluster { } }); - this.clusterName = resource.clusterName; - this.clusterArn = resource.clusterArn; - this.clusterEndpoint = resource.clusterEndpoint; - this.clusterCertificateAuthorityData = resource.clusterCertificateAuthorityData; + this.clusterName = resource.refAsString; + this.clusterArn = resource.attrArn; + this.clusterEndpoint = resource.attrEndpoint; + this.clusterCertificateAuthorityData = resource.attrCertificateAuthorityData; new CfnOutput(this, 'ClusterName', { value: this.clusterName, disableExport: true }); } diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts index 5eda1e6af5eb7..a868047bbc65e 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts @@ -299,35 +299,35 @@ export class LoadBalancer extends Resource implements IConnectable { * @attribute */ public get loadBalancerCanonicalHostedZoneNameId() { - return this.elb.loadBalancerCanonicalHostedZoneNameId; + return this.elb.attrCanonicalHostedZoneNameId; } /** * @attribute */ public get loadBalancerCanonicalHostedZoneName() { - return this.elb.loadBalancerCanonicalHostedZoneName; + return this.elb.attrCanonicalHostedZoneName; } /** * @attribute */ public get loadBalancerDnsName() { - return this.elb.loadBalancerDnsName; + return this.elb.attrDnsName; } /** * @attribute */ public get loadBalancerSourceSecurityGroupGroupName() { - return this.elb.loadBalancerSourceSecurityGroupGroupName; + return this.elb.attrSourceSecurityGroupGroupName; } /** * @attribute */ public get loadBalancerSourceSecurityGroupOwnerAlias() { - return this.elb.loadBalancerSourceSecurityGroupOwnerAlias; + return this.elb.attrSourceSecurityGroupOwnerAlias; } /** diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts index d4af6cf547020..df5d192847a25 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts @@ -145,12 +145,12 @@ export abstract class BaseLoadBalancer extends Resource { if (baseProps.deletionProtection) { this.setAttribute('deletion_protection.enabled', 'true'); } - this.loadBalancerCanonicalHostedZoneId = resource.loadBalancerCanonicalHostedZoneId; - this.loadBalancerDnsName = resource.loadBalancerDnsName; - this.loadBalancerFullName = resource.loadBalancerFullName; - this.loadBalancerName = resource.loadBalancerName; + this.loadBalancerCanonicalHostedZoneId = resource.attrCanonicalHostedZoneId; + this.loadBalancerDnsName = resource.attrDnsName; + this.loadBalancerFullName = resource.attrLoadBalancerFullName; + this.loadBalancerName = resource.attrLoadBalancerName; this.loadBalancerArn = resource.refAsString; - this.loadBalancerSecurityGroups = resource.loadBalancerSecurityGroups; + this.loadBalancerSecurityGroups = resource.attrSecurityGroups; } /** diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts index 930487f9bae5c..af25fbd28c211 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts @@ -233,11 +233,11 @@ export abstract class TargetGroupBase extends cdk.Construct implements ITargetGr ...additionalProps }); - this.targetGroupLoadBalancerArns = this.resource.targetGroupLoadBalancerArns; + this.targetGroupLoadBalancerArns = this.resource.attrLoadBalancerArns; this.targetGroupArn = this.resource.refAsString; - this.targetGroupFullName = this.resource.targetGroupFullName; - this.loadBalancerArns = this.resource.targetGroupLoadBalancerArns.toString(); - this.targetGroupName = this.resource.targetGroupName; + this.targetGroupFullName = this.resource.attrTargetGroupFullName; + this.loadBalancerArns = this.resource.attrLoadBalancerArns.toString(); + this.targetGroupName = this.resource.attrTargetGroupName; this.defaultPort = additionalProps.port; } diff --git a/packages/@aws-cdk/aws-events/lib/rule.ts b/packages/@aws-cdk/aws-events/lib/rule.ts index f4e0c0819a124..271490f69e2b0 100644 --- a/packages/@aws-cdk/aws-events/lib/rule.ts +++ b/packages/@aws-cdk/aws-events/lib/rule.ts @@ -101,7 +101,7 @@ export class Rule extends Resource implements IRule { targets: Lazy.anyValue({ produce: () => this.renderTargets() }), }); - this.ruleArn = resource.ruleArn; + this.ruleArn = resource.attrArn; this.addEventPattern(props.eventPattern); this.scheduleExpression = props.scheduleExpression; @@ -233,4 +233,4 @@ function sanitizeId(id: string) { const _id = id.replace(/[^\.\-_A-Za-z0-9]/g, '-'); // cut to 64 chars to respect AWS::Events::Rule Target Id field specification return _id.substring(Math.max(_id.length - 64, 0), _id.length); -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-glue/lib/database.ts b/packages/@aws-cdk/aws-glue/lib/database.ts index 5bc505944f584..2773a9ba271ca 100644 --- a/packages/@aws-cdk/aws-glue/lib/database.ts +++ b/packages/@aws-cdk/aws-glue/lib/database.ts @@ -105,7 +105,7 @@ export class Database extends Resource implements IDatabase { }); // see https://docs.aws.amazon.com/glue/latest/dg/glue-specifying-resource-arns.html#data-catalog-resource-arns - this.databaseName = resource.databaseName; + this.databaseName = resource.refAsString; this.databaseArn = Stack.of(this).formatArn({ service: 'glue', resource: 'database', diff --git a/packages/@aws-cdk/aws-glue/lib/table.ts b/packages/@aws-cdk/aws-glue/lib/table.ts index 51d2de06f2fb2..77e261f980eb9 100644 --- a/packages/@aws-cdk/aws-glue/lib/table.ts +++ b/packages/@aws-cdk/aws-glue/lib/table.ts @@ -276,7 +276,7 @@ export class Table extends Resource implements ITable { } }); - this.tableName = tableResource.tableName; + this.tableName = tableResource.refAsString; this.tableArn = Stack.of(this).formatArn({ service: 'glue', resource: 'table', diff --git a/packages/@aws-cdk/aws-iam/lib/group.ts b/packages/@aws-cdk/aws-iam/lib/group.ts index 0943349591f9f..5c25d9092dbaa 100644 --- a/packages/@aws-cdk/aws-iam/lib/group.ts +++ b/packages/@aws-cdk/aws-iam/lib/group.ts @@ -10,11 +10,15 @@ import { AttachedPolicies } from './util'; export interface IGroup extends IIdentity { /** + * Returns the IAM Group Name + * * @attribute */ readonly groupName: string; /** + * Returns the IAM Group ARN + * * @attribute */ readonly groupArn: string; @@ -132,8 +136,8 @@ export class Group extends GroupBase { path: props.path, }); - this.groupName = group.groupName; - this.groupArn = group.groupArn; + this.groupName = group.refAsString; + this.groupArn = group.attrArn; } /** diff --git a/packages/@aws-cdk/aws-iam/lib/role.ts b/packages/@aws-cdk/aws-iam/lib/role.ts index cdd70d551e563..0a51516ee4252 100644 --- a/packages/@aws-cdk/aws-iam/lib/role.ts +++ b/packages/@aws-cdk/aws-iam/lib/role.ts @@ -218,10 +218,10 @@ export class Role extends Resource implements IRole { maxSessionDuration: props.maxSessionDurationSec, }); - this.roleId = role.roleId; + this.roleId = role.attrRoleId; const resourceIdentifiers = new ResourceIdentifiers(this, { - arn: role.roleArn, - name: role.roleName, + arn: role.attrArn, + name: role.refAsString, arnComponents: { region: '', // IAM is global in each partition service: 'iam', diff --git a/packages/@aws-cdk/aws-iam/lib/user.ts b/packages/@aws-cdk/aws-iam/lib/user.ts index 04c8918348f66..7725b8269141d 100644 --- a/packages/@aws-cdk/aws-iam/lib/user.ts +++ b/packages/@aws-cdk/aws-iam/lib/user.ts @@ -113,8 +113,8 @@ export class User extends Resource implements IIdentity { loginProfile: this.parseLoginProfile(props) }); - this.userName = user.userName; - this.userArn = user.userArn; + this.userName = user.refAsString; + this.userArn = user.attrArn; this.policyFragment = new ArnPrincipal(this.userArn).policyFragment; if (props.groups) { diff --git a/packages/@aws-cdk/aws-kinesis/lib/stream.ts b/packages/@aws-cdk/aws-kinesis/lib/stream.ts index 7de1d50ff6793..eedde8e6c2e39 100644 --- a/packages/@aws-cdk/aws-kinesis/lib/stream.ts +++ b/packages/@aws-cdk/aws-kinesis/lib/stream.ts @@ -257,8 +257,8 @@ export class Stream extends StreamBase { shardCount, streamEncryption }); - this.streamArn = this.stream.streamArn; - this.streamName = this.stream.streamId; + this.streamArn = this.stream.attrArn; + this.streamName = this.stream.refAsString; this.encryptionKey = encryptionKey; if (props.streamName) { this.node.addMetadata('aws:cdk:hasPhysicalName', props.streamName); } diff --git a/packages/@aws-cdk/aws-kms/lib/key.ts b/packages/@aws-cdk/aws-kms/lib/key.ts index 8deba0e077386..b0232238c3ccd 100644 --- a/packages/@aws-cdk/aws-kms/lib/key.ts +++ b/packages/@aws-cdk/aws-kms/lib/key.ts @@ -224,7 +224,7 @@ export class Key extends KeyBase { keyPolicy: this.policy, }); - this.keyArn = resource.keyArn; + this.keyArn = resource.attrArn; resource.options.deletionPolicy = props.retain === false ? DeletionPolicy.Delete : DeletionPolicy.Retain; diff --git a/packages/@aws-cdk/aws-lambda/lib/alias.ts b/packages/@aws-cdk/aws-lambda/lib/alias.ts index 071b69efd1bf4..59b02da68b1cb 100644 --- a/packages/@aws-cdk/aws-lambda/lib/alias.ts +++ b/packages/@aws-cdk/aws-lambda/lib/alias.ts @@ -131,8 +131,8 @@ export class Alias extends QualifiedFunctionBase implements IAlias { // ARN parsing splits on `:`, so we can only get the function's name from the ARN as resourceName... // And we're parsing it out (instead of using the underlying function directly) in order to have use of it incur // an implicit dependency on the resource. - this.functionName = `${Stack.of(this).parseArn(alias.aliasArn, ":").resourceName!}:${props.aliasName}`; - this.functionArn = alias.aliasArn; + this.functionName = `${Stack.of(this).parseArn(alias.refAsString, ":").resourceName!}:${props.aliasName}`; + this.functionArn = alias.refAsString; } public get grantPrincipal() { diff --git a/packages/@aws-cdk/aws-lambda/lib/function.ts b/packages/@aws-cdk/aws-lambda/lib/function.ts index 370ae4710b3ee..f880d2816f16d 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function.ts @@ -436,7 +436,7 @@ export class Function extends FunctionBase { resource.node.addDependency(this.role); this.functionName = resource.refAsString; - this.functionArn = resource.functionArn; + this.functionArn = resource.attrArn; this.runtime = props.runtime; // allow code to bind to stack. diff --git a/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts b/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts index 73cf99db7c808..fe354288e383e 100644 --- a/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts +++ b/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts @@ -104,8 +104,8 @@ export class Version extends QualifiedFunctionBase implements IVersion { functionName: props.lambda.functionName }); - this.version = version.version; - this.functionArn = version.versionArn; + this.version = version.attrVersion; + this.functionArn = version.refAsString; this.functionName = `${this.lambda.functionName}:${this.version}`; } diff --git a/packages/@aws-cdk/aws-lambda/lib/layers.ts b/packages/@aws-cdk/aws-lambda/lib/layers.ts index d166e78bff968..d83a6eb97bcf9 100644 --- a/packages/@aws-cdk/aws-lambda/lib/layers.ts +++ b/packages/@aws-cdk/aws-lambda/lib/layers.ts @@ -177,7 +177,7 @@ export class LayerVersion extends LayerVersionBase { licenseInfo: props.license, }); - this.layerVersionArn = resource.layerVersionArn; + this.layerVersionArn = resource.refAsString; this.compatibleRuntimes = props.compatibleRuntimes; } } diff --git a/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts b/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts index 7422a24eebd68..9c8601e0f7a84 100644 --- a/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts +++ b/packages/@aws-cdk/aws-logs/lib/cross-account-destination.ts @@ -75,8 +75,8 @@ export class CrossAccountDestination extends cdk.Construct implements ILogSubscr targetArn: props.targetArn }); - this.destinationArn = this.resource.destinationArn; - this.destinationName = this.resource.destinationName; + this.destinationArn = this.resource.attrArn; + this.destinationName = this.resource.refAsString; } public addToPolicy(statement: iam.PolicyStatement) { diff --git a/packages/@aws-cdk/aws-logs/lib/log-group.ts b/packages/@aws-cdk/aws-logs/lib/log-group.ts index 6881d573ecc0f..dea7f8645c6d3 100644 --- a/packages/@aws-cdk/aws-logs/lib/log-group.ts +++ b/packages/@aws-cdk/aws-logs/lib/log-group.ts @@ -347,8 +347,8 @@ export class LogGroup extends LogGroupBase { applyRemovalPolicy(resource, RemovalPolicy.Orphan); } - this.logGroupArn = resource.logGroupArn; - this.logGroupName = resource.logGroupName; + this.logGroupArn = resource.attrArn; + this.logGroupName = resource.refAsString; } } diff --git a/packages/@aws-cdk/aws-logs/lib/log-stream.ts b/packages/@aws-cdk/aws-logs/lib/log-stream.ts index b807dc2bf814b..d51344e364a46 100644 --- a/packages/@aws-cdk/aws-logs/lib/log-stream.ts +++ b/packages/@aws-cdk/aws-logs/lib/log-stream.ts @@ -74,6 +74,6 @@ export class LogStream extends Resource implements ILogStream { resource.options.deletionPolicy = DeletionPolicy.Retain; } - this.logStreamName = resource.logStreamName; + this.logStreamName = resource.refAsString; } } diff --git a/packages/@aws-cdk/aws-rds/lib/cluster.ts b/packages/@aws-cdk/aws-rds/lib/cluster.ts index 082a14efa92fc..038ca7c14c108 100644 --- a/packages/@aws-cdk/aws-rds/lib/cluster.ts +++ b/packages/@aws-cdk/aws-rds/lib/cluster.ts @@ -328,9 +328,9 @@ export class DatabaseCluster extends DatabaseClusterBase { this.clusterIdentifier = cluster.refAsString; // create a number token that represents the port of the cluster - const portAttribute = Token.asNumber(cluster.dbClusterEndpointPort); - this.clusterEndpoint = new Endpoint(cluster.dbClusterEndpointAddress, portAttribute); - this.clusterReadEndpoint = new Endpoint(cluster.dbClusterReadEndpointAddress, portAttribute); + const portAttribute = Token.asNumber(cluster.attrEndpointPort); + this.clusterEndpoint = new Endpoint(cluster.attrEndpointAddress, portAttribute); + this.clusterReadEndpoint = new Endpoint(cluster.attrEndpointAddress, portAttribute); if (secret) { this.secret = secret.addTargetAttachment('AttachedSecret', { @@ -376,7 +376,7 @@ export class DatabaseCluster extends DatabaseClusterBase { instance.node.addDependency(internetConnected); this.instanceIdentifiers.push(instance.refAsString); - this.instanceEndpoints.push(new Endpoint(instance.dbInstanceEndpointAddress, portAttribute)); + this.instanceEndpoints.push(new Endpoint(instance.attrEndpointAddress, portAttribute)); } const defaultPortRange = new ec2.TcpPort(this.clusterEndpoint.port); diff --git a/packages/@aws-cdk/aws-rds/lib/instance.ts b/packages/@aws-cdk/aws-rds/lib/instance.ts index 687f3503ffe64..41c8e6ecb2e0b 100644 --- a/packages/@aws-cdk/aws-rds/lib/instance.ts +++ b/packages/@aws-cdk/aws-rds/lib/instance.ts @@ -505,7 +505,7 @@ abstract class DatabaseInstanceNew extends DatabaseInstanceBase implements IData copyTagsToSnapshot: props.copyTagsToSnapshot !== undefined ? props.copyTagsToSnapshot : true, dbInstanceClass: `db.${props.instanceClass}`, dbInstanceIdentifier: props.instanceIdentifier, - dbSubnetGroupName: subnetGroup.dbSubnetGroupName, + dbSubnetGroupName: subnetGroup.refAsString, deleteAutomatedBackups: props.deleteAutomatedBackups, deletionProtection, enableCloudwatchLogsExports: this.cloudwatchLogsExports, @@ -733,13 +733,13 @@ export class DatabaseInstance extends DatabaseInstanceSource implements IDatabas storageEncrypted: props.kmsKey ? true : props.storageEncrypted }); - this.instanceIdentifier = instance.dbInstanceId; - this.dbInstanceEndpointAddress = instance.dbInstanceEndpointAddress; - this.dbInstanceEndpointPort = instance.dbInstanceEndpointPort; + this.instanceIdentifier = instance.refAsString; + this.dbInstanceEndpointAddress = instance.attrEndpointAddress; + this.dbInstanceEndpointPort = instance.attrEndpointPort; // create a number token that represents the port of the instance - const portAttribute = Token.asNumber(instance.dbInstanceEndpointPort); - this.instanceEndpoint = new Endpoint(instance.dbInstanceEndpointAddress, portAttribute); + const portAttribute = Token.asNumber(instance.attrEndpointPort); + this.instanceEndpoint = new Endpoint(instance.attrEndpointAddress, portAttribute); const deleteReplacePolicy = props.deleteReplacePolicy || DeletionPolicy.Retain; instance.options.deletionPolicy = deleteReplacePolicy; @@ -827,13 +827,13 @@ export class DatabaseInstanceFromSnapshot extends DatabaseInstanceSource impleme : undefined), }); - this.instanceIdentifier = instance.dbInstanceId; - this.dbInstanceEndpointAddress = instance.dbInstanceEndpointAddress; - this.dbInstanceEndpointPort = instance.dbInstanceEndpointPort; + this.instanceIdentifier = instance.refAsString; + this.dbInstanceEndpointAddress = instance.attrEndpointAddress; + this.dbInstanceEndpointPort = instance.attrEndpointPort; // create a number token that represents the port of the instance - const portAttribute = Token.asNumber(instance.dbInstanceEndpointPort); - this.instanceEndpoint = new Endpoint(instance.dbInstanceEndpointAddress, portAttribute); + const portAttribute = Token.asNumber(instance.attrEndpointPort); + this.instanceEndpoint = new Endpoint(instance.attrEndpointAddress, portAttribute); const deleteReplacePolicy = props.deleteReplacePolicy || DeletionPolicy.Retain; instance.options.deletionPolicy = deleteReplacePolicy; @@ -904,13 +904,13 @@ export class DatabaseInstanceReadReplica extends DatabaseInstanceNew implements storageEncrypted: props.kmsKey ? true : props.storageEncrypted, }); - this.instanceIdentifier = instance.dbInstanceId; - this.dbInstanceEndpointAddress = instance.dbInstanceEndpointAddress; - this.dbInstanceEndpointPort = instance.dbInstanceEndpointPort; + this.instanceIdentifier = instance.refAsString; + this.dbInstanceEndpointAddress = instance.attrEndpointAddress; + this.dbInstanceEndpointPort = instance.attrEndpointPort; // create a number token that represents the port of the instance - const portAttribute = Token.asNumber(instance.dbInstanceEndpointPort); - this.instanceEndpoint = new Endpoint(instance.dbInstanceEndpointAddress, portAttribute); + const portAttribute = Token.asNumber(instance.attrEndpointPort); + this.instanceEndpoint = new Endpoint(instance.attrEndpointAddress, portAttribute); const deleteReplacePolicy = props.deleteReplacePolicy || DeletionPolicy.Retain; instance.options.deletionPolicy = deleteReplacePolicy; diff --git a/packages/@aws-cdk/aws-rds/lib/option-group.ts b/packages/@aws-cdk/aws-rds/lib/option-group.ts index 578ed11ff1773..d18318736d4aa 100644 --- a/packages/@aws-cdk/aws-rds/lib/option-group.ts +++ b/packages/@aws-cdk/aws-rds/lib/option-group.ts @@ -122,7 +122,7 @@ export class OptionGroup extends Resource implements IOptionGroup { optionConfigurations: this.renderConfigurations(props.configurations) }); - this.optionGroupName = optionGroup.optionGroupName; + this.optionGroupName = optionGroup.refAsString; } /** diff --git a/packages/@aws-cdk/aws-rds/lib/parameter-group.ts b/packages/@aws-cdk/aws-rds/lib/parameter-group.ts index 8c86b7c26c008..1bc0722195535 100644 --- a/packages/@aws-cdk/aws-rds/lib/parameter-group.ts +++ b/packages/@aws-cdk/aws-rds/lib/parameter-group.ts @@ -7,6 +7,8 @@ import { CfnDBClusterParameterGroup, CfnDBParameterGroup } from './rds.generated export interface IParameterGroup extends IResource { /** * The name of this parameter group + * + * @attribute */ readonly parameterGroupName: string; } @@ -83,7 +85,7 @@ export class ParameterGroup extends ParameterGroupBase { parameters: props.parameters, }); - this.parameterGroupName = resource.dbParameterGroupName; + this.parameterGroupName = resource.refAsString; } } @@ -114,6 +116,6 @@ export class ClusterParameterGroup extends ParameterGroupBase { parameters: props.parameters, }); - this.parameterGroupName = resource.dbClusterParameterGroupName; + this.parameterGroupName = resource.refAsString; } } diff --git a/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts b/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts index fe3bf4b13a34e..1f86cfcff00fa 100644 --- a/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts +++ b/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts @@ -89,7 +89,7 @@ export class HostedZone extends Resource implements IHostedZone { }); this.hostedZoneId = resource.refAsString; - this.hostedZoneNameServers = resource.hostedZoneNameServers; + this.hostedZoneNameServers = resource.attrNameServers; this.zoneName = props.zoneName; for (const vpc of props.vpcs || []) { diff --git a/packages/@aws-cdk/aws-s3/lib/bucket.ts b/packages/@aws-cdk/aws-s3/lib/bucket.ts index 31359131e79b2..22e80041bcd05 100644 --- a/packages/@aws-cdk/aws-s3/lib/bucket.ts +++ b/packages/@aws-cdk/aws-s3/lib/bucket.ts @@ -910,8 +910,8 @@ export class Bucket extends BucketBase { this.encryptionKey = encryptionKey; const resourceIdentifiers = new ResourceIdentifiers(this, { - arn: resource.bucketArn, - name: resource.bucketName, + arn: resource.attrArn, + name: resource.refAsString, arnComponents: { region: '', account: '', @@ -921,10 +921,10 @@ export class Bucket extends BucketBase { }); this.bucketArn = resourceIdentifiers.arn; this.bucketName = resourceIdentifiers.name; - this.bucketDomainName = resource.bucketDomainName; - this.bucketWebsiteUrl = resource.bucketWebsiteUrl; - this.bucketDualStackDomainName = resource.bucketDualStackDomainName; - this.bucketRegionalDomainName = resource.bucketRegionalDomainName; + this.bucketDomainName = resource.attrDomainName; + this.bucketWebsiteUrl = resource.attrWebsiteUrl; + this.bucketDualStackDomainName = resource.attrDualStackDomainName; + this.bucketRegionalDomainName = resource.attrRegionalDomainName; this.disallowPublicAccess = props.blockPublicAccess && props.blockPublicAccess.blockPublicPolicy; diff --git a/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts b/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts index f4cb1ad90aa3b..923e05431d106 100644 --- a/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts +++ b/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts @@ -189,7 +189,7 @@ export class Secret extends SecretBase { }); this.encryptionKey = props.encryptionKey; - this.secretArn = resource.secretArn; + this.secretArn = resource.refAsString; } /** @@ -309,8 +309,8 @@ export class SecretTargetAttachment extends SecretBase implements ISecretTargetA this.encryptionKey = props.secret.encryptionKey; // This allows to reference the secret after attachment (dependency). - this.secretArn = attachment.secretTargetAttachmentSecretArn; - this.secretTargetAttachmentSecretArn = attachment.secretTargetAttachmentSecretArn; + this.secretArn = attachment.refAsString; + this.secretTargetAttachmentSecretArn = attachment.refAsString; } } diff --git a/packages/@aws-cdk/aws-servicediscovery/lib/alias-target-instance.ts b/packages/@aws-cdk/aws-servicediscovery/lib/alias-target-instance.ts index 5c9092f09b95b..8c6135dceab3c 100644 --- a/packages/@aws-cdk/aws-servicediscovery/lib/alias-target-instance.ts +++ b/packages/@aws-cdk/aws-servicediscovery/lib/alias-target-instance.ts @@ -70,7 +70,7 @@ export class AliasTargetInstance extends InstanceBase { }); this.service = props.service; - this.instanceId = resource.instanceId; + this.instanceId = resource.refAsString; this.dnsName = props.dnsName; } } diff --git a/packages/@aws-cdk/aws-servicediscovery/lib/cname-instance.ts b/packages/@aws-cdk/aws-servicediscovery/lib/cname-instance.ts index abe0b9b428065..f75d591c79a94 100644 --- a/packages/@aws-cdk/aws-servicediscovery/lib/cname-instance.ts +++ b/packages/@aws-cdk/aws-servicediscovery/lib/cname-instance.ts @@ -67,7 +67,7 @@ export class CnameInstance extends InstanceBase { }); this.service = props.service; - this.instanceId = resource.instanceId; + this.instanceId = resource.refAsString; this.cname = props.instanceCname; } } diff --git a/packages/@aws-cdk/aws-servicediscovery/lib/http-namespace.ts b/packages/@aws-cdk/aws-servicediscovery/lib/http-namespace.ts index fb9dbb82a5ddf..4dd3d4ba4a381 100644 --- a/packages/@aws-cdk/aws-servicediscovery/lib/http-namespace.ts +++ b/packages/@aws-cdk/aws-servicediscovery/lib/http-namespace.ts @@ -66,8 +66,8 @@ export class HttpNamespace extends Resource implements IHttpNamespace { }); this.namespaceName = props.name; - this.namespaceId = ns.httpNamespaceId; - this.namespaceArn = ns.httpNamespaceArn; + this.namespaceId = ns.attrId; + this.namespaceArn = ns.attrArn; this.type = NamespaceType.Http; } diff --git a/packages/@aws-cdk/aws-servicediscovery/lib/ip-instance.ts b/packages/@aws-cdk/aws-servicediscovery/lib/ip-instance.ts index 85bac26a97f14..8c7b36c1d042b 100644 --- a/packages/@aws-cdk/aws-servicediscovery/lib/ip-instance.ts +++ b/packages/@aws-cdk/aws-servicediscovery/lib/ip-instance.ts @@ -114,7 +114,7 @@ export class IpInstance extends InstanceBase { }); this.service = props.service; - this.instanceId = resource.instanceId; + this.instanceId = resource.refAsString; this.ipv4 = props.ipv4 || ''; this.ipv6 = props.ipv6 || ''; this.port = port; diff --git a/packages/@aws-cdk/aws-servicediscovery/lib/non-ip-instance.ts b/packages/@aws-cdk/aws-servicediscovery/lib/non-ip-instance.ts index 8d35101900139..de9dc52c1ff21 100644 --- a/packages/@aws-cdk/aws-servicediscovery/lib/non-ip-instance.ts +++ b/packages/@aws-cdk/aws-servicediscovery/lib/non-ip-instance.ts @@ -55,6 +55,6 @@ export class NonIpInstance extends InstanceBase { }); this.service = props.service; - this.instanceId = resource.instanceId; + this.instanceId = resource.refAsString; } } diff --git a/packages/@aws-cdk/aws-servicediscovery/lib/private-dns-namespace.ts b/packages/@aws-cdk/aws-servicediscovery/lib/private-dns-namespace.ts index 180ab2de89784..cfd851825d405 100644 --- a/packages/@aws-cdk/aws-servicediscovery/lib/private-dns-namespace.ts +++ b/packages/@aws-cdk/aws-servicediscovery/lib/private-dns-namespace.ts @@ -78,8 +78,8 @@ export class PrivateDnsNamespace extends Resource implements IPrivateDnsNamespac }); this.namespaceName = props.name; - this.namespaceId = ns.privateDnsNamespaceId; - this.namespaceArn = ns.privateDnsNamespaceArn; + this.namespaceId = ns.attrId; + this.namespaceArn = ns.attrArn; this.type = NamespaceType.DnsPrivate; } diff --git a/packages/@aws-cdk/aws-servicediscovery/lib/public-dns-namespace.ts b/packages/@aws-cdk/aws-servicediscovery/lib/public-dns-namespace.ts index 04f98a8bc88e8..0e7a0b967ea55 100644 --- a/packages/@aws-cdk/aws-servicediscovery/lib/public-dns-namespace.ts +++ b/packages/@aws-cdk/aws-servicediscovery/lib/public-dns-namespace.ts @@ -66,8 +66,8 @@ export class PublicDnsNamespace extends Resource implements IPublicDnsNamespace }); this.namespaceName = props.name; - this.namespaceId = ns.publicDnsNamespaceId; - this.namespaceArn = ns.publicDnsNamespaceArn; + this.namespaceId = ns.attrId; + this.namespaceArn = ns.attrArn; this.type = NamespaceType.DnsPublic; } diff --git a/packages/@aws-cdk/aws-servicediscovery/lib/service.ts b/packages/@aws-cdk/aws-servicediscovery/lib/service.ts index 8188576b3929c..c7e81afb090d2 100644 --- a/packages/@aws-cdk/aws-servicediscovery/lib/service.ts +++ b/packages/@aws-cdk/aws-servicediscovery/lib/service.ts @@ -274,9 +274,9 @@ export class Service extends ServiceBase { namespaceId: props.namespace.namespaceId }); - this.serviceName = service.serviceName; - this.serviceArn = service.serviceArn; - this.serviceId = service.serviceId; + this.serviceName = service.attrName; + this.serviceArn = service.attrArn; + this.serviceId = service.attrId; this.namespace = props.namespace; this.dnsRecordType = dnsRecordType; this.routingPolicy = routingPolicy; diff --git a/packages/@aws-cdk/aws-ses/lib/receipt-rule-set.ts b/packages/@aws-cdk/aws-ses/lib/receipt-rule-set.ts index 5b2aa4d3875b9..e48a4705bb13a 100644 --- a/packages/@aws-cdk/aws-ses/lib/receipt-rule-set.ts +++ b/packages/@aws-cdk/aws-ses/lib/receipt-rule-set.ts @@ -103,7 +103,7 @@ export class ReceiptRuleSet extends ReceiptRuleSetBase { ruleSetName: props ? props.name : undefined }); - this.receiptRuleSetName = resource.receiptRuleSetName; + this.receiptRuleSetName = resource.refAsString; if (props) { const rules = props.rules || []; diff --git a/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts b/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts index 7bed450a1b691..5cfc91e7a60d6 100644 --- a/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts +++ b/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts @@ -128,7 +128,7 @@ export class ReceiptRule extends Resource implements IReceiptRule { ruleSetName: props.ruleSet.receiptRuleSetName }); - this.receiptRuleName = resource.receiptRuleName; + this.receiptRuleName = resource.refAsString; if (props.actions) { props.actions.forEach(action => this.addAction(action)); diff --git a/packages/@aws-cdk/aws-sns/lib/topic.ts b/packages/@aws-cdk/aws-sns/lib/topic.ts index 2821191fa5c7f..6747712cbc042 100644 --- a/packages/@aws-cdk/aws-sns/lib/topic.ts +++ b/packages/@aws-cdk/aws-sns/lib/topic.ts @@ -54,6 +54,6 @@ export class Topic extends TopicBase { }); this.topicArn = resource.refAsString; - this.topicName = resource.topicName; + this.topicName = resource.attrTopicName; } } diff --git a/packages/@aws-cdk/aws-sqs/lib/queue.ts b/packages/@aws-cdk/aws-sqs/lib/queue.ts index 80b6ecba10be5..6aa609c351ab0 100644 --- a/packages/@aws-cdk/aws-sqs/lib/queue.ts +++ b/packages/@aws-cdk/aws-sqs/lib/queue.ts @@ -255,8 +255,8 @@ export class Queue extends QueueBase { visibilityTimeout: props.visibilityTimeoutSec, }); this.encryptionMasterKey = encryptionMasterKey; - this.queueArn = queue.queueArn; - this.queueName = queue.queueName; + this.queueArn = queue.attrArn; + this.queueName = queue.attrQueueName; this.queueUrl = queue.refAsString; function _determineEncryptionProps(this: Queue): { encryptionProps: EncryptionProps, encryptionMasterKey?: kms.IKey } { diff --git a/packages/@aws-cdk/aws-ssm/lib/parameter.ts b/packages/@aws-cdk/aws-ssm/lib/parameter.ts index 69d5a263e6b83..12f6cab9541a9 100644 --- a/packages/@aws-cdk/aws-ssm/lib/parameter.ts +++ b/packages/@aws-cdk/aws-ssm/lib/parameter.ts @@ -185,9 +185,9 @@ export class StringParameter extends ParameterBase implements IStringParameter { value: props.stringValue, }); - this.parameterName = resource.parameterName; - this.parameterType = resource.parameterType; - this.stringValue = resource.parameterValue; + this.parameterName = resource.refAsString; + this.parameterType = resource.attrType; + this.stringValue = resource.attrValue; } } @@ -233,9 +233,9 @@ export class StringListParameter extends ParameterBase implements IStringListPar value: props.stringListValue.join(','), }); - this.parameterName = resource.parameterName; - this.parameterType = resource.parameterType; - this.stringListValue = Fn.split(',', resource.parameterValue); + this.parameterName = resource.refAsString; + this.parameterType = resource.attrType; + this.stringListValue = Fn.split(',', resource.attrValue); } } diff --git a/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts b/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts index 6e30ba22ab53f..3e41384cb734e 100644 --- a/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts +++ b/packages/@aws-cdk/aws-stepfunctions/lib/activity.ts @@ -58,8 +58,8 @@ export class Activity extends Resource implements IActivity { name: props.activityName || this.generateName() }); - this.activityArn = resource.activityArn; - this.activityName = resource.activityName; + this.activityArn = resource.refAsString; + this.activityName = resource.attrName; } /** diff --git a/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts b/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts index 2341cd8beb1a7..202e235e49c41 100644 --- a/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts +++ b/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts @@ -106,8 +106,8 @@ export class StateMachine extends StateMachineBase { this.addToRolePolicy(statement); } - this.stateMachineName = resource.stateMachineName; - this.stateMachineArn = resource.stateMachineArn; + this.stateMachineName = resource.attrName; + this.stateMachineArn = resource.refAsString; } /** diff --git a/packages/@aws-cdk/cdk/lib/cfn-resource.ts b/packages/@aws-cdk/cdk/lib/cfn-resource.ts index 38317256cf8f3..13c289d570d99 100644 --- a/packages/@aws-cdk/cdk/lib/cfn-resource.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-resource.ts @@ -48,7 +48,7 @@ export class CfnResource extends CfnRefElement { * Check whether the given construct is a CfnResource */ public static isCfnResource(construct: IConstruct): construct is CfnResource { - return (construct as any).resourceType !== undefined; + return (construct as any).cfnResourceType !== undefined; } /** @@ -59,31 +59,20 @@ export class CfnResource extends CfnRefElement { /** * AWS resource type. */ - public readonly resourceType: string; + public readonly cfnResourceType: string; /** - * AWS resource properties. + * AWS CloudFormation resource properties. * - * This object is rendered via a call to "renderProperties(this.properties)". - */ - protected readonly properties: any; - - /** - * AWS resource property overrides. - * - * During synthesis, the method "renderProperties(this.overrides)" is called - * with this object, and merged on top of the output of - * "renderProperties(this.properties)". - * - * Derived classes should expose a strongly-typed version of this object as - * a public property called `propertyOverrides`. + * This object is returned via cfnProperties + * @internal */ - protected readonly untypedPropertyOverrides: any = { }; + protected readonly _cfnProperties: any; /** * An object to be merged on top of the entire resource definition. */ - private readonly rawOverrides: any = { }; + private readonly rawOverrides: any = {}; /** * Logical IDs of dependencies. @@ -94,7 +83,7 @@ export class CfnResource extends CfnRefElement { /** * Creates a resource construct. - * @param resourceType The CloudFormation type of this resource (e.g. AWS::DynamoDB::Table) + * @param cfnResourceType The CloudFormation type of this resource (e.g. AWS::DynamoDB::Table) */ constructor(scope: Construct, id: string, props: CfnResourceProps) { super(scope, id); @@ -103,8 +92,8 @@ export class CfnResource extends CfnRefElement { throw new Error('The `type` property is required'); } - this.resourceType = props.type; - this.properties = props.properties || { }; + this.cfnResourceType = props.type; + this._cfnProperties = props.properties || {}; // if aws:cdk:enable-path-metadata is set, embed the current construct's // path in the CloudFormation template, so it will be possible to trace @@ -147,7 +136,7 @@ export class CfnResource extends CfnRefElement { // object overwrite it with an object. const isObject = curr[key] != null && typeof(curr[key]) === 'object' && !Array.isArray(curr[key]); if (!isObject) { - curr[key] = { }; + curr[key] = {}; } curr = curr[key]; @@ -197,7 +186,7 @@ export class CfnResource extends CfnRefElement { * @returns a string representation of this resource */ public toString() { - return `${super.toString()} [${this.resourceType}]`; + return `${super.toString()} [${this.cfnResourceType}]`; } /** @@ -206,33 +195,22 @@ export class CfnResource extends CfnRefElement { */ public _toCloudFormation(): object { try { - // merge property overrides onto properties and then render (and validate). - const tags = TagManager.isTaggable(this) ? this.tags.renderTags() : undefined; - const properties = deepMerge( - this.properties || {}, - { tags }, - this.untypedPropertyOverrides - ); - const ret = { Resources: { // Post-Resolve operation since otherwise deepMerge is going to mix values into // the Token objects returned by ignoreEmpty. [this.logicalId]: new PostResolveToken({ - Type: this.resourceType, - Properties: ignoreEmpty(properties), + Type: this.cfnResourceType, + Properties: ignoreEmpty(this.cfnProperties), DependsOn: ignoreEmpty(renderDependsOn(this.dependsOn)), - CreationPolicy: capitalizePropertyNames(this, this.options.creationPolicy), + CreationPolicy: capitalizePropertyNames(this, this.options.creationPolicy), UpdatePolicy: capitalizePropertyNames(this, this.options.updatePolicy), UpdateReplacePolicy: capitalizePropertyNames(this, this.options.updateReplacePolicy), DeletionPolicy: capitalizePropertyNames(this, this.options.deletionPolicy), Metadata: ignoreEmpty(this.options.metadata), Condition: this.options.condition && this.options.condition.logicalId }, props => { - // let derived classes to influence how properties are rendered (e.g. change capitalization) props.Properties = this.renderProperties(props.Properties); - - // merge overrides *after* rendering return deepMerge(props, this.rawOverrides); }) } @@ -263,8 +241,23 @@ export class CfnResource extends CfnRefElement { } } - protected renderProperties(properties: any): { [key: string]: any } { - return properties; + protected get cfnProperties(): { [key: string]: any } { + const tags = TagManager.isTaggable(this) ? this.tags.renderTags() : {}; + return deepMerge(this._cfnProperties || {}, {tags}); + } + + protected renderProperties(props: {[key: string]: any}): { [key: string]: any } { + return props; + } + + /** + * Return properties modified after initiation + * + * Resources that expose mutable properties should override this function to + * collect and return the properties object for this resource. + */ + protected get updatedProperites(): { [key: string]: any } { + return this._cfnProperties; } protected validateProperties(_properties: any) { @@ -340,7 +333,7 @@ export function deepMerge(target: any, ...sources: any[]) { // if the value at the target is not an object, override it with an // object so we can continue the recursion if (typeof(target[key]) !== 'object') { - target[key] = { }; + target[key] = {}; } deepMerge(target[key], value); diff --git a/packages/@aws-cdk/cdk/test/test.resource.ts b/packages/@aws-cdk/cdk/test/test.resource.ts index ce2bba32967c8..74cdb9057156c 100644 --- a/packages/@aws-cdk/cdk/test/test.resource.ts +++ b/packages/@aws-cdk/cdk/test/test.resource.ts @@ -582,7 +582,7 @@ export = { test.done(); }, - 'untypedPropertyOverrides': { + 'using mutable properties': { 'can be used by derived classes to specify overrides before render()'(test: Test) { const stack = new Stack(); @@ -591,7 +591,7 @@ export = { prop1: 'foo' }); - r.setProperty('prop2', 'bar'); + r.prop2 = 'bar'; test.deepEqual(toCloudFormation(stack), { Resources: { MyResource: @@ -605,7 +605,7 @@ export = { const r = new CustomizableResource(stack, 'MyResource'); - r.setProperty('prop3', 'zoo'); + r.prop3 = 'zoo'; test.deepEqual(toCloudFormation(stack), { Resources: { MyResource: @@ -619,8 +619,8 @@ export = { const r = new CustomizableResource(stack, 'MyResource', { }); - r.setProperty('prop3', 'zoo'); - r.setProperty('prop2', 'hey'); + r.prop3 = 'zoo'; + r.prop2 = 'hey'; test.deepEqual(toCloudFormation(stack), { Resources: { MyResource: @@ -687,14 +687,21 @@ class Counter extends CfnResource { public readonly arn: string; public readonly url: string; + public count: number; + constructor(scope: Construct, id: string, props: CounterProps) { super(scope, id, { type: 'My::Counter', properties: { Count: props.Count } }); this.arn = this.getAtt('Arn').toString(); this.url = this.getAtt('URL').toString(); + this.count = props.Count; } public increment(by = 1) { - this.properties.Count += by; + this.count += by; + } + + protected get cfnProperties(): { [key: string]: any } { + return {Count: this.count}; } } @@ -703,19 +710,41 @@ function withoutHash(logId: string) { } class CustomizableResource extends CfnResource { + public prop1: any; + public prop2: any; + public prop3: any; + constructor(scope: Construct, id: string, props?: any) { super(scope, id, { type: 'MyResourceType', properties: props }); + if (props !== undefined) { + this.prop1 = props.prop1; + this.prop2 = props.prop2; + this.prop3 = props.prop3; + } } - public setProperty(key: string, value: any) { - this.untypedPropertyOverrides[key] = value; + public renderProperties(): { [key: string]: any } { + const props = this.updatedProperites; + const render: { [key: string]: any } = {}; + for (const key of Object.keys(props)) { + render[key.toUpperCase()] = props[key]; + } + return render; } - public renderProperties(properties: any) { - return { - PROP1: properties.prop1, - PROP2: properties.prop2, - PROP3: properties.prop3 + protected get updatedProperites(): { [key: string]: any } { + const props: { [key: string]: any } = { + prop1: this.prop1, + prop2: this.prop2, + prop3: this.prop3, }; + const cleanProps: { [key: string]: any } = { }; + for (const key of Object.keys(props)) { + if (props[key] === undefined) { + continue; + } + cleanProps[key] = props[key]; + } + return cleanProps; } } diff --git a/packages/@aws-cdk/cdk/test/test.tag-aspect.ts b/packages/@aws-cdk/cdk/test/test.tag-aspect.ts index 925ac1bf433bb..db23478cc59c8 100644 --- a/packages/@aws-cdk/cdk/test/test.tag-aspect.ts +++ b/packages/@aws-cdk/cdk/test/test.tag-aspect.ts @@ -9,7 +9,7 @@ class TaggableResource extends CfnResource { this.tags = new TagManager(TagType.Standard, 'AWS::Fake::Resource', tags); } public testProperties() { - return this.properties; + return this.cfnProperties; } } @@ -21,7 +21,7 @@ class AsgTaggableResource extends CfnResource { this.tags = new TagManager(TagType.AutoScalingGroup, 'AWS::Fake::Resource', tags); } public testProperties() { - return this.properties; + return this.cfnProperties; } } @@ -33,7 +33,7 @@ class MapTaggableResource extends CfnResource { this.tags = new TagManager(TagType.Map, 'AWS::Fake::Resource', tags); } public testProperties() { - return this.properties; + return this.cfnProperties; } } diff --git a/packages/@aws-cdk/cfnspec/build-tools/add-missing-refkinds.ts b/packages/@aws-cdk/cfnspec/build-tools/add-missing-refkinds.ts deleted file mode 100644 index 7e9359cc2a0aa..0000000000000 --- a/packages/@aws-cdk/cfnspec/build-tools/add-missing-refkinds.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Generates patches into the spec-source/600_RefKinds_patch.json document for any resource not having one yet. - * - * It will prompt the user for the RefKind to be applied for any new resource class, and offers completion assis for all - * the known (already used at least once) RefKind values. New values can be introduced but they will need to be typed - * twice (for confirmation of the user's intention). - */ - -import fs = require('fs-extra'); -import path = require('path'); -import readline = require('readline'); -import { filteredSpecification, namespaces } from '../lib'; - -const patchFile = path.join(__dirname, '..', 'spec-source', '600_RefKinds_patch.json'); - -async function main() { - // tslint:disable-next-line:no-var-requires - const patches = require(patchFile); - const knownKindsSet = new Set(Object.values(patches.ResourceTypes).map((patchSet: any) => patchSet.patch.operations[0].value)); - const knownKinds = [...knownKindsSet]; - - const rl = readline.createInterface(process.stdin, process.stdout, (line: string) => { - return [knownKinds.filter(kind => kind.startsWith(line)), line]; - }); - for (const namespace of namespaces()) { - const spec = filteredSpecification(name => name.startsWith(namespace)); - for (const resource of Object.keys(spec.ResourceTypes)) { - if (!(resource in patches.ResourceTypes)) { - let value: string | undefined; - while (!value) { - value = await new Promise(ok => rl.question(`RefKind of ${resource}: `, ok)); - if (!knownKindsSet.has(value)) { - if (value !== '') { - const confirm = await new Promise(ok => rl.question('Type the same value again to confirm: ', ok)); - if (confirm !== value) { - value = undefined; - } - } - } - } - patches.ResourceTypes[resource] = { - patch: { - operations: [{ op: 'add', path: '/RefKind', value }], - description: `Set RefKind of ${resource} to ${value}`, - }, - }; - } - } - } - await new Promise(async (ok, ko) => { - rl.once('close', () => fs.writeJson(patchFile, patches, { encoding: 'utf8', spaces: 2 }).then(ok).catch(ko)); - rl.close(); - }); -} - -main().catch(e => { - // tslint:disable-next-line:no-console - console.error(e); - process.exit(-1); -}); diff --git a/packages/@aws-cdk/cfnspec/build-tools/set-refkind.ts b/packages/@aws-cdk/cfnspec/build-tools/set-refkind.ts deleted file mode 100644 index 184e272a2510b..0000000000000 --- a/packages/@aws-cdk/cfnspec/build-tools/set-refkind.ts +++ /dev/null @@ -1,44 +0,0 @@ -import fs = require('fs'); -import path = require('path'); -import util = require('util'); - -const readFile = util.promisify(fs.readFile); -const writeFile = util.promisify(fs.writeFile); - -async function main() { - const args = process.argv.slice(2); - - if (args.length < 2) { - process.stderr.write(`Usage: set-refspec RESOURCE [RESOURCE] [...] KIND`); - process.exit(1); - } - - const kind = args[args.length - 1]; - const resources = args.slice(0, args.length - 1); - - const patchFile = path.join(__dirname, '..', 'spec-source', '600_RefKinds_patch.json'); - const patches = JSON.parse(await readFile(patchFile, { encoding: 'utf-8' })); - - for (const resource of resources) { - patches.ResourceTypes[resource] = { - patch: { - operations: [ - { - op: "add", - path: "/RefKind", - value: kind, - } - ], - description: `Set RefKind of ${resource} to ${kind}` - } - }; - } - - await writeFile(patchFile, JSON.stringify(patches, undefined, 2), { encoding: 'utf-8' }); -} - -main().catch(e => { - // tslint:disable-next-line:no-console - console.error(e); - process.exit(1); -}); \ No newline at end of file diff --git a/packages/@aws-cdk/cfnspec/lib/schema/property.ts b/packages/@aws-cdk/cfnspec/lib/schema/property.ts index dd6ee8e196c39..5f325a40621c5 100644 --- a/packages/@aws-cdk/cfnspec/lib/schema/property.ts +++ b/packages/@aws-cdk/cfnspec/lib/schema/property.ts @@ -87,7 +87,8 @@ export interface ComplexMapProperty extends MapPropertyBase { } export interface TagPropertyStandard extends PropertyBase { - ItemType: 'Tag'; + ItemType: 'Tag' | 'TagsEntry' | 'TagRef'; + Type: 'Tags'; } export interface TagPropertyAutoScalingGroup extends PropertyBase { @@ -237,7 +238,13 @@ export function isTagProperty(prop: Property): prop is TagProperty { } export function isTagPropertyStandard(prop: Property): prop is TagPropertyStandard { - return (prop as TagPropertyStandard).ItemType === 'Tag'; + return ( + (prop as TagPropertyStandard).ItemType === 'Tag' || + (prop as TagPropertyStandard).ItemType === 'TagsEntry' || + (prop as TagPropertyStandard).Type === 'Tags' || + (prop as TagPropertyStandard).ItemType === 'TagRef' + ); + } export function isTagPropertyAutoScalingGroup(prop: Property): prop is TagPropertyAutoScalingGroup { diff --git a/packages/@aws-cdk/cfnspec/package.json b/packages/@aws-cdk/cfnspec/package.json index 418fbfba384e7..67e597473708e 100644 --- a/packages/@aws-cdk/cfnspec/package.json +++ b/packages/@aws-cdk/cfnspec/package.json @@ -5,7 +5,6 @@ "scripts": { "update": "cdk-build && /bin/bash build-tools/update.sh", "build": "cdk-build && node build-tools/build", - "set-refkind": "cdk-build && node build-tools/set-refkind", "watch": "cdk-watch", "pkglint": "pkglint -f", "test": "cdk-test", diff --git a/packages/@aws-cdk/cfnspec/spec-source/600_RefKinds_patch.json b/packages/@aws-cdk/cfnspec/spec-source/600_RefKinds_patch.json deleted file mode 100644 index 40f01f61e2b31..0000000000000 --- a/packages/@aws-cdk/cfnspec/spec-source/600_RefKinds_patch.json +++ /dev/null @@ -1,4864 +0,0 @@ -{ - "ResourceTypes": { - "AWS::AmazonMQ::Broker": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::AmazonMQ::Broker to Id" - } - }, - "AWS::AmazonMQ::Configuration": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::AmazonMQ::Configuration to Id" - } - }, - "AWS::ApiGateway::Account": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::Account to Id" - } - }, - "AWS::ApiGateway::ApiKey": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::ApiKey to Id" - } - }, - "AWS::ApiGateway::Authorizer": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::Authorizer to Id" - } - }, - "AWS::ApiGateway::BasePathMapping": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::BasePathMapping to Id" - } - }, - "AWS::ApiGateway::ClientCertificate": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ApiGateway::ClientCertificate to Name" - } - }, - "AWS::ApiGateway::Deployment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::Deployment to Id" - } - }, - "AWS::ApiGateway::DocumentationPart": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::DocumentationPart to Id" - } - }, - "AWS::ApiGateway::DocumentationVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::DocumentationVersion to Id" - } - }, - "AWS::ApiGateway::DomainName": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ApiGateway::DomainName to Name" - } - }, - "AWS::ApiGateway::GatewayResponse": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::GatewayResponse to Id" - } - }, - "AWS::ApiGateway::Method": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::Method to Id" - } - }, - "AWS::ApiGateway::Model": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ApiGateway::Model to Name" - } - }, - "AWS::ApiGateway::RequestValidator": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::RequestValidator to Id" - } - }, - "AWS::ApiGateway::Resource": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::Resource to Id" - } - }, - "AWS::ApiGateway::RestApi": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::RestApi to Id" - } - }, - "AWS::ApiGateway::Stage": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ApiGateway::Stage to Name" - } - }, - "AWS::ApiGateway::UsagePlan": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::UsagePlan to Id" - } - }, - "AWS::ApiGateway::UsagePlanKey": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::UsagePlanKey to Id" - } - }, - "AWS::ApiGateway::VpcLink": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGateway::VpcLink to Id" - } - }, - "AWS::AppStream::DirectoryConfig": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::AppStream::DirectoryConfig to None" - } - }, - "AWS::AppStream::Fleet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::AppStream::Fleet to None" - } - }, - "AWS::AppStream::ImageBuilder": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::AppStream::ImageBuilder to None" - } - }, - "AWS::AppStream::Stack": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::AppStream::Stack to None" - } - }, - "AWS::AppStream::StackFleetAssociation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::AppStream::StackFleetAssociation to None" - } - }, - "AWS::AppStream::StackUserAssociation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::AppStream::StackUserAssociation to None" - } - }, - "AWS::AppStream::User": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::AppStream::User to None" - } - }, - "AWS::AppSync::ApiKey": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::AppSync::ApiKey to Arn" - } - }, - "AWS::AppSync::FunctionConfiguration": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::AppSync::FunctionConfiguration to Arn" - } - }, - "AWS::AppSync::DataSource": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::AppSync::DataSource to Arn" - } - }, - "AWS::AppSync::GraphQLApi": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::AppSync::GraphQLApi to Arn" - } - }, - "AWS::AppSync::GraphQLSchema": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::AppSync::GraphQLSchema to Id" - } - }, - "AWS::AppSync::Resolver": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::AppSync::Resolver to Arn" - } - }, - "AWS::ApplicationAutoScaling::ScalableTarget": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApplicationAutoScaling::ScalableTarget to Id" - } - }, - "AWS::ApplicationAutoScaling::ScalingPolicy": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::ApplicationAutoScaling::ScalingPolicy to Arn" - } - }, - "AWS::Athena::NamedQuery": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Athena::NamedQuery to Name" - } - }, - "AWS::AutoScaling::AutoScalingGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::AutoScaling::AutoScalingGroup to Name" - } - }, - "AWS::AutoScaling::LaunchConfiguration": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::AutoScaling::LaunchConfiguration to Name" - } - }, - "AWS::AutoScaling::LifecycleHook": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::AutoScaling::LifecycleHook to Name" - } - }, - "AWS::AutoScaling::ScalingPolicy": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::AutoScaling::ScalingPolicy to Arn" - } - }, - "AWS::AutoScaling::ScheduledAction": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::AutoScaling::ScheduledAction to Name" - } - }, - "AWS::AutoScalingPlans::ScalingPlan": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::AutoScalingPlans::ScalingPlan to Arn" - } - }, - "AWS::Batch::ComputeEnvironment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Batch::ComputeEnvironment to Arn" - } - }, - "AWS::Batch::JobDefinition": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Batch::JobDefinition to Arn" - } - }, - "AWS::Batch::JobQueue": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Batch::JobQueue to Arn" - } - }, - "AWS::Budgets::Budget": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Budgets::Budget to Name" - } - }, - "AWS::CertificateManager::Certificate": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::CertificateManager::Certificate to Arn" - } - }, - "AWS::Cloud9::EnvironmentEC2": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Cloud9::EnvironmentEC2 to Id" - } - }, - "AWS::CloudFormation::CustomResource": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::CloudFormation::CustomResource to None" - } - }, - "AWS::CloudFormation::Macro": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::CloudFormation::Macro to Name" - } - }, - "AWS::CloudFormation::Stack": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::CloudFormation::Stack to Id" - } - }, - "AWS::CloudFormation::WaitCondition": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::CloudFormation::WaitCondition to Name" - } - }, - "AWS::CloudFormation::WaitConditionHandle": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Url" - } - ], - "description": "Set RefKind of AWS::CloudFormation::WaitConditionHandle to Url" - } - }, - "AWS::CloudFront::CloudFrontOriginAccessIdentity": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::CloudFront::CloudFrontOriginAccessIdentity to Id" - } - }, - "AWS::CloudFront::Distribution": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::CloudFront::Distribution to Id" - } - }, - "AWS::CloudFront::StreamingDistribution": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::CloudFront::StreamingDistribution to Id" - } - }, - "AWS::CloudTrail::Trail": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::CloudTrail::Trail to Name" - } - }, - "AWS::CloudWatch::Alarm": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::CloudWatch::Alarm to Name" - } - }, - "AWS::CloudWatch::Dashboard": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::CloudWatch::Dashboard to Name" - } - }, - "AWS::CodeBuild::Project": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::CodeBuild::Project to Name" - } - }, - "AWS::CodeCommit::Repository": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::CodeCommit::Repository to Id" - } - }, - "AWS::CodeDeploy::Application": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::CodeDeploy::Application to Name" - } - }, - "AWS::CodeDeploy::DeploymentConfig": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::CodeDeploy::DeploymentConfig to Id" - } - }, - "AWS::CodeDeploy::DeploymentGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::CodeDeploy::DeploymentGroup to Name" - } - }, - "AWS::CodePipeline::CustomActionType": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::CodePipeline::CustomActionType to Name" - } - }, - "AWS::CodePipeline::Pipeline": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::CodePipeline::Pipeline to Name" - } - }, - "AWS::CodePipeline::Webhook": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::CodePipeline::Webhook to Name" - } - }, - "AWS::Cognito::IdentityPool": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Cognito::IdentityPool to Id" - } - }, - "AWS::Cognito::IdentityPoolRoleAttachment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Cognito::IdentityPoolRoleAttachment to Id" - } - }, - "AWS::Cognito::UserPool": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Cognito::UserPool to Id" - } - }, - "AWS::Cognito::UserPoolClient": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Cognito::UserPoolClient to Id" - } - }, - "AWS::Cognito::UserPoolGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Cognito::UserPoolGroup to Name" - } - }, - "AWS::Cognito::UserPoolUser": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Cognito::UserPoolUser to Name" - } - }, - "AWS::Cognito::UserPoolUserToGroupAttachment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Cognito::UserPoolUserToGroupAttachment to Id" - } - }, - "AWS::Config::AggregationAuthorization": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Config::AggregationAuthorization to Arn" - } - }, - "AWS::Config::ConfigRule": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Config::ConfigRule to Name" - } - }, - "AWS::Config::ConfigurationAggregator": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Config::ConfigurationAggregator to Name" - } - }, - "AWS::Config::ConfigurationRecorder": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Config::ConfigurationRecorder to Name" - } - }, - "AWS::Config::DeliveryChannel": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Config::DeliveryChannel to Name" - } - }, - "AWS::DAX::Cluster": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::DAX::Cluster to Name" - } - }, - "AWS::DAX::ParameterGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::DAX::ParameterGroup to Arn" - } - }, - "AWS::DAX::SubnetGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::DAX::SubnetGroup to Arn" - } - }, - "AWS::DMS::Certificate": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::DMS::Certificate to Arn" - } - }, - "AWS::DMS::Endpoint": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::DMS::Endpoint to Arn" - } - }, - "AWS::DMS::EventSubscription": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::DMS::EventSubscription to Name" - } - }, - "AWS::DMS::ReplicationInstance": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::DMS::ReplicationInstance to Arn" - } - }, - "AWS::DMS::ReplicationSubnetGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::DMS::ReplicationSubnetGroup to Name" - } - }, - "AWS::DMS::ReplicationTask": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::DMS::ReplicationTask to Arn" - } - }, - "AWS::DataPipeline::Pipeline": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::DataPipeline::Pipeline to Id" - } - }, - "AWS::DirectoryService::MicrosoftAD": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::DirectoryService::MicrosoftAD to Id" - } - }, - "AWS::DirectoryService::SimpleAD": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::DirectoryService::SimpleAD to Id" - } - }, - "AWS::DynamoDB::Table": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::DynamoDB::Table to Name" - } - }, - "AWS::EC2::CustomerGateway": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::CustomerGateway to Name" - } - }, - "AWS::EC2::DHCPOptions": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::DHCPOptions to Name" - } - }, - "AWS::EC2::EC2Fleet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::EC2Fleet to Id" - } - }, - "AWS::EC2::EIP": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Ip" - } - ], - "description": "Set RefKind of AWS::EC2::EIP to Ip" - } - }, - "AWS::EC2::EIPAssociation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::EIPAssociation to Name" - } - }, - "AWS::EC2::EgressOnlyInternetGateway": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::EgressOnlyInternetGateway to Id" - } - }, - "AWS::EC2::FlowLog": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::FlowLog to Id" - } - }, - "AWS::EC2::Host": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::Host to Id" - } - }, - "AWS::EC2::Instance": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::Instance to Id" - } - }, - "AWS::EC2::InternetGateway": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::InternetGateway to Name" - } - }, - "AWS::EC2::LaunchTemplate": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::LaunchTemplate to Id" - } - }, - "AWS::EC2::NatGateway": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::NatGateway to Id" - } - }, - "AWS::EC2::NetworkAcl": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::NetworkAcl to Name" - } - }, - "AWS::EC2::NetworkAclEntry": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::NetworkAclEntry to Name" - } - }, - "AWS::EC2::NetworkInterface": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::NetworkInterface to Name" - } - }, - "AWS::EC2::NetworkInterfaceAttachment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::NetworkInterfaceAttachment to Name" - } - }, - "AWS::EC2::NetworkInterfacePermission": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::NetworkInterfacePermission to Id" - } - }, - "AWS::EC2::PlacementGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::PlacementGroup to Name" - } - }, - "AWS::EC2::Route": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::Route to Name" - } - }, - "AWS::EC2::RouteTable": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::RouteTable to Id" - } - }, - "AWS::EC2::SecurityGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::SecurityGroup to Name" - } - }, - "AWS::EC2::SecurityGroupEgress": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::SecurityGroupEgress to Id" - } - }, - "AWS::EC2::SecurityGroupIngress": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::SecurityGroupIngress to Id" - } - }, - "AWS::EC2::SpotFleet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::SpotFleet to Name" - } - }, - "AWS::EC2::Subnet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::Subnet to Id" - } - }, - "AWS::EC2::SubnetCidrBlock": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::SubnetCidrBlock to Id" - } - }, - "AWS::EC2::SubnetNetworkAclAssociation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::SubnetNetworkAclAssociation to Name" - } - }, - "AWS::EC2::SubnetRouteTableAssociation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::SubnetRouteTableAssociation to Name" - } - }, - "AWS::EC2::TransitGateway": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::TransitGateway to Id" - } - }, - "AWS::EC2::TransitGatewayAttachment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::TransitGatewayAttachment to Id" - } - }, - "AWS::EC2::TransitGatewayRoute": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::TransitGatewayRoute to Id" - } - }, - "AWS::EC2::TransitGatewayRouteTable": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::TransitGatewayRouteTable to Id" - } - }, - "AWS::EC2::TransitGatewayRouteTableAssociation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::TransitGatewayRouteTableAssociation to Id" - } - }, - "AWS::EC2::TransitGatewayRouteTablePropagation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::TransitGatewayRouteTablePropagation to Id" - } - }, - "AWS::EC2::VPC": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::VPC to Id" - } - }, - "AWS::EC2::VPCCidrBlock": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::VPCCidrBlock to Id" - } - }, - "AWS::EC2::VPCDHCPOptionsAssociation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::VPCDHCPOptionsAssociation to Name" - } - }, - "AWS::EC2::VPCEndpoint": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::VPCEndpoint to Id" - } - }, - "AWS::EC2::VPCEndpointConnectionNotification": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::EC2::VPCEndpointConnectionNotification to None" - } - }, - "AWS::EC2::VPCEndpointService": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::VPCEndpointService to Id" - } - }, - "AWS::EC2::VPCEndpointServicePermissions": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::EC2::VPCEndpointServicePermissions to None" - } - }, - "AWS::EC2::VPCGatewayAttachment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::VPCGatewayAttachment to Name" - } - }, - "AWS::EC2::VPCPeeringConnection": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::VPCPeeringConnection to Name" - } - }, - "AWS::EC2::VPNConnection": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::VPNConnection to Name" - } - }, - "AWS::EC2::VPNConnectionRoute": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::VPNConnectionRoute to Name" - } - }, - "AWS::EC2::VPNGateway": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::VPNGateway to Name" - } - }, - "AWS::EC2::VPNGatewayRoutePropagation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EC2::VPNGatewayRoutePropagation to Name" - } - }, - "AWS::EC2::Volume": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::Volume to Id" - } - }, - "AWS::EC2::VolumeAttachment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::VolumeAttachment to Id" - } - }, - "AWS::ECR::Repository": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ECR::Repository to Name" - } - }, - "AWS::ECS::Cluster": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ECS::Cluster to Name" - } - }, - "AWS::ECS::Service": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::ECS::Service to Arn" - } - }, - "AWS::ECS::TaskDefinition": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::ECS::TaskDefinition to Arn" - } - }, - "AWS::EFS::FileSystem": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EFS::FileSystem to Id" - } - }, - "AWS::EFS::MountTarget": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EFS::MountTarget to Id" - } - }, - "AWS::EKS::Cluster": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EKS::Cluster to Name" - } - }, - "AWS::EMR::Cluster": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EMR::Cluster to Id" - } - }, - "AWS::EMR::InstanceFleetConfig": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EMR::InstanceFleetConfig to Id" - } - }, - "AWS::EMR::InstanceGroupConfig": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EMR::InstanceGroupConfig to Id" - } - }, - "AWS::EMR::SecurityConfiguration": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::EMR::SecurityConfiguration to Name" - } - }, - "AWS::EMR::Step": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EMR::Step to Id" - } - }, - "AWS::ElastiCache::CacheCluster": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ElastiCache::CacheCluster to Name" - } - }, - "AWS::ElastiCache::ParameterGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ElastiCache::ParameterGroup to Name" - } - }, - "AWS::ElastiCache::ReplicationGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ElastiCache::ReplicationGroup to Name" - } - }, - "AWS::ElastiCache::SecurityGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ElastiCache::SecurityGroup to Name" - } - }, - "AWS::ElastiCache::SecurityGroupIngress": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ElastiCache::SecurityGroupIngress to Id" - } - }, - "AWS::ElastiCache::SubnetGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ElastiCache::SubnetGroup to Name" - } - }, - "AWS::ElasticBeanstalk::Application": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ElasticBeanstalk::Application to Name" - } - }, - "AWS::ElasticBeanstalk::ApplicationVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ElasticBeanstalk::ApplicationVersion to Name" - } - }, - "AWS::ElasticBeanstalk::ConfigurationTemplate": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ElasticBeanstalk::ConfigurationTemplate to Name" - } - }, - "AWS::ElasticBeanstalk::Environment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ElasticBeanstalk::Environment to Name" - } - }, - "AWS::ElasticLoadBalancing::LoadBalancer": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ElasticLoadBalancing::LoadBalancer to Name" - } - }, - "AWS::ElasticLoadBalancingV2::Listener": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::ElasticLoadBalancingV2::Listener to Arn" - } - }, - "AWS::ElasticLoadBalancingV2::ListenerCertificate": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::ElasticLoadBalancingV2::ListenerCertificate to Arn" - } - }, - "AWS::ElasticLoadBalancingV2::ListenerRule": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::ElasticLoadBalancingV2::ListenerRule to Arn" - } - }, - "AWS::ElasticLoadBalancingV2::LoadBalancer": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::ElasticLoadBalancingV2::LoadBalancer to Arn" - } - }, - "AWS::ElasticLoadBalancingV2::TargetGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::ElasticLoadBalancingV2::TargetGroup to Arn" - } - }, - "AWS::Elasticsearch::Domain": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Elasticsearch::Domain to Name" - } - }, - "AWS::Events::EventBusPolicy": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Events::EventBusPolicy to Id" - } - }, - "AWS::Events::Rule": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Events::Rule to Id" - } - }, - "AWS::FSx::FileSystem": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::FSx::FileSystem to Id" - } - }, - "AWS::GameLift::Alias": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::GameLift::Alias to Id" - } - }, - "AWS::GameLift::Build": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::GameLift::Build to Id" - } - }, - "AWS::GameLift::Fleet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::GameLift::Fleet to Id" - } - }, - "AWS::Glue::Classifier": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Glue::Classifier to Name" - } - }, - "AWS::Glue::Connection": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Glue::Connection to Name" - } - }, - "AWS::Glue::Crawler": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Glue::Crawler to Name" - } - }, - "AWS::Glue::Database": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Glue::Database to Name" - } - }, - "AWS::Glue::DevEndpoint": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Glue::DevEndpoint to Id" - } - }, - "AWS::Glue::Job": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Glue::Job to Name" - } - }, - "AWS::Glue::Partition": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Glue::Partition to Id" - } - }, - "AWS::Glue::Table": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Glue::Table to Name" - } - }, - "AWS::Glue::Trigger": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Glue::Trigger to Name" - } - }, - "AWS::GuardDuty::Detector": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::GuardDuty::Detector to Id" - } - }, - "AWS::GuardDuty::Filter": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::GuardDuty::Filter to Name" - } - }, - "AWS::GuardDuty::IPSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::GuardDuty::IPSet to Id" - } - }, - "AWS::GuardDuty::Master": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::GuardDuty::Master to None" - } - }, - "AWS::GuardDuty::Member": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::GuardDuty::Member to None" - } - }, - "AWS::GuardDuty::ThreatIntelSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::GuardDuty::ThreatIntelSet to Id" - } - }, - "AWS::IAM::AccessKey": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::IAM::AccessKey to Id" - } - }, - "AWS::IAM::Group": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::IAM::Group to Name" - } - }, - "AWS::IAM::InstanceProfile": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::IAM::InstanceProfile to Name" - } - }, - "AWS::IAM::ManagedPolicy": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::IAM::ManagedPolicy to Arn" - } - }, - "AWS::IAM::Policy": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::IAM::Policy to Name" - } - }, - "AWS::IAM::Role": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::IAM::Role to Name" - } - }, - "AWS::IAM::ServiceLinkedRole": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::IAM::ServiceLinkedRole to None" - } - }, - "AWS::IAM::User": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::IAM::User to Name" - } - }, - "AWS::IAM::UserToGroupAddition": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::IAM::UserToGroupAddition to None" - } - }, - "AWS::Inspector::AssessmentTarget": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::Inspector::AssessmentTarget to None" - } - }, - "AWS::Inspector::AssessmentTemplate": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::Inspector::AssessmentTemplate to None" - } - }, - "AWS::Inspector::ResourceGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::Inspector::ResourceGroup to None" - } - }, - "AWS::IoT::Certificate": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::IoT::Certificate to Id" - } - }, - "AWS::IoT::Policy": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::IoT::Policy to Name" - } - }, - "AWS::IoT::PolicyPrincipalAttachment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::IoT::PolicyPrincipalAttachment to None" - } - }, - "AWS::IoT::Thing": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::IoT::Thing to Name" - } - }, - "AWS::IoT::ThingPrincipalAttachment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::IoT::ThingPrincipalAttachment to None" - } - }, - "AWS::IoT::TopicRule": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::IoT::TopicRule to Name" - } - }, - "AWS::IoT1Click::Device": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::IoT1Click::Device to Arn" - } - }, - "AWS::IoT1Click::Placement": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Path" - } - ], - "description": "Set RefKind of AWS::IoT1Click::Placement to Path" - } - }, - "AWS::IoT1Click::Project": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::IoT1Click::Project to Arn" - } - }, - "AWS::KMS::Alias": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::KMS::Alias to Name" - } - }, - "AWS::KMS::Key": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::KMS::Key to Id" - } - }, - "AWS::Kinesis::Stream": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Kinesis::Stream to Id" - } - }, - "AWS::Kinesis::StreamConsumer": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Kinesis::StreamConsumer to Arn" - } - }, - "AWS::KinesisAnalytics::Application": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::KinesisAnalytics::Application to Id" - } - }, - "AWS::KinesisAnalytics::ApplicationOutput": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::KinesisAnalytics::ApplicationOutput to Id" - } - }, - "AWS::KinesisAnalytics::ApplicationReferenceDataSource": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::KinesisAnalytics::ApplicationReferenceDataSource to Id" - } - }, - "AWS::KinesisFirehose::DeliveryStream": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::KinesisFirehose::DeliveryStream to Name" - } - }, - "AWS::Lambda::Alias": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Lambda::Alias to Arn" - } - }, - "AWS::Lambda::EventSourceMapping": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Lambda::EventSourceMapping to Name" - } - }, - "AWS::Lambda::Function": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Lambda::Function to Name" - } - }, - "AWS::Lambda::LayerVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Lambda::LayerVersion to Arn" - } - }, - "AWS::Lambda::LayerVersionPermission": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Lambda::LayerVersionPermission to Arn" - } - }, - "AWS::Lambda::Permission": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::Lambda::Permission to None" - } - }, - "AWS::Lambda::Version": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Lambda::Version to Arn" - } - }, - "AWS::Logs::Destination": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Logs::Destination to Name" - } - }, - "AWS::Logs::LogGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Logs::LogGroup to Name" - } - }, - "AWS::Logs::LogStream": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Logs::LogStream to Name" - } - }, - "AWS::Logs::MetricFilter": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Logs::MetricFilter to Name" - } - }, - "AWS::Logs::SubscriptionFilter": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Logs::SubscriptionFilter to Name" - } - }, - "AWS::Neptune::DBCluster": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Neptune::DBCluster to Name" - } - }, - "AWS::Neptune::DBClusterParameterGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Neptune::DBClusterParameterGroup to Name" - } - }, - "AWS::Neptune::DBInstance": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Neptune::DBInstance to Id" - } - }, - "AWS::Neptune::DBParameterGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Neptune::DBParameterGroup to Name" - } - }, - "AWS::Neptune::DBSubnetGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Neptune::DBSubnetGroup to Name" - } - }, - "AWS::OpsWorks::App": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::OpsWorks::App to Id" - } - }, - "AWS::OpsWorks::ElasticLoadBalancerAttachment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::OpsWorks::ElasticLoadBalancerAttachment to None" - } - }, - "AWS::OpsWorks::Instance": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::OpsWorks::Instance to Id" - } - }, - "AWS::OpsWorks::Layer": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::OpsWorks::Layer to Id" - } - }, - "AWS::OpsWorks::Stack": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::OpsWorks::Stack to Id" - } - }, - "AWS::OpsWorks::UserProfile": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::OpsWorks::UserProfile to Arn" - } - }, - "AWS::OpsWorks::Volume": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::OpsWorks::Volume to Id" - } - }, - "AWS::OpsWorksCM::Server": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::OpsWorksCM::Server to Arn" - } - }, - "AWS::RDS::DBCluster": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::RDS::DBCluster to Name" - } - }, - "AWS::RDS::DBClusterParameterGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::RDS::DBClusterParameterGroup to Name" - } - }, - "AWS::RDS::DBInstance": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::RDS::DBInstance to Id" - } - }, - "AWS::RDS::DBParameterGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::RDS::DBParameterGroup to Name" - } - }, - "AWS::RDS::DBSecurityGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::RDS::DBSecurityGroup to Name" - } - }, - "AWS::RDS::DBSecurityGroupIngress": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::RDS::DBSecurityGroupIngress to Name" - } - }, - "AWS::RDS::DBSubnetGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::RDS::DBSubnetGroup to Name" - } - }, - "AWS::RDS::EventSubscription": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::RDS::EventSubscription to Name" - } - }, - "AWS::RDS::OptionGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::RDS::OptionGroup to Name" - } - }, - "AWS::Redshift::Cluster": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Redshift::Cluster to Name" - } - }, - "AWS::Redshift::ClusterParameterGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Redshift::ClusterParameterGroup to Name" - } - }, - "AWS::Redshift::ClusterSecurityGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Redshift::ClusterSecurityGroup to Name" - } - }, - "AWS::Redshift::ClusterSecurityGroupIngress": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::Redshift::ClusterSecurityGroupIngress to None" - } - }, - "AWS::Redshift::ClusterSubnetGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Redshift::ClusterSubnetGroup to Name" - } - }, - "AWS::Route53::HealthCheck": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Route53::HealthCheck to Id" - } - }, - "AWS::Route53::HostedZone": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Route53::HostedZone to Id" - } - }, - "AWS::Route53::RecordSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "DomainName" - } - ], - "description": "Set RefKind of AWS::Route53::RecordSet to DomainName" - } - }, - "AWS::Route53::RecordSetGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Route53::RecordSetGroup to Name" - } - }, - "AWS::Route53Resolver::ResolverEndpoint": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Object" - } - ], - "description": "Set RefKind of AWS::Route53Resolver::ResolverEndpoint to Object" - } - }, - "AWS::Route53Resolver::ResolverRule": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Object" - } - ], - "description": "Set RefKind of AWS::Route53Resolver::ResolverRule to Object" - } - }, - "AWS::Route53Resolver::ResolverRuleAssociation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Route53Resolver::ResolverRuleAssociation to Id" - } - }, - "AWS::S3::Bucket": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::S3::Bucket to Name" - } - }, - "AWS::S3::BucketPolicy": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::S3::BucketPolicy to None" - } - }, - "AWS::SDB::Domain": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::SDB::Domain to None" - } - }, - "AWS::SES::ConfigurationSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::SES::ConfigurationSet to Name" - } - }, - "AWS::SES::ConfigurationSetEventDestination": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::SES::ConfigurationSetEventDestination to None" - } - }, - "AWS::SES::ReceiptFilter": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::SES::ReceiptFilter to Name" - } - }, - "AWS::SES::ReceiptRule": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::SES::ReceiptRule to Name" - } - }, - "AWS::SES::ReceiptRuleSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::SES::ReceiptRuleSet to Name" - } - }, - "AWS::SES::Template": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::SES::Template to Id" - } - }, - "AWS::SNS::Subscription": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::SNS::Subscription to Arn" - } - }, - "AWS::SNS::Topic": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::SNS::Topic to Arn" - } - }, - "AWS::SNS::TopicPolicy": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::SNS::TopicPolicy to None" - } - }, - "AWS::SQS::Queue": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Url" - } - ], - "description": "Set RefKind of AWS::SQS::Queue to Url" - } - }, - "AWS::SQS::QueuePolicy": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::SQS::QueuePolicy to None" - } - }, - "AWS::SSM::Association": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::SSM::Association to None" - } - }, - "AWS::SSM::Document": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::SSM::Document to Name" - } - }, - "AWS::SSM::MaintenanceWindow": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::SSM::MaintenanceWindow to Id" - } - }, - "AWS::SSM::MaintenanceWindowTask": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::SSM::MaintenanceWindowTask to Id" - } - }, - "AWS::SSM::Parameter": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::SSM::Parameter to Name" - } - }, - "AWS::SSM::PatchBaseline": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::SSM::PatchBaseline to Id" - } - }, - "AWS::SSM::ResourceDataSync": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::SSM::ResourceDataSync to Name" - } - }, - "AWS::SageMaker::Endpoint": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::SageMaker::Endpoint to Arn" - } - }, - "AWS::SageMaker::EndpointConfig": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::SageMaker::EndpointConfig to Arn" - } - }, - "AWS::SageMaker::Model": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::SageMaker::Model to Arn" - } - }, - "AWS::SageMaker::NotebookInstance": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::SageMaker::NotebookInstance to Arn" - } - }, - "AWS::SageMaker::NotebookInstanceLifecycleConfig": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::SageMaker::NotebookInstanceLifecycleConfig to Arn" - } - }, - "AWS::Serverless::Application": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Serverless::Application to Name" - } - }, - "AWS::Serverless::Api": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Serverless::Api to Name" - } - }, - "AWS::Serverless::Function": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Serverless::Function to Name" - } - }, - "AWS::Serverless::LayerVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Serverless::LayerVersion to Arn" - } - }, - "AWS::Serverless::SimpleTable": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Serverless::SimpleTable to Name" - } - }, - "AWS::ServiceCatalog::AcceptedPortfolioShare": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceCatalog::AcceptedPortfolioShare to Id" - } - }, - "AWS::ServiceCatalog::CloudFormationProduct": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceCatalog::CloudFormationProduct to Id" - } - }, - "AWS::ServiceCatalog::CloudFormationProvisionedProduct": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceCatalog::CloudFormationProvisionedProduct to Id" - } - }, - "AWS::ServiceCatalog::LaunchNotificationConstraint": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceCatalog::LaunchNotificationConstraint to Id" - } - }, - "AWS::ServiceCatalog::LaunchRoleConstraint": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceCatalog::LaunchRoleConstraint to Id" - } - }, - "AWS::ServiceCatalog::LaunchTemplateConstraint": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceCatalog::LaunchTemplateConstraint to Id" - } - }, - "AWS::ServiceCatalog::Portfolio": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceCatalog::Portfolio to Id" - } - }, - "AWS::ServiceCatalog::PortfolioPrincipalAssociation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceCatalog::PortfolioPrincipalAssociation to Id" - } - }, - "AWS::ServiceCatalog::PortfolioProductAssociation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceCatalog::PortfolioProductAssociation to Id" - } - }, - "AWS::ServiceCatalog::PortfolioShare": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceCatalog::PortfolioShare to Id" - } - }, - "AWS::ServiceCatalog::TagOption": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceCatalog::TagOption to Id" - } - }, - "AWS::ServiceCatalog::TagOptionAssociation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceCatalog::TagOptionAssociation to Id" - } - }, - "AWS::ServiceDiscovery::HttpNamespace": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceDiscovery::HttpNamespace to Id" - } - }, - "AWS::ServiceDiscovery::Instance": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceDiscovery::Instance to Id" - } - }, - "AWS::ServiceDiscovery::PrivateDnsNamespace": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceDiscovery::PrivateDnsNamespace to Id" - } - }, - "AWS::ServiceDiscovery::PublicDnsNamespace": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceDiscovery::PublicDnsNamespace to Id" - } - }, - "AWS::ServiceDiscovery::Service": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceDiscovery::Service to Id" - } - }, - "AWS::StepFunctions::Activity": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::StepFunctions::Activity to Arn" - } - }, - "AWS::StepFunctions::StateMachine": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::StepFunctions::StateMachine to Arn" - } - }, - "AWS::WAF::ByteMatchSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAF::ByteMatchSet to Id" - } - }, - "AWS::WAF::IPSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAF::IPSet to Id" - } - }, - "AWS::WAF::Rule": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAF::Rule to Id" - } - }, - "AWS::WAF::SizeConstraintSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAF::SizeConstraintSet to Id" - } - }, - "AWS::WAF::SqlInjectionMatchSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAF::SqlInjectionMatchSet to Id" - } - }, - "AWS::WAF::WebACL": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAF::WebACL to Id" - } - }, - "AWS::WAF::XssMatchSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAF::XssMatchSet to Id" - } - }, - "AWS::WAFRegional::ByteMatchSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAFRegional::ByteMatchSet to Id" - } - }, - "AWS::WAFRegional::IPSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAFRegional::IPSet to Id" - } - }, - "AWS::WAFRegional::Rule": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAFRegional::Rule to Id" - } - }, - "AWS::WAFRegional::SizeConstraintSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAFRegional::SizeConstraintSet to Id" - } - }, - "AWS::WAFRegional::SqlInjectionMatchSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAFRegional::SqlInjectionMatchSet to Id" - } - }, - "AWS::WAFRegional::WebACL": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAFRegional::WebACL to Id" - } - }, - "AWS::WAFRegional::WebACLAssociation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAFRegional::WebACLAssociation to Id" - } - }, - "AWS::WAFRegional::XssMatchSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAFRegional::XssMatchSet to Id" - } - }, - "AWS::WorkSpaces::Workspace": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::WorkSpaces::Workspace to Name" - } - }, - "AWS::DLM::LifecyclePolicy": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::DLM::LifecyclePolicy to Id" - } - }, - "AWS::DocDB::DBCluster": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::DocDB::DBCluster to Name" - } - }, - "AWS::DocDB::DBClusterParameterGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::DocDB::DBClusterParameterGroup to Name" - } - }, - "AWS::DocDB::DBInstance": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::DocDB::DBInstance to Id" - } - }, - "AWS::DocDB::DBSubnetGroup": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::DocDB::DBSubnetGroup to Name" - } - }, - "AWS::SecretsManager::ResourcePolicy": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "SecretArn" - } - ], - "description": "Set RefKind of AWS::SecretsManager::ResourcePolicy to SecretArn" - } - }, - "AWS::SecretsManager::RotationSchedule": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "SecretArn" - } - ], - "description": "Set RefKind of AWS::SecretsManager::RotationSchedule to SecretArn" - } - }, - "AWS::SecretsManager::Secret": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::SecretsManager::Secret to Arn" - } - }, - "AWS::SecretsManager::SecretTargetAttachment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "SecretArn" - } - ], - "description": "Set RefKind of AWS::SecretsManager::SecretTargetAttachment to SecretArn" - } - }, - "Alexa::ASK::Skill": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of Alexa::ASK::Skill to Id" - } - }, - "AWS::IoTAnalytics::Channel": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::IoTAnalytics::Channel to Id" - } - }, - "AWS::IoTAnalytics::Dataset": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::IoTAnalytics::Dataset to Id" - } - }, - "AWS::IoTAnalytics::Datastore": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::IoTAnalytics::Datastore to Id" - } - }, - "AWS::IoTAnalytics::Pipeline": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::IoTAnalytics::Pipeline to Id" - } - }, - "AWS::AmazonMQ::ConfigurationAssociation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::AmazonMQ::ConfigurationAssociation to Id" - } - }, - "AWS::ApiGatewayV2::Api": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGatewayV2::Api to Id" - } - }, - "AWS::ApiGatewayV2::Authorizer": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGatewayV2::Authorizer to Id" - } - }, - "AWS::ApiGatewayV2::Deployment": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGatewayV2::Deployment to Id" - } - }, - "AWS::ApiGatewayV2::Integration": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGatewayV2::Integration to Id" - } - }, - "AWS::ApiGatewayV2::IntegrationResponse": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGatewayV2::IntegrationResponse to Id" - } - }, - "AWS::ApiGatewayV2::Model": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGatewayV2::Model to Id" - } - }, - "AWS::ApiGatewayV2::Route": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGatewayV2::Route to Id" - } - }, - "AWS::ApiGatewayV2::RouteResponse": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGatewayV2::RouteResponse to Id" - } - }, - "AWS::ApiGatewayV2::Stage": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ApiGatewayV2::Stage to Name" - } - }, - "AWS::KinesisAnalyticsV2::Application": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::KinesisAnalyticsV2::Application to None" - } - }, - "AWS::KinesisAnalyticsV2::ApplicationCloudWatchLoggingOption": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::KinesisAnalyticsV2::ApplicationCloudWatchLoggingOption to None" - } - }, - "AWS::KinesisAnalyticsV2::ApplicationOutput": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::KinesisAnalyticsV2::ApplicationOutput to None" - } - }, - "AWS::KinesisAnalyticsV2::ApplicationReferenceDataSource": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::KinesisAnalyticsV2::ApplicationReferenceDataSource to None" - } - }, - "AWS::RAM::ResourceShare": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::RAM::ResourceShare to Arn" - } - }, - "AWS::RoboMaker::Fleet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::RoboMaker::Fleet to Arn" - } - }, - "AWS::RoboMaker::Robot": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::RoboMaker::Robot to Arn" - } - }, - "AWS::RoboMaker::RobotApplication": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::RoboMaker::RobotApplication to Arn" - } - }, - "AWS::RoboMaker::RobotApplicationVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::RoboMaker::RobotApplicationVersion to Arn" - } - }, - "AWS::RoboMaker::SimulationApplication": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::RoboMaker::SimulationApplication to Arn" - } - }, - "AWS::RoboMaker::SimulationApplicationVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::RoboMaker::SimulationApplicationVersion to Arn" - } - }, - "AWS::Greengrass::ConnectorDefinition": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Greengrass::ConnectorDefinition to Id" - } - }, - "AWS::Greengrass::ConnectorDefinitionVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Greengrass::ConnectorDefinitionVersion to Arn" - } - }, - "AWS::Greengrass::CoreDefinition": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Greengrass::CoreDefinition to Id" - } - }, - "AWS::Greengrass::CoreDefinitionVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Greengrass::CoreDefinitionVersion to Arn" - } - }, - "AWS::Greengrass::DeviceDefinition": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Greengrass::DeviceDefinition to Id" - } - }, - "AWS::Greengrass::DeviceDefinitionVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Greengrass::DeviceDefinitionVersion to Arn" - } - }, - "AWS::Greengrass::FunctionDefinition": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Greengrass::FunctionDefinition to Id" - } - }, - "AWS::Greengrass::FunctionDefinitionVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Greengrass::FunctionDefinitionVersion to Arn" - } - }, - "AWS::Greengrass::Group": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Greengrass::Group to Id" - } - }, - "AWS::Greengrass::GroupVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Greengrass::GroupVersion to Arn" - } - }, - "AWS::Greengrass::LoggerDefinition": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Greengrass::LoggerDefinition to Id" - } - }, - "AWS::Greengrass::LoggerDefinitionVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Greengrass::LoggerDefinitionVersion to Arn" - } - }, - "AWS::Greengrass::ResourceDefinitionVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Greengrass::ResourceDefinitionVersion to Arn" - } - }, - "AWS::Greengrass::SubscriptionDefinition": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Greengrass::SubscriptionDefinition to Id" - } - }, - "AWS::Greengrass::SubscriptionDefinitionVersion": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Greengrass::SubscriptionDefinitionVersion to Arn" - } - }, - "AWS::AppMesh::Mesh": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::AppMesh::Mesh to Arn" - } - }, - "AWS::AppMesh::Route": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::AppMesh::Route to Arn" - } - }, - "AWS::AppMesh::VirtualNode": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::AppMesh::VirtualNode to Arn" - } - }, - "AWS::AppMesh::VirtualRouter": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::AppMesh::VirtualRouter to Arn" - } - }, - "AWS::AppMesh::VirtualService": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::AppMesh::VirtualService to Arn" - } - }, - "AWS::Greengrass::ResourceDefinition": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::Greengrass::ResourceDefinition to Id" - } - }, - "AWS::ApiGatewayV2::ApiMapping": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ApiGatewayV2::ApiMapping to Id" - } - }, - "AWS::ApiGatewayV2::DomainName": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::ApiGatewayV2::DomainName to Name" - } - }, - "AWS::Glue::DataCatalogEncryptionSettings": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "None" - } - ], - "description": "Set RefKind of AWS::Glue::DataCatalogEncryptionSettings to None" - } - }, - "AWS::Glue::SecurityConfiguration": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Glue::SecurityConfiguration to None" - } - }, - "AWS::MediaStore::Container": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::MediaStore::Container to Name" - } - }, - "AWS::ServiceCatalog::ResourceUpdateConstraint": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::ServiceCatalog::ResourceUpdateConstraint to None" - } - }, - "AWS::PinpointEmail::ConfigurationSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::PinpointEmail::ConfigurationSet to Name" - } - }, - "AWS::Transfer::Server": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Arn" - } - ], - "description": "Set RefKind of AWS::Transfer::Server to Arn" - } - }, - "AWS::EC2::CapacityReservation": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::EC2::CapacityReservation to Id" - } - }, - "AWS::PinpointEmail::ConfigurationSetEventDestination": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::PinpointEmail::ConfigurationSetEventDestination to Name" - } - }, - "AWS::PinpointEmail::DedicatedIpPool": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::PinpointEmail::DedicatedIpPool to Name" - } - }, - "AWS::PinpointEmail::Identity": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::PinpointEmail::Identity to Name" - } - }, - "AWS::Transfer::User": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Name" - } - ], - "description": "Set RefKind of AWS::Transfer::User to Name" - } - }, - "AWS::WAFRegional::GeoMatchSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAFRegional::GeoMatchSet to Id" - } - }, - "AWS::WAFRegional::RateBasedRule": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAFRegional::RateBasedRule to Id" - } - }, - "AWS::WAFRegional::RegexPatternSet": { - "patch": { - "operations": [ - { - "op": "add", - "path": "/RefKind", - "value": "Id" - } - ], - "description": "Set RefKind of AWS::WAFRegional::RegexPatternSet to Id" - } - } - } -} \ No newline at end of file diff --git a/tools/awslint/lib/rules/cfn-resource.ts b/tools/awslint/lib/rules/cfn-resource.ts index a77b4f92d6183..4b1cf265aaae4 100644 --- a/tools/awslint/lib/rules/cfn-resource.ts +++ b/tools/awslint/lib/rules/cfn-resource.ts @@ -47,7 +47,6 @@ export class CfnResourceReflection { public readonly namespace: string; // AWS::S3 public readonly basename: string; // Bucket public readonly attributeNames: string[]; // (normalized) bucketArn, bucketName, queueUrl - public readonly attributePrefix: string; public readonly doc: string; // link to CloudFormation docs constructor(cls: reflect.ClassType) { @@ -67,13 +66,6 @@ export class CfnResourceReflection { this.namespace = fullname.split('::').slice(0, 2).join('::'); - // special-case - const basename = this.basename - .replace(/VPC/g, 'Vpc') - .replace(/DB/g, 'Db'); - - this.attributePrefix = basename[0].toLowerCase() + basename.slice(1); - this.attributeNames = cls.ownProperties .filter(p => (p.docs.docs.custom || {}).cloudformationAttribute) .map(p => p.docs.customTag('cloudformationAttribute') || '') @@ -89,9 +81,6 @@ export class CfnResourceReflection { return 'securityGroupId'; } - const cfnName = name.startsWith(this.basename) ? name.slice(this.basename.length) : name; - - // if the CFN attribute name already have the type name as a prefix (i.e. RoleId), we only take the "Id" as the "name". - return this.attributePrefix + camelcase(cfnName, { pascalCase: true }); + return camelcase(name, { pascalCase: true }); } -} \ No newline at end of file +} diff --git a/tools/awslint/lib/rules/construct.ts b/tools/awslint/lib/rules/construct.ts index 7b9cbb53b6255..e615c940460ab 100644 --- a/tools/awslint/lib/rules/construct.ts +++ b/tools/awslint/lib/rules/construct.ts @@ -292,4 +292,4 @@ constructLinter.add({ e.assert(!property.type.isAny, `${e.ctx.propsFqn}.${property.name}`); } } -}); \ No newline at end of file +}); diff --git a/tools/awslint/lib/rules/resource.ts b/tools/awslint/lib/rules/resource.ts index 869ffd675ee58..2bc887399a870 100644 --- a/tools/awslint/lib/rules/resource.ts +++ b/tools/awslint/lib/rules/resource.ts @@ -1,3 +1,4 @@ +import camelcase = require('camelcase'); import reflect = require('jsii-reflect'); import { Linter } from '../linter'; import { CfnResourceReflection } from './cfn-resource'; @@ -56,11 +57,11 @@ export class ResourceReflection { `If not, use the "@resource" doc tag to indicate the full resource name (e.g. "@resource AWS::Route53::HostedZone")`); } + this.core = new CoreTypes(this.sys); this.cfn = cfn; this.basename = construct.classType.name; this.fqn = construct.fqn; this.attributes = this.findAttributeProperties(); - this.core = new CoreTypes(this.sys); } /** @@ -77,7 +78,7 @@ export class ResourceReflection { // an attribute property is a property which starts with the type name // (e.g. "bucketXxx") and/or has an @attribute doc tag. const tag = getDocTag(p, 'attribute'); - if (!p.name.startsWith(this.cfn.attributePrefix) && !tag) { + if (!p.name.startsWith(camelcase(this.basename)) && !tag) { continue; } @@ -149,10 +150,12 @@ resourceLinter.add({ resourceLinter.add({ code: 'resource-attribute', - message: 'resources must represent all cloudformation attributes as attribute properties. missing property: ', + message: 'resources must represent all cloudformation attributes as attribute properties. missing property:', eval: e => { for (const name of e.ctx.cfn.attributeNames) { - const found = e.ctx.attributes.find(a => a.names.includes(name)); + const lookup = camelcase(name).startsWith(camelcase(e.ctx.cfn.basename)) ? + camelcase(name) : camelcase(e.ctx.cfn.basename + name); + const found = e.ctx.attributes.find(a => a.names.includes(lookup)); e.assert(found, `${e.ctx.fqn}.${name}`, name); } } diff --git a/tools/cfn2ts/lib/codegen.ts b/tools/cfn2ts/lib/codegen.ts index 1be8f5529ec9f..68b9a6eac33d4 100644 --- a/tools/cfn2ts/lib/codegen.ts +++ b/tools/cfn2ts/lib/codegen.ts @@ -69,8 +69,6 @@ export default class CodeGenerator { for (const name of Object.keys(this.spec.ResourceTypes).sort()) { const resourceType = this.spec.ResourceTypes[name]; - this.validateRefKindPresence(name, resourceType); - const cfnName = SpecName.parse(name); const resourceName = genspec.CodeName.forCfnResource(cfnName, this.affix); this.code.line(); @@ -121,7 +119,7 @@ export default class CodeGenerator { this.docLink(spec.Documentation, `Properties for defining a \`${resourceContext.specName!.fqn}\``); this.code.openBlock(`export interface ${name.className}`); - const conversionTable = this.emitPropsTypeProperties(resourceContext, spec.Properties); + const conversionTable = this.emitPropsTypeProperties(resourceContext, spec.Properties, Container.Interface); this.code.closeBlock(); @@ -138,13 +136,23 @@ export default class CodeGenerator { * * Return a mapping of { originalName -> newName }. */ - private emitPropsTypeProperties(resource: genspec.CodeName, propertiesSpec: { [name: string]: schema.Property }): Dictionary { + private emitPropsTypeProperties( + resource: genspec.CodeName, + propertiesSpec: { [name: string]: schema.Property }, + container: Container): Dictionary { const propertyMap: Dictionary = {}; Object.keys(propertiesSpec).sort(propertyComparator).forEach(propName => { + this.code.line(); const propSpec = propertiesSpec[propName]; const additionalDocs = resource.specName!.relativeName(propName).fqn; - const newName = this.emitProperty(resource, propName, propSpec, quoteCode(additionalDocs)); + const newName = this.emitProperty({ + context: resource, + propName, + spec: propSpec, + additionalDocs: quoteCode(additionalDocs)}, + container + ); propertyMap[propName] = newName; }); return propertyMap; @@ -197,11 +205,11 @@ export default class CodeGenerator { // Static inspectors. // - const resourceTypeName = `${JSON.stringify(cfnName)}`; + const cfnResourceTypeName = `${JSON.stringify(cfnName)}`; this.code.line('/**'); this.code.line(` * The CloudFormation resource type name for this resource class.`); this.code.line(' */'); - this.code.line(`public static readonly resourceTypeName = ${resourceTypeName};`); + this.code.line(`public static readonly cfnResourceTypeName = ${cfnResourceTypeName};`); if (spec.RequiredTransform) { this.code.line('/**'); @@ -223,7 +231,7 @@ export default class CodeGenerator { this.code.line(); this.docLink(undefined, `@cloudformationAttribute ${attributeName}`); - const attr = genspec.attributeDefinition(resourceName, attributeName, attributeSpec); + const attr = genspec.attributeDefinition(attributeName, attributeSpec); this.code.line(`public readonly ${attr.propertyName}: ${attr.attributeType};`); @@ -231,31 +239,10 @@ export default class CodeGenerator { } } - // - // Ref attribute - // - if (spec.RefKind !== schema.SpecialRefKind.None) { - const refAttribute = genspec.refAttributeDefinition(resourceName, spec.RefKind!); - - // If there's already an attribute with the same name, ref is not needed - if (!attributes.some(a => a.propertyName === refAttribute.propertyName)) { - this.code.line(`public readonly ${refAttribute.propertyName}: ${refAttribute.attributeType};`); - attributes.push(refAttribute); - } - } - // set the TagType to help format tags later - const tagEnum = tagType(spec); - if (tagEnum !== `${TAG_TYPE}.NotTaggable`) { - this.code.line(); - this.code.line('/**'); - this.code.line(' * The `TagManager` handles setting, removing and formatting tags'); - this.code.line(' *'); - this.code.line(' * Tags should be managed either passing them as properties during'); - this.code.line(' * initiation or by calling methods on this object. If both techniques are'); - this.code.line(' * used only the tags from the TagManager will be used. `Tag` (aspect)'); - this.code.line(' * will use the manager.'); - this.code.line(' */'); - this.code.line(`public readonly tags: ${TAG_MANAGER};`); + // set class properties to match CloudFormation Properties spec + let propMap; + if (propsType) { + propMap = this.emitPropsTypeProperties(resourceName, spec.Properties!, Container.Class); } // @@ -271,9 +258,9 @@ export default class CodeGenerator { this.code.line(` * @param props - resource properties`); this.code.line(' */'); const optionalProps = spec.Properties && !Object.values(spec.Properties).some(p => p.Required || false); - const propsArgument = propsType ? `, props${optionalProps ? '?' : ''}: ${propsType.className}` : ''; + const propsArgument = propsType ? `, props: ${propsType.className}${optionalProps ? ' = {}' : ''}` : ''; this.code.openBlock(`constructor(scope: ${CONSTRUCT_CLASS}, id: string${propsArgument})`); - this.code.line(`super(scope, id, { type: ${resourceName.className}.resourceTypeName${propsType ? ', properties: props' : ''} });`); + this.code.line(`super(scope, id, { type: ${resourceName.className}.cfnResourceTypeName${propsType ? ', properties: props' : ''} });`); // verify all required properties if (spec.Properties) { for (const propName of Object.keys(spec.Properties)) { @@ -310,20 +297,24 @@ export default class CodeGenerator { if (deprecated) { this.code.line(`this.node.addWarning('DEPRECATION: ${deprecation}');`); } - if (tagEnum !== `${TAG_TYPE}.NotTaggable`) { - this.code.line('const tags = props === undefined ? undefined : props.tags;'); - this.code.line(`this.tags = new ${TAG_MANAGER}(${tagEnum}, ${resourceTypeName}, tags);`); - } + // initialize all property class members + if (propsType && propMap) { + this.code.line(); + for (const prop of Object.values(propMap)) { + if (prop === 'tags' && isTaggable(spec)) { + this.code.line(`this.tags = new ${TAG_MANAGER}(${tagType(spec)}, ${cfnResourceTypeName}, props.tags);`); + } else { + this.code.line(`this.${prop} = props.${prop};`); + } + } + } this.code.closeBlock(); - // - // propertyOverrides - // - - if (propsType) { + // setup render properties + if (propsType && propMap) { this.code.line(); - this.emitCloudFormationPropertiesOverride(propsType); + this.emitCloudFormationProperties(propsType, propMap, isTaggable(spec)); } this.closeClass(resourceName); @@ -336,13 +327,21 @@ export default class CodeGenerator { * * Since resolve() deep-resolves, we only need to do this once. */ - private emitCloudFormationPropertiesOverride(propsType: genspec.CodeName) { - this.code.openBlock(`public get propertyOverrides(): ${propsType.className}`); - this.code.line(`return this.untypedPropertyOverrides;`); + private emitCloudFormationProperties(propsType: genspec.CodeName, propMap: Dictionary, taggable: boolean) { + this.code.openBlock('protected get cfnProperties(): { [key: string]: any } '); + this.code.indent('return {'); + for (const prop of Object.values(propMap)) { + // handle tag rendering because of special cases + if (prop === 'tags' && taggable) { + this.code.line(`${prop}: this.tags.renderTags(),`); + continue; + } + this.code.line(`${prop}: this.${prop},`); + } + this.code.unindent('};'); this.code.closeBlock(); - - this.code.openBlock('protected renderProperties(properties: any): { [key: string]: any } '); - this.code.line(`return ${genspec.cfnMapperName(propsType).fqn}(properties);`); + this.code.openBlock('protected renderProperties(props: {[key: string]: any}): { [key: string]: any } '); + this.code.line(`return ${genspec.cfnMapperName(propsType).fqn}(props);`); this.code.closeBlock(); } @@ -516,15 +515,43 @@ export default class CodeGenerator { this.code.closeBlock(); } - private emitProperty(context: genspec.CodeName, propName: string, spec: schema.Property, additionalDocs: string): string { - const question = spec.Required ? '' : '?'; - const javascriptPropertyName = genspec.cloudFormationToScriptName(propName); + private emitInterfaceProperty(props: EmitPropertyProps): string { + const javascriptPropertyName = genspec.cloudFormationToScriptName(props.propName); - this.docLink(spec.Documentation, additionalDocs); - this.code.line(`readonly ${javascriptPropertyName}${question}: ${this.findNativeType(context, spec, propName)};`); + this.docLink(props.spec.Documentation, props.additionalDocs); + const line = `: ${this.findNativeType(props.context, props.spec, props.propName)};`; + const question = props.spec.Required ? '' : '?'; + this.code.line(`readonly ${javascriptPropertyName}${question}${line}`); return javascriptPropertyName; } + + private emitClassProperty(props: EmitPropertyProps): string { + const javascriptPropertyName = genspec.cloudFormationToScriptName(props.propName); + + this.docLink(props.spec.Documentation, props.additionalDocs); + const question = props.spec.Required ? ';' : ' | undefined;'; + const line = `: ${this.findNativeType(props.context, props.spec, props.propName)}${question}`; + if (props.propName === 'Tags' && schema.isTagProperty(props.spec)) { + this.code.line(`public readonly tags: ${TAG_MANAGER};`); + } else { + this.code.line(`public ${javascriptPropertyName}${line}`); + } + return javascriptPropertyName; + } + + private emitProperty(props: EmitPropertyProps, container: Container): string { + switch (container) { + case Container.Class: + return this.emitClassProperty(props); + case Container.Interface: + return this.emitInterfaceProperty(props); + default: + throw new Error(`Unsupported container ${container}`); + } + + } + private beginNamespace(type: genspec.CodeName) { if (type.namespace) { const parts = type.namespace.split('.'); @@ -557,7 +584,12 @@ export default class CodeGenerator { Object.keys(propTypeSpec.Properties).forEach(propName => { const propSpec = propTypeSpec.Properties[propName]; const additionalDocs = quoteCode(`${typeName.fqn}.${propName}`); - const newName = this.emitProperty(resourceContext, propName, propSpec, additionalDocs); + const newName = this.emitInterfaceProperty({ + context: resourceContext, + propName, + spec: propSpec, + additionalDocs, + }); conversionTable[propName] = newName; }); } @@ -577,6 +609,7 @@ export default class CodeGenerator { private findNativeType(resourceContext: genspec.CodeName, propSpec: schema.Property, propName?: string): string { const alternatives: string[] = []; + // render the union of all item types if (schema.isCollectionProperty(propSpec)) { // render the union of all item types const itemTypes = genspec.specTypesToCodeTypes(resourceContext, itemTypeNames(propSpec)); @@ -595,7 +628,6 @@ export default class CodeGenerator { alternatives.push(`{ [key: string]: (${union}) }`); } else { // To make TSLint happy, we have to either emit: SingleType[] or Array - if (union.indexOf('|') !== -1) { alternatives.push(`Array<${union}>`); } else { @@ -620,7 +652,6 @@ export default class CodeGenerator { if (!tokenizableType(alternatives) && propName !== 'Tags') { alternatives.push(genspec.TOKEN_NAME.fqn); } - return alternatives.join(' | '); } @@ -650,12 +681,6 @@ export default class CodeGenerator { this.code.line(' */'); return; } - - private validateRefKindPresence(name: string, resourceType: schema.ResourceType): any { - if (!resourceType.RefKind) { // Both empty string and undefined - throw new Error(`Resource ${name} does not have a RefKind; please run in @aws-cdk/cfnspec: npm run set-refkind ${name} Arn|Id|None|...`); - } - } } /** @@ -684,7 +709,9 @@ function tokenizableType(alternatives: string[]) { return true; } - // TODO: number + if (type === 'number') { + return true; + } return false; } @@ -704,3 +731,19 @@ function tagType(resource: schema.ResourceType): string { } return `${TAG_TYPE}.NotTaggable`; } + +function isTaggable(resource: schema.ResourceType): boolean { + return tagType(resource) !== `${TAG_TYPE}.NotTaggable`; +} + +enum Container { + Interface = 'INTERFACE', + Class = 'CLASS', +} + +interface EmitPropertyProps { + context: genspec.CodeName; + propName: string; + spec: schema.Property; + additionalDocs: string; +} diff --git a/tools/cfn2ts/lib/genspec.ts b/tools/cfn2ts/lib/genspec.ts index 4aab6695c57e5..38e4a9064eea9 100644 --- a/tools/cfn2ts/lib/genspec.ts +++ b/tools/cfn2ts/lib/genspec.ts @@ -167,9 +167,10 @@ export function validatorName(typeName: CodeName): CodeName { * - The type we will generate for the attribute, including its base class and docs. * - The property name we will use to refer to the attribute. */ -export function attributeDefinition(resourceName: CodeName, attributeName: string, spec: schema.Attribute): Attribute { - const descriptiveName = descriptiveAttributeName(resourceName, attributeName); // "BucketArn" - const propertyName = cloudFormationToScriptName(descriptiveName); // "bucketArn" +export function attributeDefinition(attributeName: string, spec: schema.Attribute): Attribute { + const descriptiveName = attributeName.replace(/\./g, ''); + const suffixName = codemaker.toPascalCase(cloudFormationToScriptName(descriptiveName)); + const propertyName = `attr${suffixName}`; // "attrArn" let attrType: string; if ('PrimitiveType' in spec && spec.PrimitiveType === 'String') { @@ -188,43 +189,6 @@ export function attributeDefinition(resourceName: CodeName, attributeName: strin return new Attribute(propertyName, attrType, constructorArguments); } -/** - * Return an attribute definition name for the RefKind for this class - */ -export function refAttributeDefinition(resourceName: CodeName, refKind: string): Attribute { - const propertyName = codemaker.toCamelCase(descriptiveAttributeName(resourceName, refKind)); - - const constructorArguments = 'this.ref'; - - return new Attribute(propertyName, 'string', constructorArguments); -} - -/** - * In the CDK, attribute names will be prefixed with the name of the resource (unless they already - * have the name of the resource as a prefix). There are a few reasons for that, mainly to avoid name - * collisions with base class properties, but also to allow certain constructs to expose multiple attributes - * of different sub-resources using the same names (i.e. 'bucketArn' and 'topicArn' can co-exist while 'arn' and 'arn' cannot). - */ -function descriptiveAttributeName(resourceName: CodeName, attributeName: string): string { - // remove '.'s - attributeName = attributeName.replace(/\./g, ''); - - const resName = resourceName.specName!.resourceName; - - // special case (someone was smart) - if (resName === 'SecurityGroup' && attributeName === 'GroupId') { - attributeName = 'SecurityGroupId'; - } - - // if property name already starts with the resource name, then just use it as-is - // otherwise, prepend the resource name - if (!attributeName.toLowerCase().startsWith(resName.toLowerCase())) { - attributeName = `${resName}${codemaker.toPascalCase(attributeName)}`; - } - - return attributeName; -} - /** * Convert a CloudFormation name to a nice TypeScript name *