Skip to content

Conversation

@brmur
Copy link
Owner

@brmur brmur commented Oct 17, 2025

This pull request...


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -0,0 +1,128 @@
inspector_Enable:
title: Enable &Inspector; scanning

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same problem as previous versions, it is not using a valid entity name. Also, it appears to be missing the hello example.

excerpts:
- description: Enable Inspector scanning for specified resource types.
snippet_tags:
- python.example_code.inspector.Enable

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Kiro version correctly put 3 snippets here: class, decl, and the action code. This one is missing the extra snippets.

services:
inspector: {Disable}
inspector_Hello:
title: Hello &Inspector;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, here is the hello example. It should have been at the top.


try:
# Create Inspector wrapper
inspector_wrapper = InspectorWrapper.from_client()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the Kiro example, it shouldn't use the wrapper for the hello example, instead it should stand alone.

if max_results:
params["maxResults"] = max_results

response = self.inspector_client.list_coverage(**params)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a paginated operation, it should use the paginator here.


def usage_demo():
"""
Shows how to use the InspectorWrapper class.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer the scenario to be in a separate file, to be consistent with the rest of the library. Here it is included in the wrapper file.

wrapper = InspectorWrapper.from_client()

try:
# Get account status

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scenario doesn't include all of the steps given in the spec.

Stub functions that are used by the Amazon Inspector unit tests.
"""

from test_tools.example_stubber import ExampleStubber

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It creates the stubber file, but does not add it to the stubber list in stubber_factory.py. It also didn't write any tests (but maybe that wasn't requested).

@@ -0,0 +1,73 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A README should have been created in the new service folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants