Skip to content

Commit 4e51d0a

Browse files
Add ComputationModelVersion support in IoT SiteWise APIs
1 parent 97bce89 commit 4e51d0a

File tree

12 files changed

+106
-5
lines changed

12 files changed

+106
-5
lines changed

generator/ServiceModels/iotsitewise/iotsitewise-2019-12-02.api.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3284,6 +3284,10 @@
32843284
"type":"string",
32853285
"enum":["ANOMALY_DETECTION"]
32863286
},
3287+
"ComputationModelVersionFilter":{
3288+
"type":"string",
3289+
"pattern":"^(LATEST|ACTIVE|[1-9]{1}\\d{0,9})$"
3290+
},
32873291
"ComputeLocation":{
32883292
"type":"string",
32893293
"enum":[
@@ -4604,6 +4608,11 @@
46044608
"shape":"ID",
46054609
"location":"uri",
46064610
"locationName":"computationModelId"
4611+
},
4612+
"computationModelVersion":{
4613+
"shape":"ComputationModelVersionFilter",
4614+
"location":"querystring",
4615+
"locationName":"computationModelVersion"
46074616
}
46084617
}
46094618
},

generator/ServiceModels/iotsitewise/iotsitewise-2019-12-02.docs.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"BatchGetAssetPropertyValue": "<p>Gets the current value for one or more asset properties. For more information, see <a href=\"https://docs.aws.amazon.com/iot-sitewise/latest/userguide/query-industrial-data.html#current-values\">Querying current values</a> in the <i>IoT SiteWise User Guide</i>.</p>",
1111
"BatchGetAssetPropertyValueHistory": "<p>Gets the historical values for one or more asset properties. For more information, see <a href=\"https://docs.aws.amazon.com/iot-sitewise/latest/userguide/query-industrial-data.html#historical-values\">Querying historical values</a> in the <i>IoT SiteWise User Guide</i>.</p>",
1212
"BatchPutAssetPropertyValue": "<p>Sends a list of asset property values to IoT SiteWise. Each value is a timestamp-quality-value (TQV) data point. For more information, see <a href=\"https://docs.aws.amazon.com/iot-sitewise/latest/userguide/ingest-api.html\">Ingesting data using the API</a> in the <i>IoT SiteWise User Guide</i>.</p> <p>To identify an asset property, you must specify one of the following:</p> <ul> <li> <p>The <code>assetId</code> and <code>propertyId</code> of an asset property.</p> </li> <li> <p>A <code>propertyAlias</code>, which is a data stream alias (for example, <code>/company/windfarm/3/turbine/7/temperature</code>). To define an asset property's alias, see <a href=\"https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_UpdateAssetProperty.html\">UpdateAssetProperty</a>.</p> </li> </ul> <important> <p>With respect to Unix epoch time, IoT SiteWise accepts only TQVs that have a timestamp of no more than 7 days in the past and no more than 10 minutes in the future. IoT SiteWise rejects timestamps outside of the inclusive range of [-7 days, +10 minutes] and returns a <code>TimestampOutOfRangeException</code> error.</p> <p>For each asset property, IoT SiteWise overwrites TQVs with duplicate timestamps unless the newer TQV has a different quality. For example, if you store a TQV <code>{T1, GOOD, V1}</code>, then storing <code>{T1, GOOD, V2}</code> replaces the existing TQV.</p> </important> <p>IoT SiteWise authorizes access to each <code>BatchPutAssetPropertyValue</code> entry individually. For more information, see <a href=\"https://docs.aws.amazon.com/iot-sitewise/latest/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-batchputassetpropertyvalue-action\">BatchPutAssetPropertyValue authorization</a> in the <i>IoT SiteWise User Guide</i>.</p>",
13-
"CreateAccessPolicy": "<p>Creates an access policy that grants the specified identity (IAM Identity Center user, IAM Identity Center group, or IAM user) access to the specified IoT SiteWise Monitor portal or project resource.</p>",
13+
"CreateAccessPolicy": "<p>Creates an access policy that grants the specified identity (IAM Identity Center user, IAM Identity Center group, or IAM user) access to the specified IoT SiteWise Monitor portal or project resource.</p> <note> <p>Support for access policies that use an SSO Group as the identity is not supported at this time.</p> </note>",
1414
"CreateAsset": "<p>Creates an asset from an existing asset model. For more information, see <a href=\"https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-assets.html\">Creating assets</a> in the <i>IoT SiteWise User Guide</i>.</p>",
1515
"CreateAssetModel": "<p>Creates an asset model from specified property and hierarchy definitions. You create assets from asset models. With asset models, you can easily create assets of the same type that have standardized definitions. Each asset created from a model inherits the asset model's property and hierarchy definitions. For more information, see <a href=\"https://docs.aws.amazon.com/iot-sitewise/latest/userguide/define-models.html\">Defining asset models</a> in the <i>IoT SiteWise User Guide</i>.</p> <p>You can create three types of asset models, <code>ASSET_MODEL</code>, <code>COMPONENT_MODEL</code>, or an <code>INTERFACE</code>.</p> <ul> <li> <p> <b>ASSET_MODEL</b> – (default) An asset model that you can use to create assets. Can't be included as a component in another asset model.</p> </li> <li> <p> <b>COMPONENT_MODEL</b> – A reusable component that you can include in the composite models of other asset models. You can't create assets directly from this type of asset model. </p> </li> <li> <p> <b>INTERFACE</b> – An interface is a type of model that defines a standard structure that can be applied to different asset models.</p> </li> </ul>",
1616
"CreateAssetModelCompositeModel": "<p>Creates a custom composite model from specified property and hierarchy definitions. There are two types of custom composite models, <code>inline</code> and <code>component-model-based</code>. </p> <p>Use component-model-based custom composite models to define standard, reusable components. A component-model-based custom composite model consists of a name, a description, and the ID of the component model it references. A component-model-based custom composite model has no properties of its own; its referenced component model provides its associated properties to any created assets. For more information, see <a href=\"https://docs.aws.amazon.com/iot-sitewise/latest/userguide/custom-composite-models.html\">Custom composite models (Components)</a> in the <i>IoT SiteWise User Guide</i>.</p> <p>Use inline custom composite models to organize the properties of an asset model. The properties of inline custom composite models are local to the asset model where they are included and can't be used to create multiple assets.</p> <p>To create a component-model-based model, specify the <code>composedAssetModelId</code> of an existing asset model with <code>assetModelType</code> of <code>COMPONENT_MODEL</code>.</p> <p>To create an inline model, specify the <code>assetModelCompositeModelProperties</code> and don't include an <code>composedAssetModelId</code>.</p>",
@@ -1325,6 +1325,12 @@
13251325
"ListComputationModelsRequest$computationModelType": "<p>The type of computation model. If a <code>computationModelType</code> is not provided, all types of computation models are returned.</p>"
13261326
}
13271327
},
1328+
"ComputationModelVersionFilter": {
1329+
"base": null,
1330+
"refs": {
1331+
"DescribeComputationModelRequest$computationModelVersion": "<p>The version of the computation model.</p>"
1332+
}
1333+
},
13281334
"ComputeLocation": {
13291335
"base": null,
13301336
"refs": {
@@ -2133,7 +2139,7 @@
21332139
"ExecuteQueryMaxResults": {
21342140
"base": null,
21352141
"refs": {
2136-
"ExecuteQueryRequest$maxResults": "<p>The maximum number of results to return at one time.</p> <ul> <li> <p>Minimum is 1</p> </li> <li> <p>Maximum is 20000</p> </li> <li> <p>Default is 250</p> </li> </ul>"
2142+
"ExecuteQueryRequest$maxResults": "<p>The maximum number of results to return at one time.</p> <ul> <li> <p>Minimum is 1</p> </li> <li> <p>Maximum is 20000</p> </li> <li> <p>Default is 20000</p> </li> </ul>"
21372143
}
21382144
},
21392145
"ExecuteQueryNextToken": {

generator/ServiceModels/iotsitewise/iotsitewise-2019-12-02.normal.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
{"shape":"ThrottlingException"},
175175
{"shape":"LimitExceededException"}
176176
],
177-
"documentation":"<p>Creates an access policy that grants the specified identity (IAM Identity Center user, IAM Identity Center group, or IAM user) access to the specified IoT SiteWise Monitor portal or project resource.</p>",
177+
"documentation":"<p>Creates an access policy that grants the specified identity (IAM Identity Center user, IAM Identity Center group, or IAM user) access to the specified IoT SiteWise Monitor portal or project resource.</p> <note> <p>Support for access policies that use an SSO Group as the identity is not supported at this time.</p> </note>",
178178
"endpoint":{"hostPrefix":"monitor."}
179179
},
180180
"CreateAsset":{
@@ -4325,6 +4325,10 @@
43254325
"type":"string",
43264326
"enum":["ANOMALY_DETECTION"]
43274327
},
4328+
"ComputationModelVersionFilter":{
4329+
"type":"string",
4330+
"pattern":"^(LATEST|ACTIVE|[1-9]{1}\\d{0,9})$"
4331+
},
43284332
"ComputeLocation":{
43294333
"type":"string",
43304334
"enum":[
@@ -6414,6 +6418,12 @@
64146418
"documentation":"<p>The ID of the computation model.</p>",
64156419
"location":"uri",
64166420
"locationName":"computationModelId"
6421+
},
6422+
"computationModelVersion":{
6423+
"shape":"ComputationModelVersionFilter",
6424+
"documentation":"<p>The version of the computation model.</p>",
6425+
"location":"querystring",
6426+
"locationName":"computationModelVersion"
64176427
}
64186428
}
64196429
},
@@ -7317,7 +7327,7 @@
73177327
},
73187328
"maxResults":{
73197329
"shape":"ExecuteQueryMaxResults",
7320-
"documentation":"<p>The maximum number of results to return at one time.</p> <ul> <li> <p>Minimum is 1</p> </li> <li> <p>Maximum is 20000</p> </li> <li> <p>Default is 250</p> </li> </ul>"
7330+
"documentation":"<p>The maximum number of results to return at one time.</p> <ul> <li> <p>Minimum is 1</p> </li> <li> <p>Maximum is 20000</p> </li> <li> <p>Default is 20000</p> </li> </ul>"
73217331
},
73227332
"clientToken":{
73237333
"shape":"ClientToken",

sdk/code-analysis/ServiceAnalysis/IoTSiteWise/Generated/PropertyValueRules.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,10 @@
10561056
<max>36</max>
10571057
<pattern>^(?!00000000-0000-0000-0000-000000000000)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</pattern>
10581058
</property-value-rule>
1059+
<property-value-rule>
1060+
<property>Amazon.IoTSiteWise.Model.DescribeComputationModelRequest.ComputationModelVersion</property>
1061+
<pattern>^(LATEST|ACTIVE|[1-9]{1}\d{0,9})$</pattern>
1062+
</property-value-rule>
10591063
<property-value-rule>
10601064
<property>Amazon.IoTSiteWise.Model.DescribeComputationModelResponse.ComputationModelArn</property>
10611065
<min>1</min>

sdk/src/Services/IoTSiteWise/Generated/Model/CreateAccessPolicyRequest.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ namespace Amazon.IoTSiteWise.Model
3434
/// Creates an access policy that grants the specified identity (IAM Identity Center user,
3535
/// IAM Identity Center group, or IAM user) access to the specified IoT SiteWise Monitor
3636
/// portal or project resource.
37+
///
38+
/// <note>
39+
/// <para>
40+
/// Support for access policies that use an SSO Group as the identity is not supported
41+
/// at this time.
42+
/// </para>
43+
/// </note>
3744
/// </summary>
3845
public partial class CreateAccessPolicyRequest : AmazonIoTSiteWiseRequest
3946
{

sdk/src/Services/IoTSiteWise/Generated/Model/DescribeComputationModelRequest.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ namespace Amazon.IoTSiteWise.Model
3636
public partial class DescribeComputationModelRequest : AmazonIoTSiteWiseRequest
3737
{
3838
private string _computationModelId;
39+
private string _computationModelVersion;
3940

4041
/// <summary>
4142
/// Gets and sets the property ComputationModelId.
@@ -56,5 +57,23 @@ internal bool IsSetComputationModelId()
5657
return this._computationModelId != null;
5758
}
5859

60+
/// <summary>
61+
/// Gets and sets the property ComputationModelVersion.
62+
/// <para>
63+
/// The version of the computation model.
64+
/// </para>
65+
/// </summary>
66+
public string ComputationModelVersion
67+
{
68+
get { return this._computationModelVersion; }
69+
set { this._computationModelVersion = value; }
70+
}
71+
72+
// Check to see if ComputationModelVersion property is set
73+
internal bool IsSetComputationModelVersion()
74+
{
75+
return this._computationModelVersion != null;
76+
}
77+
5978
}
6079
}

sdk/src/Services/IoTSiteWise/Generated/Model/ExecuteQueryRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ internal bool IsSetClientToken()
7676
/// </para>
7777
/// </li> <li>
7878
/// <para>
79-
/// Default is 250
79+
/// Default is 20000
8080
/// </para>
8181
/// </li> </ul>
8282
/// </summary>

sdk/src/Services/IoTSiteWise/Generated/Model/Internal/MarshallTransformations/DescribeComputationModelRequestMarshaller.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ public IRequest Marshall(DescribeComputationModelRequest publicRequest)
6565
if (!publicRequest.IsSetComputationModelId())
6666
throw new AmazonIoTSiteWiseException("Request object does not have required field ComputationModelId set");
6767
request.AddPathResource("{computationModelId}", StringUtils.FromString(publicRequest.ComputationModelId));
68+
69+
if (publicRequest.IsSetComputationModelVersion())
70+
request.Parameters.Add("computationModelVersion", StringUtils.FromString(publicRequest.ComputationModelVersion));
6871
request.ResourcePath = "/computation-models/{computationModelId}";
72+
request.UseQueryString = true;
6973

7074
request.HostPrefix = $"api.";
7175

sdk/src/Services/IoTSiteWise/Generated/_bcl/AmazonIoTSiteWiseClient.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,13 @@ public virtual BatchPutAssetPropertyValueResponse BatchPutAssetPropertyValue(Bat
11231123
/// Creates an access policy that grants the specified identity (IAM Identity Center user,
11241124
/// IAM Identity Center group, or IAM user) access to the specified IoT SiteWise Monitor
11251125
/// portal or project resource.
1126+
///
1127+
/// <note>
1128+
/// <para>
1129+
/// Support for access policies that use an SSO Group as the identity is not supported
1130+
/// at this time.
1131+
/// </para>
1132+
/// </note>
11261133
/// </summary>
11271134
/// <param name="request">Container for the necessary parameters to execute the CreateAccessPolicy service method.</param>
11281135
///
@@ -1174,6 +1181,13 @@ public virtual CreateAccessPolicyResponse CreateAccessPolicy(CreateAccessPolicyR
11741181
/// Creates an access policy that grants the specified identity (IAM Identity Center user,
11751182
/// IAM Identity Center group, or IAM user) access to the specified IoT SiteWise Monitor
11761183
/// portal or project resource.
1184+
///
1185+
/// <note>
1186+
/// <para>
1187+
/// Support for access policies that use an SSO Group as the identity is not supported
1188+
/// at this time.
1189+
/// </para>
1190+
/// </note>
11771191
/// </summary>
11781192
/// <param name="request">Container for the necessary parameters to execute the CreateAccessPolicy service method.</param>
11791193
/// <param name="cancellationToken">

sdk/src/Services/IoTSiteWise/Generated/_bcl/IAmazonIoTSiteWise.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,13 @@ public partial interface IAmazonIoTSiteWise : IAmazonService, IDisposable
803803
/// Creates an access policy that grants the specified identity (IAM Identity Center user,
804804
/// IAM Identity Center group, or IAM user) access to the specified IoT SiteWise Monitor
805805
/// portal or project resource.
806+
///
807+
/// <note>
808+
/// <para>
809+
/// Support for access policies that use an SSO Group as the identity is not supported
810+
/// at this time.
811+
/// </para>
812+
/// </note>
806813
/// </summary>
807814
/// <param name="request">Container for the necessary parameters to execute the CreateAccessPolicy service method.</param>
808815
///
@@ -848,6 +855,13 @@ public partial interface IAmazonIoTSiteWise : IAmazonService, IDisposable
848855
/// Creates an access policy that grants the specified identity (IAM Identity Center user,
849856
/// IAM Identity Center group, or IAM user) access to the specified IoT SiteWise Monitor
850857
/// portal or project resource.
858+
///
859+
/// <note>
860+
/// <para>
861+
/// Support for access policies that use an SSO Group as the identity is not supported
862+
/// at this time.
863+
/// </para>
864+
/// </note>
851865
/// </summary>
852866
/// <param name="request">Container for the necessary parameters to execute the CreateAccessPolicy service method.</param>
853867
/// <param name="cancellationToken">

0 commit comments

Comments
 (0)