From 25249dd8ef65ea65ed4f19f0c2141e28ffc31bf7 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Tue, 5 Oct 2021 14:20:10 +0200 Subject: [PATCH] chore: rollback `GenericSSMParameterImage` deprecation (#16798) This class was deprecated because it should not have been used directly: - It is used more as a base class for other images - It should be accessed through factory functions on `MachineImage`. - It has an uppercased acronym `SSM`, which should have been spelled as `Ssm`. The deprecated API stripper does the wrong thing when a base class is deprecated however, and leaves `WindowsImage` in a broken state. See https://github.com/aws/jsii/issues/3025 Temporarily rolling this back until we can fix jsii. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* (cherry picked from commit 5dfc50759cafd3afa9e760d548571d75bdcf9853) --- packages/@aws-cdk/aws-ec2/lib/machine-image.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-ec2/lib/machine-image.ts b/packages/@aws-cdk/aws-ec2/lib/machine-image.ts index c7340af1d47e5..731d9ea8d0c43 100644 --- a/packages/@aws-cdk/aws-ec2/lib/machine-image.ts +++ b/packages/@aws-cdk/aws-ec2/lib/machine-image.ts @@ -149,10 +149,12 @@ export interface MachineImageConfig { * on the instance if you are using this image. * * The AMI ID is selected using the values published to the SSM parameter store. - * - * @deprecated Use `MachineImage.fromSsmParameter()` instead */ export class GenericSSMParameterImage implements IMachineImage { + // FIXME: this class ought to be `@deprecated` and removed from v2, but that + // is causing build failure right now. Ref: https://github.com/aws/jsii/issues/3025 + // @-deprecated Use `MachineImage.fromSsmParameter()` instead + /** * Name of the SSM parameter we're looking up */ @@ -679,4 +681,4 @@ function lookupImage(scope: Construct, cachedInContext: boolean | undefined, par return cachedInContext ? ssm.StringParameter.valueFromLookup(scope, parameterName) : ssm.StringParameter.valueForTypedStringParameter(scope, parameterName, ssm.ParameterType.AWS_EC2_IMAGE_ID); -} \ No newline at end of file +}