@@ -4366,24 +4366,19 @@ def list_feature_groups(
4366
4366
"""
4367
4367
list_feature_groups_args = {}
4368
4368
4369
- if name_contains :
4370
- list_feature_groups_args ["NameContains" ] = name_contains
4371
- if feature_group_status_equals :
4372
- list_feature_groups_args ["FeatureGroupStatusEquals" ] = feature_group_status_equals
4373
- if offline_store_status_equals :
4374
- list_feature_groups_args ["OfflineStoreStatusEquals" ] = offline_store_status_equals
4375
- if creation_time_after :
4376
- list_feature_groups_args ["CreationTimeAfter" ] = creation_time_after
4377
- if creation_time_before :
4378
- list_feature_groups_args ["CreationTimeBefore" ] = creation_time_before
4379
- if sort_order :
4380
- list_feature_groups_args ["SortOrder" ] = sort_order
4381
- if sort_by :
4382
- list_feature_groups_args ["SortBy" ] = sort_by
4383
- if max_results :
4384
- list_feature_groups_args ["MaxResults" ] = max_results
4385
- if next_token :
4386
- list_feature_groups_args ["NextToken" ] = next_token
4369
+ def check_object (key , value ):
4370
+ if value is not None :
4371
+ list_feature_groups_args [key ] = value
4372
+
4373
+ check_object ("NameContains" , name_contains )
4374
+ check_object ("FeatureGroupStatusEquals" , feature_group_status_equals )
4375
+ check_object ("OfflineStoreStatusEquals" , offline_store_status_equals )
4376
+ check_object ("CreationTimeAfter" , creation_time_after )
4377
+ check_object ("CreationTimeBefore" , creation_time_before )
4378
+ check_object ("SortOrder" , sort_order )
4379
+ check_object ("SortBy" , sort_by )
4380
+ check_object ("MaxResults" , max_results )
4381
+ check_object ("NextToken" , next_token )
4387
4382
4388
4383
return self .sagemaker_client .list_feature_groups (** list_feature_groups_args )
4389
4384
0 commit comments