Skip to content

Commit 149475e

Browse files
authored
Remove obsolete custom service package code (#3684)
1 parent 9d4fea3 commit 149475e

File tree

44 files changed

+73
-3486
lines changed

Some content is hidden

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

44 files changed

+73
-3486
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"services": [
3+
{
4+
"serviceName": "CloudFront",
5+
"type": "patch",
6+
"changeLogMessages": [
7+
"Removed the AmazonCloudFrontUtil utility code that was no longer being used."
8+
]
9+
},
10+
{
11+
"serviceName": "DynamoDBv2",
12+
"type": "patch",
13+
"changeLogMessages": [
14+
"Removed the DynamoDBContextTableNamePrefix property. Users should call AWSConfigsDynamoDB.Context.TableNamePrefix instead of AWSConfigsDynamoDB.Context.DynamoDBContextTableNamePrefix."
15+
]
16+
},
17+
{
18+
"serviceName": "EC2",
19+
"type": "patch",
20+
"changeLogMessages": [
21+
"Removed the VPC utilizes code. It was terribly out of date even referring to EC2 instance type that has been deprecated for years.",
22+
"Removed the image utilities used for looking up EC2 amis for Windows OS."
23+
]
24+
},
25+
{
26+
"serviceName": "IoT",
27+
"type": "patch",
28+
"changeLogMessages": [
29+
"Removed a legacy customization for NextToken override to refer to the actual modeled pagination token."
30+
]
31+
},
32+
{
33+
"serviceName": "Lambda",
34+
"type": "patch",
35+
"changeLogMessages": [
36+
"Removed obsolete InvokeAsync service client operation to avoid confusion with the Async suffix added for async .NET methods."
37+
]
38+
},
39+
{
40+
"serviceName": "SageMakerRuntime",
41+
"type": "patch",
42+
"changeLogMessages": [
43+
"Removed obsolete constructors for PayloadPart."
44+
]
45+
},
46+
{
47+
"serviceName": "SecurityToken",
48+
"type": "patch",
49+
"changeLogMessages": [
50+
"Removed the deprecated STS assume role credential provider since users should be using the one in core."
51+
]
52+
}
53+
]
54+
}

