Skip to content

HubContent and ImageVersion does not have get_all() methods #289

@benieric

Description

@benieric

Describe the bug
A clear and concise description of what the bug is.
When running codegen, can see some warnings that HubContent and ImageVersion do not have get_all() methods.

[04/15/25 10:50:54] WARNING  Resource HubContent summaries do not have required members to create object instance. Resource may require custom key mapping for get_all().                                                                                            resources_codegen.py:1766
                             List HubContentInfo Members: dict_keys(['HubContentName', 'HubContentArn', 'SageMakerPublicHubContentArn', 'HubContentVersion', 'HubContentType', 'DocumentSchemaVersion', 'HubContentDisplayName', 'HubContentDescription',                                     
                             'SupportStatus', 'HubContentSearchKeywords', 'HubContentStatus', 'CreationTime', 'OriginalCreationTime']), Object Required Members: ['HubName', 'HubContentType', 'HubContentName']                                                                              
                    WARNING  Resource ImageVersion summaries do not have required members to create object instance. Resource may require custom key mapping for get_all().                                                                                          resources_codegen.py:1766
                             List ImageVersion Members: dict_keys(['CreationTime', 'FailureReason', 'ImageArn', 'ImageVersionArn', 'ImageVersionStatus', 'LastModifiedTime', 'Version']), Object Required Members: ['ImageName']      

Would need some change in how the ResourceIterator interacts with these custom_key_mapping to enable converting:

  1. HubContentArn -> HubName
  2. ImageVersionArn -> ImageName

To reproduce
A clear, step-by-step set of instructions to reproduce the bug.
The provided code need to be complete and runnable, if additional data is needed, please include them in the issue.

pip install .
python src/sagemaker_core/tools/codegen.py

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots or logs
If applicable, add screenshots or logs to help explain your problem.

Bug information
A description of your system. Please provide:

  • SageMaker Core version:
  • Python version:
  • Is the issue with autogen code or with generate code ?:

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions