Skip to content

Commit 0693099

Browse files
Added support for mobile app restrictions in Amazon Location API keys.
1 parent 5076ba4 commit 0693099

File tree

63 files changed

+9949
-833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+9949
-833
lines changed

generator/ServiceModels/location/location-2020-11-19.api.json

Lines changed: 204 additions & 100 deletions
Large diffs are not rendered by default.

generator/ServiceModels/location/location-2020-11-19.docs.json

Lines changed: 229 additions & 304 deletions
Large diffs are not rendered by default.

generator/ServiceModels/location/location-2020-11-19.endpoint-rule-set.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@
55
"builtIn": "AWS::Region",
66
"required": false,
77
"documentation": "The AWS region used to dispatch the request.",
8-
"type": "String"
8+
"type": "string"
99
},
1010
"UseDualStack": {
1111
"builtIn": "AWS::UseDualStack",
1212
"required": true,
1313
"default": false,
1414
"documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.",
15-
"type": "Boolean"
15+
"type": "boolean"
1616
},
1717
"UseFIPS": {
1818
"builtIn": "AWS::UseFIPS",
1919
"required": true,
2020
"default": false,
2121
"documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.",
22-
"type": "Boolean"
22+
"type": "boolean"
2323
},
2424
"Endpoint": {
2525
"builtIn": "SDK::Endpoint",
2626
"required": false,
2727
"documentation": "Override the endpoint used to send this request",
28-
"type": "String"
28+
"type": "string"
2929
}
3030
},
3131
"rules": [
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
22
"version": "1.0",
3-
"examples": {
4-
}
3+
"examples": {}
54
}

generator/ServiceModels/location/location-2020-11-19.normal.json

Lines changed: 249 additions & 128 deletions
Large diffs are not rendered by default.

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,24 @@
10071007
<max>100</max>
10081008
<pattern>[-._\p{L}\p{N}]+</pattern>
10091009
</property-value-rule>
1010+
<property-value-rule>
1011+
<property>Amazon.LocationService.Model.AndroidApp.CertificateFingerprint</property>
1012+
<min>59</min>
1013+
<max>59</max>
1014+
<pattern>([A-Fa-f0-9]{2}:){19}[A-Fa-f0-9]{2}</pattern>
1015+
</property-value-rule>
1016+
<property-value-rule>
1017+
<property>Amazon.LocationService.Model.AndroidApp.Package</property>
1018+
<min>1</min>
1019+
<max>255</max>
1020+
<pattern>([A-Za-z][A-Za-z\d_]*\.)+[A-Za-z][A-Za-z\d_]*</pattern>
1021+
</property-value-rule>
1022+
<property-value-rule>
1023+
<property>Amazon.LocationService.Model.AppleApp.BundleId</property>
1024+
<min>1</min>
1025+
<max>155</max>
1026+
<pattern>[A-Za-z0-9\-]+(\.[A-Za-z0-9\-]+)+</pattern>
1027+
</property-value-rule>
10101028
<property-value-rule>
10111029
<property>Amazon.LocationService.Model.BatchDeleteDevicePositionHistoryError.DeviceId</property>
10121030
<min>1</min>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the location-2020-11-19.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.LocationService.Model
31+
{
32+
/// <summary>
33+
/// Unique identifying information for an Android app. Consists of a package name and
34+
/// a 20 byte SHA-1 certificate fingerprint.
35+
/// </summary>
36+
public partial class AndroidApp
37+
{
38+
private string _certificateFingerprint;
39+
private string _package;
40+
41+
/// <summary>
42+
/// Gets and sets the property CertificateFingerprint.
43+
/// <para>
44+
/// 20 byte SHA-1 certificate fingerprint associated with the Android app signing certificate.
45+
/// </para>
46+
/// </summary>
47+
[AWSProperty(Required=true, Min=59, Max=59)]
48+
public string CertificateFingerprint
49+
{
50+
get { return this._certificateFingerprint; }
51+
set { this._certificateFingerprint = value; }
52+
}
53+
54+
// Check to see if CertificateFingerprint property is set
55+
internal bool IsSetCertificateFingerprint()
56+
{
57+
return this._certificateFingerprint != null;
58+
}
59+
60+
/// <summary>
61+
/// Gets and sets the property Package.
62+
/// <para>
63+
/// Unique package name for an Android app.
64+
/// </para>
65+
/// </summary>
66+
[AWSProperty(Required=true, Min=1, Max=255)]
67+
public string Package
68+
{
69+
get { return this._package; }
70+
set { this._package = value; }
71+
}
72+
73+
// Check to see if Package property is set
74+
internal bool IsSetPackage()
75+
{
76+
return this._package != null;
77+
}
78+
79+
}
80+
}

