From f48220fd9dfc3532bc887d008897630b75df5d53 Mon Sep 17 00:00:00 2001 From: Matsuda Date: Fri, 11 Oct 2024 04:04:41 +0900 Subject: [PATCH] chore(glue): support ConnectionType.MARKETPLACE and ConnectionType.CUSTOM (#30395) ### Issue # (if applicable) N/A ### Reason for this change `MARKETPLACE` and `CUSTOM` are not supported in the current L2 Construct. (`SFTP` is also missing, but it is not supported at the moment.) https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-connection-connectioninput.html#cfn-glue-connection-connectioninput-connectiontype ### Description of changes Add missing connection types. ### Description of how you validated changes I determined that no testing was needed since this was only an addition of connection types. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-glue-alpha/lib/connection.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/@aws-cdk/aws-glue-alpha/lib/connection.ts b/packages/@aws-cdk/aws-glue-alpha/lib/connection.ts index 3d8b4738f3d57..e999eb58d11e5 100644 --- a/packages/@aws-cdk/aws-glue-alpha/lib/connection.ts +++ b/packages/@aws-cdk/aws-glue-alpha/lib/connection.ts @@ -8,6 +8,8 @@ import { CfnConnection } from 'aws-cdk-lib/aws-glue'; * * If you need to use a connection type that doesn't exist as a static member, you * can instantiate a `ConnectionType` object, e.g: `new ConnectionType('NEW_TYPE')`. + * + * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-connection-connectioninput.html#cfn-glue-connection-connectioninput-connectiontype */ export class ConnectionType { @@ -31,6 +33,18 @@ export class ConnectionType { */ public static readonly NETWORK = new ConnectionType('NETWORK'); + /** + * Uses configuration settings contained in a connector purchased from AWS Marketplace + * to read from and write to data stores that are not natively supported by AWS Glue. + */ + public static readonly MARKETPLACE = new ConnectionType('MARKETPLACE'); + + /** + * Uses configuration settings contained in a custom connector to read from and write to data stores + * that are not natively supported by AWS Glue. + */ + public static readonly CUSTOM = new ConnectionType('CUSTOM'); + /** * The name of this ConnectionType, as expected by Connection resource. */