Skip to content

Commit d1073e0

Browse files
authored
Add ThumbprintString property to mgmt (#36320)
* Add ThumbprintString property to websites. * Add ThumbprintString for automation. * Update * Add ThumbprintString for batch * Add Thumbprint for iothub * Add ThumbprintString for notificationhubs * update * update * update * Fix test * Add obsolete attribute and make Thumbprint backwards compatible.
1 parent 49e3913 commit d1073e0

File tree

74 files changed

+1142
-802
lines changed

Some content is hidden

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

74 files changed

+1142
-802
lines changed

sdk/automation/Azure.ResourceManager.Automation/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
### Features Added
66

7+
- Added `AutomationCertificateData.ThumbprintString`, `AutomationCertificateCreateOrUpdateContent.ThumbprintString` to return the hexadecimal string representation of the SHA-1 hash of the certificate.
8+
`AutomationCertificateData.Thumbprint`, `AutomationCertificateCreateOrUpdateContent.Thumbprint` have been hidden but are still available.
9+
710
### Breaking Changes
811

912
### Bugs Fixed

sdk/automation/Azure.ResourceManager.Automation/api/Azure.ResourceManager.Automation.netstandard2.0.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,10 @@ public AutomationCertificateData() { }
250250
public System.DateTimeOffset? ExpireOn { get { throw null; } }
251251
public bool? IsExportable { get { throw null; } }
252252
public System.DateTimeOffset? LastModifiedOn { get { throw null; } }
253+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
254+
[System.ObsoleteAttribute("This property is obsolete and will be removed in a future release. Please use `ThumbprintString` instead.", false)]
253255
public System.BinaryData Thumbprint { get { throw null; } }
256+
public string ThumbprintString { get { throw null; } }
254257
}
255258
public partial class AutomationCertificateResource : Azure.ResourceManager.ArmResource
256259
{
@@ -1356,7 +1359,10 @@ public AutomationCertificateCreateOrUpdateContent(string name, string base64Valu
13561359
public string Description { get { throw null; } set { } }
13571360
public bool? IsExportable { get { throw null; } set { } }
13581361
public string Name { get { throw null; } }
1362+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
1363+
[System.ObsoleteAttribute("This property is obsolete and will be removed in a future release. Please use `ThumbprintString` instead.", false)]
13591364
public System.BinaryData Thumbprint { get { throw null; } set { } }
1365+
public string ThumbprintString { get { throw null; } set { } }
13601366
}
13611367
public partial class AutomationCertificatePatch
13621368
{

sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCertificateCollection.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using System;
5+
using System.ComponentModel;
6+
7+
namespace Azure.ResourceManager.Automation
8+
{
9+
public partial class AutomationCertificateData
10+
{
11+
/// <summary>
12+
/// Gets the thumbprint of the certificate.
13+
/// <para>
14+
/// To assign an object to this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
15+
/// </para>
16+
/// <para>
17+
/// To assign an already formated json string to this property use <see cref="BinaryData.FromString(string)"/>.
18+
/// </para>
19+
/// <para>
20+
/// Examples:
21+
/// <list type="bullet">
22+
/// <item>
23+
/// <term>BinaryData.FromObjectAsJson("foo")</term>
24+
/// <description>Creates a payload of "foo".</description>
25+
/// </item>
26+
/// <item>
27+
/// <term>BinaryData.FromString("\"foo\"")</term>
28+
/// <description>Creates a payload of "foo".</description>
29+
/// </item>
30+
/// <item>
31+
/// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
32+
/// <description>Creates a payload of { "key": "value" }.</description>
33+
/// </item>
34+
/// <item>
35+
/// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
36+
/// <description>Creates a payload of { "key": "value" }.</description>
37+
/// </item>
38+
/// </list>
39+
/// </para>
40+
/// </summary>
41+
[EditorBrowsable(EditorBrowsableState.Never)]
42+
[Obsolete("This property is obsolete and will be removed in a future release. Please use `ThumbprintString` instead.", false)]
43+
public BinaryData Thumbprint => BinaryData.FromString(ThumbprintString);
44+
}
45+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using System;
5+
using System.ComponentModel;
6+
7+
namespace Azure.ResourceManager.Automation.Models
8+
{
9+
public partial class AutomationCertificateCreateOrUpdateContent
10+
{
11+
/// <summary>
12+
/// Gets or sets the thumbprint of the certificate.
13+
/// <para>
14+
/// To assign an object to this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
15+
/// </para>
16+
/// <para>
17+
/// To assign an already formated json string to this property use <see cref="BinaryData.FromString(string)"/>.
18+
/// </para>
19+
/// <para>
20+
/// Examples:
21+
/// <list type="bullet">
22+
/// <item>
23+
/// <term>BinaryData.FromObjectAsJson("foo")</term>
24+
/// <description>Creates a payload of "foo".</description>
25+
/// </item>
26+
/// <item>
27+
/// <term>BinaryData.FromString("\"foo\"")</term>
28+
/// <description>Creates a payload of "foo".</description>
29+
/// </item>
30+
/// <item>
31+
/// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
32+
/// <description>Creates a payload of { "key": "value" }.</description>
33+
/// </item>
34+
/// <item>
35+
/// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
36+
/// <description>Creates a payload of { "key": "value" }.</description>
37+
/// </item>
38+
/// </list>
39+
/// </para>
40+
/// </summary>
41+
[EditorBrowsable(EditorBrowsableState.Never)]
42+
[Obsolete("This property is obsolete and will be removed in a future release. Please use `ThumbprintString` instead.", false)]
43+
public BinaryData Thumbprint
44+
{
45+
get { return BinaryData.FromString(ThumbprintString); }
46+
set { ThumbprintString = value.ToString(); }
47+
}
48+
}
49+
}

sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationCertificateData.cs

Lines changed: 5 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationCertificateCreateOrUpdateContent.Serialization.cs

Lines changed: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationCertificateCreateOrUpdateContent.cs

Lines changed: 2 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationCertificateData.Serialization.cs

Lines changed: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/automation/Azure.ResourceManager.Automation/src/autorest.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ skip-csproj: true
1616
modelerfour:
1717
flatten-payloads: false
1818

19+
# mgmt-debug:
20+
# show-serialized-names: true
21+
1922
rename-mapping:
2023
AutomationAccount.properties.publicNetworkAccess: IsPublicNetworkAccessAllowed
2124
AutomationAccount.properties.disableLocalAuth: IsLocalAuthDisabled
@@ -130,6 +133,8 @@ rename-mapping:
130133
WindowsUpdateClasses: WindowsUpdateClassification
131134
WindowsProperties.excludedKbNumbers: ExcludedKBNumbers
132135
WindowsProperties.includedKbNumbers: IncludedKBNumbers
136+
Certificate.properties.thumbprint: ThumbprintString
137+
CertificateCreateOrUpdateParameters.properties.thumbprint: ThumbprintString
133138

134139
prepend-rp-prefix:
135140
- Certificate
@@ -192,7 +197,6 @@ format-by-name-rules:
192197
'location': 'azure-location'
193198
'*Uri': 'Uri'
194199
'*Uris': 'Uri'
195-
'thumbprint': 'any'
196200

197201
rename-rules:
198202
CPU: Cpu

0 commit comments

Comments
 (0)