sdk/src/Services/LocationService/Generated/Model/ApiKeyRestrictions.cs

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ namespace Amazon.LocationService.Model
3535
public partial class ApiKeyRestrictions
3636
{
3737
private List<string> _allowActions = AWSConfigs.InitializeCollections ? new List<string>() : null;
38+
private List<AndroidApp> _allowAndroidApps = AWSConfigs.InitializeCollections ? new List<AndroidApp>() : null;
39+
private List<AppleApp> _allowAppleApps = AWSConfigs.InitializeCollections ? new List<AppleApp>() : null;
3840
private List<string> _allowReferers = AWSConfigs.InitializeCollections ? new List<string>() : null;
3941
private List<string> _allowResources = AWSConfigs.InitializeCollections ? new List<string>() : null;
4042

@@ -183,6 +185,46 @@ internal bool IsSetAllowActions()
183185
return this._allowActions != null && (this._allowActions.Count > 0 || !AWSConfigs.InitializeCollections);
184186
}
185187

188+
/// <summary>
189+
/// Gets and sets the property AllowAndroidApps.
190+
/// <para>
191+
/// An optional list of allowed Android applications for which requests must originate
192+
/// from. Requests using this API key from other sources will not be allowed.
193+
/// </para>
194+
/// </summary>
195+
[AWSProperty(Min=0, Max=5)]
196+
public List<AndroidApp> AllowAndroidApps
197+
{
198+
get { return this._allowAndroidApps; }
199+
set { this._allowAndroidApps = value; }
200+
}
201+
202+
// Check to see if AllowAndroidApps property is set
203+
internal bool IsSetAllowAndroidApps()
204+
{
205+
return this._allowAndroidApps != null && (this._allowAndroidApps.Count > 0 || !AWSConfigs.InitializeCollections);
206+
}
207+
208+
/// <summary>
209+
/// Gets and sets the property AllowAppleApps.
210+
/// <para>
211+
/// An optional list of allowed Apple applications for which requests must originate from.
212+
/// Requests using this API key from other sources will not be allowed.
213+
/// </para>
214+
/// </summary>
215+
[AWSProperty(Min=0, Max=5)]
216+
public List<AppleApp> AllowAppleApps
217+
{
218+
get { return this._allowAppleApps; }
219+
set { this._allowAppleApps = value; }
220+
}
221+
222+
// Check to see if AllowAppleApps property is set
223+
internal bool IsSetAllowAppleApps()
224+
{
225+
return this._allowAppleApps != null && (this._allowAppleApps.Count > 0 || !AWSConfigs.InitializeCollections);
226+
}
227+
186228
/// <summary>
187229
/// Gets and sets the property AllowReferers.
188230
/// <para>
@@ -222,7 +264,7 @@ internal bool IsSetAllowActions()
222264
/// </para>
223265
/// </li> </ul>
224266
/// </summary>
225-
[AWSProperty(Min=1, Max=5)]
267+
[AWSProperty(Min=0, Max=5)]
226268
public List<string> AllowReferers
227269
{
228270
get { return this._allowReferers; }
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the location-2020-11-19.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.LocationService.Model
31+
{
32+
/// <summary>
33+
/// Unique identifying information for an Apple app (iOS, macOS, tvOS and watchOS). Consists
34+
/// of an Apple Bundle ID.
35+
/// </summary>
36+
public partial class AppleApp
37+
{
38+
private string _bundleId;
39+
40+
/// <summary>
41+
/// Gets and sets the property BundleId.
42+
/// <para>
43+
/// The unique identifier of the app across all Apple platforms (iOS, macOS, tvOS, watchOS,
44+
/// etc.)
45+
/// </para>
46+
/// </summary>
47+
[AWSProperty(Required=true, Min=1, Max=155)]
48+
public string BundleId
49+
{
50+
get { return this._bundleId; }
51+
set { this._bundleId = value; }
52+
}
53+
54+
// Check to see if BundleId property is set
55+
internal bool IsSetBundleId()
56+
{
57+
return this._bundleId != null;
58+
}
59+
60+
}
61+
}

sdk/src/Services/LocationService/Generated/Model/CalculateRouteCarModeOptions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public partial class CalculateRouteCarModeOptions
5252
/// Valid Values: <c>false</c> | <c>true</c>
5353
/// </para>
5454
/// </summary>
55+
[AWSProperty(Sensitive=true)]
5556
public bool AvoidFerries
5657
{
5758
get { return this._avoidFerries.GetValueOrDefault(); }
@@ -78,6 +79,7 @@ internal bool IsSetAvoidFerries()
7879
/// Valid Values: <c>false</c> | <c>true</c>
7980
/// </para>
8081
/// </summary>
82+
[AWSProperty(Sensitive=true)]
8183
public bool AvoidTolls
8284
{
8385
get { return this._avoidTolls.GetValueOrDefault(); }

0 commit comments

Comments
 (0)