Skip to content

Commit

Permalink
chore(iot1click): remove the shut down service aws-iot1click (#32844)
Browse files Browse the repository at this point in the history
Removing the aws-iot1click package for the shut down service https://docs.aws.amazon.com/iot/latest/developerguide/iot-legacy-services.html
This PR is required to fix the Spec update PR cdklabs/awscdk-service-spec#1559

I updated the Spec2Cdk tool to accept extra parameter to maintain the list of services we want to skip generating them.

### 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*
  • Loading branch information
moelasmar authored Jan 11, 2025
1 parent 49eb9d3 commit 166466d
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 59 deletions.
1 change: 0 additions & 1 deletion .github/workflows/issue-label-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ env:
{"area":"@aws-cdk/aws-inspector","keywords":["aws-inspector","inspector"],"labels":["@aws-cdk/aws-inspector"]},
{"area":"@aws-cdk/aws-iot","keywords":["internet-of-things","aws-iot","iot"],"labels":["@aws-cdk/aws-iot"],"affixes":{"suffixes":["-alpha"]}},
{"area":"@aws-cdk/aws-iot-actions","keywords":["aws-iot-actions","iot-actions"],"labels":["@aws-cdk/aws-iot-actions"],"affixes":{"suffixes":["-alpha"]}},
{"area":"@aws-cdk/aws-iot1click","keywords":["aws-iot1click","iot1click"],"labels":["@aws-cdk/aws-iot1click"]},
{"area":"@aws-cdk/aws-iotanalytics","keywords":["aws-iotanalytics","iotanalytics"],"labels":["@aws-cdk/aws-iotanalytics"]},
{"area":"@aws-cdk/aws-iotevents","keywords":["aws-iotevents","iotevents"],"labels":["@aws-cdk/aws-iotevents"],"affixes":{"suffixes":["-alpha"]}},
{"area":"@aws-cdk/aws-iotevents-actions","keywords":["aws-iotevents","iotevents-actions"],"labels":["@aws-cdk/aws-iotevents-actions"],"affixes":{"suffixes":["-alpha"]}},
Expand Down
1 change: 1 addition & 0 deletions deprecated_apis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1098,3 +1098,4 @@ aws-cdk-lib.pipelines.UpdatePipelineActionProps#pipelineStackHierarchicalId
aws-cdk-lib.pipelines.UpdatePipelineActionProps#pipelineStackName
aws-cdk-lib.pipelines.UpdatePipelineActionProps#privileged
aws-cdk-lib.pipelines.UpdatePipelineActionProps#projectName
aws-cdk-lib.iot1click
13 changes: 0 additions & 13 deletions packages/aws-cdk-lib/aws-iot1click/.jsiirc.json

This file was deleted.

27 changes: 0 additions & 27 deletions packages/aws-cdk-lib/aws-iot1click/README.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/aws-cdk-lib/aws-iot1click/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/aws-cdk-lib/aws-iot1click/lib/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@
"forecastqueryservice": "forecastquery",
"forecastservice": "forecast",
"globalaccelerator": "global-accelerator",
"iot1clickdevicesservice": "iot-1click-devices-service",
"iot1clickprojects": "iot-1click-projects",
"iotevents": "iot-events",
"ioteventsdata": "iot-events-data",
"iotjobsdataplane": "iot-jobs-data-plane",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,12 +492,6 @@
"internetmonitor": {
"iamPrefix": "internetmonitor"
},
"iot-1click-devices-service": {
"iamPrefix": "iot1click"
},
"iot-1click-projects": {
"iamPrefix": "iot1click"
},
"iot-data-plane": {
"iamPrefix": "iotdata"
},
Expand Down
1 change: 0 additions & 1 deletion packages/aws-cdk-lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ export * as aws_inspectorv2 from './aws-inspectorv2';
export * as aws_internetmonitor from './aws-internetmonitor';
export * as aws_invoicing from './aws-invoicing';
export * as aws_iot from './aws-iot';
export * as aws_iot1click from './aws-iot1click';
export * as aws_iotanalytics from './aws-iotanalytics';
export * as aws_iotcoredeviceadvisor from './aws-iotcoredeviceadvisor';
export * as aws_iotevents from './aws-iotevents';
Expand Down
1 change: 0 additions & 1 deletion packages/aws-cdk-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@
"./aws-internetmonitor": "./aws-internetmonitor/index.js",
"./aws-invoicing": "./aws-invoicing/index.js",
"./aws-iot": "./aws-iot/index.js",
"./aws-iot1click": "./aws-iot1click/index.js",
"./aws-iotanalytics": "./aws-iotanalytics/index.js",
"./aws-iotcoredeviceadvisor": "./aws-iotcoredeviceadvisor/index.js",
"./aws-iotevents": "./aws-iotevents/index.js",
Expand Down
1 change: 1 addition & 0 deletions packages/aws-cdk-lib/scripts/gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ async function main() {
const generated = (await generateAll(awsCdkLibDir, {
coreImport: '../../core',
cloudwatchImport: '../../aws-cloudwatch',
skippedServices: ['AWS::IoT1Click'],
scopeMapPath,
}));

Expand Down
3 changes: 0 additions & 3 deletions packages/aws-cdk-lib/scripts/scope-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,6 @@
"aws-iot": [
"AWS::IoT"
],
"aws-iot1click": [
"AWS::IoT1Click"
],
"aws-iotanalytics": [
"AWS::IoTAnalytics"
],
Expand Down
1 change: 0 additions & 1 deletion tools/@aws-cdk/pkglint/lib/aws-service-official-names.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"AWS::GuardDuty": "Amazon GuardDuty",
"AWS::IAM": "AWS Identity and Access Management",
"AWS::Inspector": "Amazon Inspector",
"AWS::IoT1Click": "AWS IoT 1-Click",
"AWS::IoT": "AWS IoT",
"AWS::IoTAnalytics": "AWS IoT Analytics",
"AWS::IoTThingsGraph": "AWS IoT Things Graph",
Expand Down
5 changes: 3 additions & 2 deletions tools/@aws-cdk/spec2cdk/lib/cfn2ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ function computeSuffix(scope: string, allScopes: string[]): string | undefined {
*/
export async function generateAll(
outPath: string,
{ scopeMapPath, ...options }: GenerateAllOptions,
{ scopeMapPath, skippedServices, ...options }: GenerateAllOptions,
): Promise<ModuleMap> {
const scopes = await getAllScopes('cloudFormationNamespace');
const allScopes = await getAllScopes('cloudFormationNamespace');
const scopes = skippedServices? allScopes.filter((scope) => !skippedServices.includes(scope)) : allScopes;
const moduleMap = await readScopeMap(scopeMapPath);

// Make sure all scopes have their own dedicated package/namespace.
Expand Down
5 changes: 5 additions & 0 deletions tools/@aws-cdk/spec2cdk/lib/cfn2ts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ export interface GenerateAllOptions extends CodeGeneratorOptions, AugmentationsG
* Path of the file containing the map of module names to their CFN Scopes
*/
scopeMapPath: string;

/**
* List of service names to be skipped it will be in format AWS::Service like AWS::S3
*/
skippedServices?: string[];
}

/**
Expand Down

0 comments on commit 166466d

Please sign in to comment.