Skip to content

Commit 0f1048c

Browse files
author
awstools
committed
feat(client-pricing): This release adds support for new filter types in GetProducts API, including EQUALS, CONTAINS, ANY_OF, and NONE_OF.
1 parent 5b32ed8 commit 0f1048c

File tree

3 files changed

+56
-5
lines changed

3 files changed

+56
-5
lines changed

clients/client-pricing/src/commands/GetProductsCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface GetProductsCommandOutput extends GetProductsResponse, __Metadat
3939
* ServiceCode: "STRING_VALUE", // required
4040
* Filters: [ // Filters
4141
* { // Filter
42-
* Type: "TERM_MATCH", // required
42+
* Type: "TERM_MATCH" || "EQUALS" || "CONTAINS" || "ANY_OF" || "NONE_OF", // required
4343
* Field: "STRING_VALUE", // required
4444
* Value: "STRING_VALUE", // required
4545
* },

clients/client-pricing/src/models/models_0.ts

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ export class ResourceNotFoundException extends __BaseException {
360360
* @enum
361361
*/
362362
export const FilterType = {
363+
ANY_OF: "ANY_OF",
364+
CONTAINS: "CONTAINS",
365+
EQUALS: "EQUALS",
366+
NONE_OF: "NONE_OF",
363367
TERM_MATCH: "TERM_MATCH",
364368
} as const;
365369

@@ -375,8 +379,30 @@ export type FilterType = (typeof FilterType)[keyof typeof FilterType];
375379
export interface Filter {
376380
/**
377381
* <p>The type of filter that you want to use.</p>
378-
* <p>Valid values are: <code>TERM_MATCH</code>. <code>TERM_MATCH</code> returns only
379-
* products that match both the given filter field and the given value.</p>
382+
* <p>Valid values are:</p>
383+
* <ul>
384+
* <li>
385+
* <p>
386+
* <code>TERM_MATCH</code>: Returns only
387+
* products that match both the given filter field and the given value.</p>
388+
* </li>
389+
* <li>
390+
* <p>
391+
* <code>EQUALS</code>: Returns products that have a field value exactly matching the provided value.</p>
392+
* </li>
393+
* <li>
394+
* <p>
395+
* <code>CONTAINS</code>: Returns products where the field value contains the provided value as a substring.</p>
396+
* </li>
397+
* <li>
398+
* <p>
399+
* <code>ANY_OF</code>: Returns products where the field value is any of the provided values.</p>
400+
* </li>
401+
* <li>
402+
* <p>
403+
* <code>NONE_OF</code>: Returns products where the field value is not any of the provided values.</p>
404+
* </li>
405+
* </ul>
380406
* @public
381407
*/
382408
Type: FilterType | undefined;
@@ -398,6 +424,7 @@ export interface Filter {
398424
* by service code this is the actual service code, such as <code>AmazonEC2</code>. If you're
399425
* filtering by attribute name, this is the attribute value that you want the returned
400426
* products to match, such as a <code>Provisioned IOPS</code> volume.</p>
427+
* <p>For <code>ANY_OF</code> and <code>NONE_OF</code> filter types, you can provide multiple values as a comma-separated string. For example, <code>t2.micro,t2.small,t2.medium</code> or <code>Compute optimized, GPU instance, Micro instances</code>.</p>
401428
* @public
402429
*/
403430
Value: string | undefined;

codegen/sdk-codegen/aws-models/pricing.json

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@
928928
"Type": {
929929
"target": "com.amazonaws.pricing#FilterType",
930930
"traits": {
931-
"smithy.api#documentation": "<p>The type of filter that you want to use.</p>\n <p>Valid values are: <code>TERM_MATCH</code>. <code>TERM_MATCH</code> returns only \n products that match both the given filter field and the given value.</p>",
931+
"smithy.api#documentation": "<p>The type of filter that you want to use.</p>\n <p>Valid values are:</p>\n <ul>\n <li>\n <p>\n <code>TERM_MATCH</code>: Returns only \n products that match both the given filter field and the given value.</p>\n </li>\n <li>\n <p>\n <code>EQUALS</code>: Returns products that have a field value exactly matching the provided value.</p>\n </li>\n <li>\n <p>\n <code>CONTAINS</code>: Returns products where the field value contains the provided value as a substring.</p>\n </li>\n <li>\n <p>\n <code>ANY_OF</code>: Returns products where the field value is any of the provided values.</p>\n </li>\n <li>\n <p>\n <code>NONE_OF</code>: Returns products where the field value is not any of the provided values.</p>\n </li>\n </ul>",
932932
"smithy.api#required": {}
933933
}
934934
},
@@ -942,7 +942,7 @@
942942
"Value": {
943943
"target": "com.amazonaws.pricing#Value",
944944
"traits": {
945-
"smithy.api#documentation": "<p>The service code or attribute value that you want to filter by. If you're filtering\n by service code this is the actual service code, such as <code>AmazonEC2</code>. If you're\n filtering by attribute name, this is the attribute value that you want the returned\n products to match, such as a <code>Provisioned IOPS</code> volume.</p>",
945+
"smithy.api#documentation": "<p>The service code or attribute value that you want to filter by. If you're filtering\n by service code this is the actual service code, such as <code>AmazonEC2</code>. If you're\n filtering by attribute name, this is the attribute value that you want the returned\n products to match, such as a <code>Provisioned IOPS</code> volume.</p>\n <p>For <code>ANY_OF</code> and <code>NONE_OF</code> filter types, you can provide multiple values as a comma-separated string. For example, <code>t2.micro,t2.small,t2.medium</code> or <code>Compute optimized, GPU instance, Micro instances</code>.</p>",
946946
"smithy.api#required": {}
947947
}
948948
}
@@ -959,6 +959,30 @@
959959
"traits": {
960960
"smithy.api#enumValue": "TERM_MATCH"
961961
}
962+
},
963+
"EQUALS": {
964+
"target": "smithy.api#Unit",
965+
"traits": {
966+
"smithy.api#enumValue": "EQUALS"
967+
}
968+
},
969+
"CONTAINS": {
970+
"target": "smithy.api#Unit",
971+
"traits": {
972+
"smithy.api#enumValue": "CONTAINS"
973+
}
974+
},
975+
"ANY_OF": {
976+
"target": "smithy.api#Unit",
977+
"traits": {
978+
"smithy.api#enumValue": "ANY_OF"
979+
}
980+
},
981+
"NONE_OF": {
982+
"target": "smithy.api#Unit",
983+
"traits": {
984+
"smithy.api#enumValue": "NONE_OF"
985+
}
962986
}
963987
}
964988
},

0 commit comments

Comments
 (0)