From 44360cc8bb34c713e99afa564eceafea8ea41545 Mon Sep 17 00:00:00 2001 From: Matsuda Date: Wed, 25 Dec 2024 06:50:11 +0900 Subject: [PATCH 1/2] chore(glue): add missing connection types (#32600) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Issue # (if applicable) N/A ### Reason for this change Missing Glue connection types. Ref: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-connection-connectioninput.html#cfn-glue-connection-connectioninput-connectiontype ``` VIEW_VALIDATION_REDSHIFT - Designates a connection used for view validation by Amazon Redshift. VIEW_VALIDATION_ATHENA - Designates a connection used for view validation by Amazon Athena. ... FACEBOOKADS - Designates a connection to Facebook Ads. GOOGLEADS - Designates a connection to Google Ads. GOOGLESHEETS - Designates a connection to Google Sheets. GOOGLEANALYTICS4 - Designates a connection to Google Analytics 4. HUBSPOT - Designates a connection to HubSpot. INSTAGRAMADS - Designates a connection to Instagram Ads. INTERCOM - Designates a connection to Intercom. JIRACLOUD - Designates a connection to Jira Cloud. MARKETO - Designates a connection to Adobe Marketo Engage. NETSUITEERP - Designates a connection to Oracle NetSuite. SALESFORCE - Designates a connection to Salesforce using OAuth authentication. SALESFORCEMARKETINGCLOUD - Designates a connection to Salesforce Marketing Cloud. SALESFORCEPARDOT - Designates a connection to Salesforce Marketing Cloud Account Engagement (MCAE). SAPODATA - Designates a connection to SAP OData. SERVICENOW - Designates a connection to ServiceNow. SLACK - Designates a connection to Slack. SNAPCHATADS - Designates a connection to Snapchat Ads. STRIPE - Designates a connection to Stripe. ZENDESK - Designates a connection to Zendesk. ZOHOCRM - Designates a connection to Zoho CRM. ``` ### Description of changes Add enums. ### Describe any new or updated permissions being added Nothing. ### Description of how you validated changes Just add enums, so I've not added a test. ### 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* --- .../@aws-cdk/aws-glue-alpha/lib/connection.ts | 114 +++++++++++++++++- 1 file changed, 112 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-glue-alpha/lib/connection.ts b/packages/@aws-cdk/aws-glue-alpha/lib/connection.ts index e999eb58d11e5..61981720abd0a 100644 --- a/packages/@aws-cdk/aws-glue-alpha/lib/connection.ts +++ b/packages/@aws-cdk/aws-glue-alpha/lib/connection.ts @@ -28,6 +28,16 @@ export class ConnectionType { */ public static readonly MONGODB = new ConnectionType('MONGODB'); + /** + * Designates a connection used for view validation by Amazon Redshift. + */ + public static readonly VIEW_VALIDATION_REDSHIFT = new ConnectionType('VIEW_VALIDATION_REDSHIFT'); + + /** + * Designates a connection used for view validation by Amazon Athena. + */ + public static readonly VIEW_VALIDATION_ATHENA = new ConnectionType('VIEW_VALIDATION_ATHENA'); + /** * Designates a network connection to a data source within an Amazon Virtual Private Cloud environment (Amazon VPC). */ @@ -45,6 +55,106 @@ export class ConnectionType { */ public static readonly CUSTOM = new ConnectionType('CUSTOM'); + /** + * Designates a connection to Facebook Ads. + */ + public static readonly FACEBOOKADS = new ConnectionType('FACEBOOKADS'); + + /** + * Designates a connection to Google Ads. + */ + public static readonly GOOGLEADS = new ConnectionType('GOOGLEADS'); + + /** + * Designates a connection to Google Sheets. + */ + public static readonly GOOGLESHEETS = new ConnectionType('GOOGLESHEETS'); + + /** + * Designates a connection to Google Analytics 4. + */ + public static readonly GOOGLEANALYTICS4 = new ConnectionType('GOOGLEANALYTICS4'); + + /** + * Designates a connection to HubSpot. + */ + public static readonly HUBSPOT = new ConnectionType('HUBSPOT'); + + /** + * Designates a connection to Instagram Ads. + */ + public static readonly INSTAGRAMADS = new ConnectionType('INSTAGRAMADS'); + + /** + * Designates a connection to Intercom. + */ + public static readonly INTERCOM = new ConnectionType('INTERCOM'); + + /** + * Designates a connection to Jira Cloud. + */ + public static readonly JIRACLOUD = new ConnectionType('JIRACLOUD'); + + /** + * Designates a connection to Adobe Marketo Engage. + */ + public static readonly MARKETO = new ConnectionType('MARKETO'); + + /** + * Designates a connection to Oracle NetSuite. + */ + public static readonly NETSUITEERP = new ConnectionType('NETSUITEERP'); + + /** + * Designates a connection to Salesforce using OAuth authentication. + */ + public static readonly SALESFORCE = new ConnectionType('SALESFORCE'); + + /** + * Designates a connection to Salesforce Marketing Cloud. + */ + public static readonly SALESFORCEMARKETINGCLOUD = new ConnectionType('SALESFORCEMARKETINGCLOUD'); + + /** + * Designates a connection to Salesforce Marketing Cloud Account Engagement (MCAE). + */ + public static readonly SALESFORCEPARDOT = new ConnectionType('SALESFORCEPARDOT'); + + /** + * Designates a connection to SAP OData. + */ + public static readonly SAPODATA = new ConnectionType('SAPODATA'); + + /** + * Designates a connection to ServiceNow. + */ + public static readonly SERVICENOW = new ConnectionType('SERVICENOW'); + + /** + * Designates a connection to Slack. + */ + public static readonly SLACK = new ConnectionType('SLACK'); + + /** + * Designates a connection to Snapchat Ads. + */ + public static readonly SNAPCHATADS = new ConnectionType('SNAPCHATADS'); + + /** + * Designates a connection to Stripe. + */ + public static readonly STRIPE = new ConnectionType('STRIPE'); + + /** + * Designates a connection to Zendesk. + */ + public static readonly ZENDESK = new ConnectionType('ZENDESK'); + + /** + * Designates a connection to Zoho CRM. + */ + public static readonly ZOHOCRM = new ConnectionType('ZOHOCRM'); + /** * The name of this ConnectionType, as expected by Connection resource. */ @@ -169,7 +279,7 @@ export class Connection extends cdk.Resource implements IConnection { return new Import(scope, id); } - private static buildConnectionArn(scope: constructs.Construct, connectionName: string) : string { + private static buildConnectionArn(scope: constructs.Construct, connectionName: string): string { return cdk.Stack.of(scope).formatArn({ service: 'glue', resource: 'connection', @@ -187,7 +297,7 @@ export class Connection extends cdk.Resource implements IConnection { */ public readonly connectionName: string; - private readonly properties: {[key: string]: string}; + private readonly properties: { [key: string]: string }; constructor(scope: constructs.Construct, id: string, props: ConnectionProps) { super(scope, id, { From b00de76efd5efb0214bf05227bf5c9e515a0c842 Mon Sep 17 00:00:00 2001 From: Momo Kornher Date: Tue, 24 Dec 2024 23:20:23 +0100 Subject: [PATCH 2/2] chore(cdk-build-tools): allow packing of private packages for local testing (#32644) ### Reason for this change Sometimes there is a need to pack a private package so it can be tested as a package locally. For example when a package is not released during development. Previously it was not possible to pack a private package with our tooling. ### Description of changes Adds a `--private` flag to the `cdk-package` command to allow force packing of private packages. ### Describe any new or updated permissions being added n/a ### Description of how you validated changes Manually used the new flag to pack a private package. ### 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* --- tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts | 6 ++++-- tools/@aws-cdk/cdk-build-tools/lib/package-info.ts | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts b/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts index bc48546f91787..66ae1264f4265 100644 --- a/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts +++ b/tools/@aws-cdk/cdk-build-tools/bin/cdk-package.ts @@ -24,6 +24,7 @@ async function main() { }) .option('pre-only', { type: 'boolean', default: false, desc: 'run pre package steps only' }) .option('post-only', { type: 'boolean', default: false, desc: 'run post package steps only' }) + .option('private', { type: 'boolean', default: false, desc: 'Also package private packages for local usage' }) .argv; if (args['pre-only'] && args['post-only']) { @@ -43,8 +44,9 @@ async function main() { const outdir = 'dist'; // if this is a private module, don't package - if (isPrivate()) { - process.stdout.write('No packaging for private modules.\n'); + const packPrivate = args.private || options.private; + if (isPrivate() && !packPrivate) { + process.stdout.write('No packaging for private modules.\nUse --private to force packing private packages for local testing.\n'); return; } diff --git a/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts b/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts index 9657930be27d7..6687cfb497f67 100644 --- a/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts +++ b/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts @@ -205,6 +205,12 @@ export interface CDKPackageOptions { * Should this package be bundled. (and if so, how) */ bundle?: Omit; + + /** + * Also package private packages for local usage. + * @default false + */ + private?: boolean; } /**