Skip to content

Commit 8182d9b

Browse files
This release adds support for new filter types in GetProducts API, including EQUALS, CONTAINS, ANY_OF, and NONE_OF.
1 parent fcba40e commit 8182d9b

File tree

5 files changed

+66
-8
lines changed

5 files changed

+66
-8
lines changed

generator/ServiceModels/pricing/pricing-2017-10-15.api.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,13 @@
190190
},
191191
"FilterType":{
192192
"type":"string",
193-
"enum":["TERM_MATCH"]
193+
"enum":[
194+
"TERM_MATCH",
195+
"EQUALS",
196+
"CONTAINS",
197+
"ANY_OF",
198+
"NONE_OF"
199+
]
194200
},
195201
"Filters":{
196202
"type":"list",

generator/ServiceModels/pricing/pricing-2017-10-15.docs.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"FilterType": {
9797
"base": null,
9898
"refs": {
99-
"Filter$Type": "<p>The type of filter that you want to use.</p> <p>Valid values are: <code>TERM_MATCH</code>. <code>TERM_MATCH</code> returns only products that match both the given filter field and the given value.</p>"
99+
"Filter$Type": "<p>The type of filter that you want to use.</p> <p>Valid values are:</p> <ul> <li> <p> <code>TERM_MATCH</code>: Returns only products that match both the given filter field and the given value.</p> </li> <li> <p> <code>EQUALS</code>: Returns products that have a field value exactly matching the provided value.</p> </li> <li> <p> <code>CONTAINS</code>: Returns products where the field value contains the provided value as a substring.</p> </li> <li> <p> <code>ANY_OF</code>: Returns products where the field value is any of the provided values.</p> </li> <li> <p> <code>NONE_OF</code>: Returns products where the field value is not any of the provided values.</p> </li> </ul>"
100100
}
101101
},
102102
"Filters": {
@@ -270,7 +270,7 @@
270270
"Value": {
271271
"base": null,
272272
"refs": {
273-
"Filter$Value": "<p>The service code or attribute value that you want to filter by. If you're filtering by service code this is the actual service code, such as <code>AmazonEC2</code>. If you're filtering by attribute name, this is the attribute value that you want the returned products to match, such as a <code>Provisioned IOPS</code> volume.</p>"
273+
"Filter$Value": "<p>The service code or attribute value that you want to filter by. If you're filtering by service code this is the actual service code, such as <code>AmazonEC2</code>. If you're filtering by attribute name, this is the attribute value that you want the returned products to match, such as a <code>Provisioned IOPS</code> volume.</p> <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>"
274274
}
275275
},
276276
"errorMessage": {

generator/ServiceModels/pricing/pricing-2017-10-15.normal.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,22 +217,28 @@
217217
"members":{
218218
"Type":{
219219
"shape":"FilterType",
220-
"documentation":"<p>The type of filter that you want to use.</p> <p>Valid values are: <code>TERM_MATCH</code>. <code>TERM_MATCH</code> returns only products that match both the given filter field and the given value.</p>"
220+
"documentation":"<p>The type of filter that you want to use.</p> <p>Valid values are:</p> <ul> <li> <p> <code>TERM_MATCH</code>: Returns only products that match both the given filter field and the given value.</p> </li> <li> <p> <code>EQUALS</code>: Returns products that have a field value exactly matching the provided value.</p> </li> <li> <p> <code>CONTAINS</code>: Returns products where the field value contains the provided value as a substring.</p> </li> <li> <p> <code>ANY_OF</code>: Returns products where the field value is any of the provided values.</p> </li> <li> <p> <code>NONE_OF</code>: Returns products where the field value is not any of the provided values.</p> </li> </ul>"
221221
},
222222
"Field":{
223223
"shape":"Field",
224224
"documentation":"<p>The product metadata field that you want to filter on. You can filter by just the service code to see all products for a specific service, filter by just the attribute name to see a specific attribute for multiple services, or use both a service code and an attribute name to retrieve only products that match both fields.</p> <p>Valid values include: <code>ServiceCode</code>, and all attribute names</p> <p>For example, you can filter by the <code>AmazonEC2</code> service code and the <code>volumeType</code> attribute name to get the prices for only Amazon EC2 volumes.</p>"
225225
},
226226
"Value":{
227227
"shape":"Value",
228-
"documentation":"<p>The service code or attribute value that you want to filter by. If you're filtering by service code this is the actual service code, such as <code>AmazonEC2</code>. If you're filtering by attribute name, this is the attribute value that you want the returned products to match, such as a <code>Provisioned IOPS</code> volume.</p>"
228+
"documentation":"<p>The service code or attribute value that you want to filter by. If you're filtering by service code this is the actual service code, such as <code>AmazonEC2</code>. If you're filtering by attribute name, this is the attribute value that you want the returned products to match, such as a <code>Provisioned IOPS</code> volume.</p> <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>"
229229
}
230230
},
231231
"documentation":"<p>The constraints that you want all returned products to match.</p>"
232232
},
233233
"FilterType":{
234234
"type":"string",
235-
"enum":["TERM_MATCH"]
235+
"enum":[
236+
"TERM_MATCH",
237+
"EQUALS",
238+
"CONTAINS",
239+
"ANY_OF",
240+
"NONE_OF"
241+
]
236242
},
237243
"Filters":{
238244
"type":"list",

sdk/src/Services/Pricing/Generated/Model/Filter.cs

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,33 @@ internal bool IsSetField()
7676
/// </para>
7777
///
7878
/// <para>
79-
/// Valid values are: <c>TERM_MATCH</c>. <c>TERM_MATCH</c> returns only products that
80-
/// match both the given filter field and the given value.
79+
/// Valid values are:
8180
/// </para>
81+
/// <ul> <li>
82+
/// <para>
83+
/// <c>TERM_MATCH</c>: Returns only products that match both the given filter field and
84+
/// the given value.
85+
/// </para>
86+
/// </li> <li>
87+
/// <para>
88+
/// <c>EQUALS</c>: Returns products that have a field value exactly matching the provided
89+
/// value.
90+
/// </para>
91+
/// </li> <li>
92+
/// <para>
93+
/// <c>CONTAINS</c>: Returns products where the field value contains the provided value
94+
/// as a substring.
95+
/// </para>
96+
/// </li> <li>
97+
/// <para>
98+
/// <c>ANY_OF</c>: Returns products where the field value is any of the provided values.
99+
/// </para>
100+
/// </li> <li>
101+
/// <para>
102+
/// <c>NONE_OF</c>: Returns products where the field value is not any of the provided
103+
/// values.
104+
/// </para>
105+
/// </li> </ul>
82106
/// </summary>
83107
[AWSProperty(Required=true)]
84108
public FilterType Type
@@ -101,6 +125,12 @@ internal bool IsSetType()
101125
/// filtering by attribute name, this is the attribute value that you want the returned
102126
/// products to match, such as a <c>Provisioned IOPS</c> volume.
103127
/// </para>
128+
///
129+
/// <para>
130+
/// For <c>ANY_OF</c> and <c>NONE_OF</c> filter types, you can provide multiple values
131+
/// as a comma-separated string. For example, <c>t2.micro,t2.small,t2.medium</c> or <c>Compute
132+
/// optimized, GPU instance, Micro instances</c>.
133+
/// </para>
104134
/// </summary>
105135
[AWSProperty(Required=true, Min=1, Max=1024)]
106136
public string Value

sdk/src/Services/Pricing/Generated/ServiceEnumerations.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,22 @@ namespace Amazon.Pricing
3030
public class FilterType : ConstantClass
3131
{
3232

33+
/// <summary>
34+
/// Constant ANY_OF for FilterType
35+
/// </summary>
36+
public static readonly FilterType ANY_OF = new FilterType("ANY_OF");
37+
/// <summary>
38+
/// Constant CONTAINS for FilterType
39+
/// </summary>
40+
public static readonly FilterType CONTAINS = new FilterType("CONTAINS");
41+
/// <summary>
42+
/// Constant EQUALS for FilterType
43+
/// </summary>
44+
public static readonly FilterType EQUALS = new FilterType("EQUALS");
45+
/// <summary>
46+
/// Constant NONE_OF for FilterType
47+
/// </summary>
48+
public static readonly FilterType NONE_OF = new FilterType("NONE_OF");
3349
/// <summary>
3450
/// Constant TERM_MATCH for FilterType
3551
/// </summary>

0 commit comments

Comments
 (0)