generator/ServiceModels/lambda/lambda.customizations.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
{
22
"shapeModifiers": {
3-
"InvokeAsyncRequest": {
4-
"deprecatedMessage": "For .NET 3.5/4.5, API InvokeAsyncResponse InvokeAsync(InvokeAsyncRequest) is deprecated, use InvokeResponse Invoke(InvokeRequest), or Task<InvokeResponse> InvokeAsync(InvokeRequest, CancellationToken) instead. For .NET Core, Task<InvokeAsyncResponse> InvokeAsyncAsync(InvokeAsyncRequest, CancellationToken) is deprecated, use Task<InvokeResponse> InvokeAsync(InvokeRequest, CancellationToken) instead.",
5-
"modify": [
6-
{
7-
"InvokeArgs": { "emitPropertyName": "InvokeArgsStream" }
8-
}
9-
]
10-
},
11-
"InvokeAsyncResponse": {
12-
"deprecatedMessage": "For .NET 3.5/4.5, API InvokeAsyncResponse InvokeAsync(InvokeAsyncRequest) is deprecated, use InvokeResponse Invoke(InvokeRequest), or Task<InvokeResponse> InvokeAsync(InvokeRequest, CancellationToken) instead. For .NET Core, Task<InvokeAsyncResponse> InvokeAsyncAsync(InvokeAsyncRequest, CancellationToken) is deprecated, use Task<InvokeResponse> InvokeAsync(InvokeRequest, CancellationToken) instead."
13-
},
143
"InvocationRequest": {
154
"modify": [
165
{
@@ -74,7 +63,7 @@
7463
},
7564
"operationModifiers": {
7665
"InvokeAsync": {
77-
"deprecatedMessage": "For .NET 3.5/4.5, API InvokeAsyncResponse InvokeAsync(InvokeAsyncRequest) is deprecated, use InvokeResponse Invoke(InvokeRequest), or Task<InvokeResponse> InvokeAsync(InvokeRequest, CancellationToken) instead. For .NET Core, Task<InvokeAsyncResponse> InvokeAsyncAsync(InvokeAsyncRequest, CancellationToken) is deprecated, use Task<InvokeResponse> InvokeAsync(InvokeRequest, CancellationToken) instead."
66+
"exclude": true
7867
}
7968
},
8069
"emitIsSetProperties": {

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -840,12 +840,6 @@
840840
<max>1024</max>
841841
<pattern>(\$LATEST|[0-9]+)</pattern>
842842
</property-value-rule>
843-
<property-value-rule>
844-
<property>Amazon.Lambda.Model.InvokeAsyncRequest.FunctionName</property>
845-
<min>1</min>
846-
<max>170</max>
847-
<pattern>(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_\.]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?</pattern>
848-
</property-value-rule>
849843
<property-value-rule>
850844
<property>Amazon.Lambda.Model.InvokeWithResponseStreamRequest.FunctionName</property>
851845
<min>1</min>
@@ -1743,6 +1737,12 @@
17431737
<property>Amazon.Lambda.Model.ImageConfig.WorkingDirectory</property>
17441738
<max>1000</max>
17451739
</property-value-rule>
1740+
<property-value-rule>
1741+
<property>Amazon.Lambda.Model.InvokeAsyncRequest.FunctionName</property>
1742+
<min>1</min>
1743+
<max>170</max>
1744+
<pattern>(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_\.]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?</pattern>
1745+
</property-value-rule>
17461746
<property-value-rule>
17471747
<property>Amazon.Lambda.Model.Layer.Arn</property>
17481748
<min>1</min>

sdk/src/Core/Amazon.Runtime/Internal/Endpoints/StandardLibrary/Fn.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ public static string Interpolate(string template, Dictionary<string, object> ref
367367
/// </summary>
368368
public static string InterpolateJson(string json, Dictionary<string, object> refs)
369369
{
370+
if (string.IsNullOrEmpty(json))
371+
return string.Empty;
370372
try
371373
{
372374
using JsonDocument doc = JsonDocument.Parse(json);
@@ -381,7 +383,7 @@ public static string InterpolateJson(string json, Dictionary<string, object> ref
381383
}
382384
catch (JsonException)
383385
{
384-
return "";
386+
return string.Empty;
385387
}
386388
}
387389

sdk/src/Core/Amazon.Runtime/Pipeline/Handlers/EndpointDiscoveryHandler.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ public override async System.Threading.Tasks.Task<T> InvokeAsync<T>(IExecutionCo
6969
{
7070
var requestContext = executionContext.RequestContext;
7171
var regionalEndpoint = requestContext.Request.Endpoint;
72-
PreInvoke(executionContext);
72+
73+
var immutableCredentials = (requestContext.Identity as AWSCredentials)?.GetCredentialsAsync();
74+
75+
PreInvoke(executionContext, immutableCredentials);
7376

7477
try
7578
{
@@ -107,7 +110,7 @@ public static void EvictCacheKeyForRequest(IRequestContext requestContext, Uri r
107110
requestContext.Request.Endpoint = regionalEndpoint;
108111
}
109112

110-
public static void DiscoverEndpoints(IRequestContext requestContext, bool evictCacheKey)
113+
public static void DiscoverEndpoints(IRequestContext requestContext, bool evictCacheKey, ImmutableCredentials credentials)
111114
{
112115
var discoveryEndpoints = ProcessEndpointDiscovery(requestContext, evictCacheKey, requestContext.Request.Endpoint);
113116
if (discoveryEndpoints != null)
@@ -130,10 +133,9 @@ public static void DiscoverEndpoints(IRequestContext requestContext, bool evictC
130133
}
131134
}
132135

133-
private static IEnumerable<DiscoveryEndpointBase> ProcessEndpointDiscovery(IRequestContext requestContext, bool evictCacheKey, Uri evictUri)
136+
private static IEnumerable<DiscoveryEndpointBase> ProcessEndpointDiscovery(IRequestContext requestContext, bool evictCacheKey, Uri evictUri, ImmutableCredentials immutableCredentials)
134137
{
135138
var options = requestContext.Options;
136-
var immutableCredentials = (requestContext.Identity as AWSCredentials)?.GetCredentials();
137139

138140
if (options.EndpointDiscoveryMarshaller != null && options.EndpointOperation != null && immutableCredentials != null)
139141
{

sdk/src/Services/CloudFormation/Custom/Model/UpdateStackRequest.Extensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public partial class UpdateStackRequest : AmazonCloudFormationRequest
3333
/// </summary>
3434
public UpdateStackRequest()
3535
{
36-
this._notificationARNs = new AutoConstructedList<string>();
36+
this._notificationARNs = AWSConfigs.InitializeCollections ? new AutoConstructedList<string>() : null;
3737
}
3838
}
3939
}

sdk/src/Services/CloudFront/Custom/Util/CloudFrontConstants.cs

Lines changed: 0 additions & 48 deletions
This file was deleted.

sdk/src/Services/CloudFront/Custom/Util/_bcl/AmazonCloudFrontUtil.cs

Lines changed: 0 additions & 74 deletions
This file was deleted.

sdk/src/Services/DynamoDBv2/Custom/AWSConfigs.DynamoDB.cs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -57,33 +57,11 @@ static AWSConfigsDynamoDB()
5757

5858
#region DynamoDBContext TableNamePrefix
5959

60-
6160
/// <summary>
6261
/// Key for the DynamoDBContextTableNamePrefix property.
63-
/// <seealso cref="AWSConfigsDynamoDB.DynamoDBContextTableNamePrefix"/>
6462
/// </summary>
6563
public const string DynamoDBContextTableNamePrefixKey = "AWS.DynamoDBContext.TableNamePrefix";
6664

67-
/// <summary>
68-
/// Configures the default TableNamePrefix that the DynamoDBContext will use if
69-
/// not manually configured.
70-
/// Changes to this setting will only take effect in newly-constructed instances of
71-
/// DynamoDBContextConfig and DynamoDBContext.
72-
///
73-
/// The setting can be configured through App.config, for example:
74-
/// <code>
75-
/// &lt;appSettings&gt;
76-
/// &lt;add key="AWS.DynamoDBContext.TableNamePrefix" value="Test-"/&gt;
77-
/// &lt;/appSettings&gt;
78-
/// </code>
79-
/// </summary>
80-
[Obsolete("This property is obsolete. Use DynamoDBConfig.Context.TableNamePrefix instead.")]
81-
public static string DynamoDBContextTableNamePrefix
82-
{
83-
get { return Context.TableNamePrefix; }
84-
set { Context.TableNamePrefix = value; }
85-
}
86-
8765
#endregion
8866

8967
/// <summary>

0 commit comments

Comments
 (0)