Skip to content

Commit 1e746ca

Browse files
authored
[Az.Attestation] Update generation tool version: autorest.powershell v3… (#28180)
1 parent d07d809 commit 1e746ca

27 files changed

+441
-251
lines changed

src/Attestation/Attestation.Autorest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
2121
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
2222
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Attestation")]
23-
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.1.0")]
24-
[assembly: System.Reflection.AssemblyVersionAttribute("2.1.0")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.1.1")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("2.1.1")]
2525
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
2626
[assembly: System.CLSCompliantAttribute(false)]

src/Attestation/Attestation.Autorest/README.md

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,20 @@ module-version: 0.1.0
4242
# Normally, title is the service name
4343
title: Attestation
4444
subject-prefix: $(service-name)
45-
identity-correction-for-post: true
46-
nested-object-to-string: true
47-
resourcegroup-append: true
4845

4946
# If there are post APIs for some kinds of actions in the RP, you may need to
5047
# uncomment following line to support viaIdentity for these post APIs
5148
# identity-correctiEXon-for-post: true
5249

53-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
54-
use-extension:
55-
"@autorest/powershell": "3.x"
56-
5750
directive:
5851
# Following is two common directive which are normally required in all the RPs
5952
# 1. Remove the unexpanded parameter set
6053
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
6154
- where:
62-
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^Install$|^InstallViaIdentity$
55+
variant: ^(Create|Update|Install)(?!.*?(Expanded|JsonFilePath|JsonString))
56+
remove: true
57+
- where:
58+
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
6359
remove: true
6460
# Remove the set-* cmdlet
6561
- where:
@@ -86,36 +82,4 @@ directive:
8682
subject: AttestationProvider
8783
verb: New
8884
hide: true
89-
90-
- where:
91-
verb: Get
92-
subject: AttestationDefaultProvider
93-
set:
94-
breaking-change:
95-
deprecated-output-properties:
96-
- PrivateEndpointConnection
97-
- Value
98-
new-output-properties:
99-
- PrivateEndpointConnection
100-
- Value
101-
change-description: The types of the properties 'PrivateEndpointConnection' and 'Value' will be changed from single object to 'List'.
102-
deprecated-by-version: 9.0.0
103-
deprecated-by-azversion: 15.0.0
104-
change-effective-date: 2025/11/03
105-
106-
- where:
107-
verb: Get|Update
108-
subject: AttestationProvider
109-
set:
110-
breaking-change:
111-
deprecated-output-properties:
112-
- PrivateEndpointConnection
113-
- Value
114-
new-output-properties:
115-
- PrivateEndpointConnection
116-
- Value
117-
change-description: The types of the properties 'PrivateEndpointConnection' and 'Value' will be changed from single object to 'List'.
118-
deprecated-by-version: 9.0.0
119-
deprecated-by-azversion: 15.0.0
120-
change-effective-date: 2025/11/03
12185
```

src/Attestation/Attestation.Autorest/custom/JsonWebKeyHelper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
using System.Collections.Generic;
1717
using System.IO;
1818
using System.Security.Cryptography.X509Certificates;
19-
using Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api10;
19+
using Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models;
2020

21-
namespace Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api10
21+
namespace Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models
2222
{
2323
public class JsonWebKeyHelper
2424
{
@@ -82,7 +82,7 @@ private static JsonWebKey[] GetJsonWebKeysFromX509Certificate(X509Certificate2Co
8282
foreach (var certificate in certificateCollection)
8383
{
8484
var jwk = new JsonWebKey() { Kty = "RSA" };
85-
jwk.X5C = new List<string>() { System.Convert.ToBase64String(certificate.Export(X509ContentType.Cert)) }.ToArray();
85+
jwk.X5C = new List<string> { System.Convert.ToBase64String(certificate.Export(X509ContentType.Cert)) };
8686
jsonWebKeys.Add(jwk);
8787
}
8888
return jsonWebKeys.ToArray();

src/Attestation/Attestation.Autorest/custom/New-AzAttestationProvider.ps1

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ POLICYSIGNINGCERTIFICATEKEY <IJsonWebKey[]>: The value of the "keys" parameter i
5353
https://learn.microsoft.com/powershell/module/az.attestation/new-azattestationprovider
5454
#>
5555
function New-AzAttestationProvider {
56-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationProvider])]
57-
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationProvider", "15.0.0", "9.0.0", "2025/11/03", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationProvider", DeprecatedOutputProperties = ("PrivateEndpointConnection Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IPrivateEndpointConnection"), NewOutputProperties = ("PrivateEndpointConnection System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IPrivateEndpointConnection]"))]
56+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationProvider])]
5857
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
5958
param(
6059
[Parameter(Mandatory)]
@@ -78,13 +77,13 @@ param(
7877
# The ID of the target subscription.
7978
${SubscriptionId},
8079

81-
[Parameter(Mandatory)]
80+
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
8281
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Category('Body')]
8382
[System.String]
8483
# The supported Azure location where the attestation provider should be created.
8584
${Location},
8685

87-
[Parameter()]
86+
[Parameter(ParameterSetName='CreateExpanded')]
8887
[AllowEmptyCollection()]
8988
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Category('Body')]
9089
[System.String]
@@ -94,19 +93,32 @@ param(
9493
# To construct, see NOTES section for POLICYSIGNINGCERTIFICATEKEY properties and create a hash table.
9594
${PolicySigningCertificateKeyPath},
9695

97-
[Parameter()]
96+
[Parameter(ParameterSetName='CreateExpanded')]
9897
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Category('Body')]
99-
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationServiceCreationParamsTags]))]
98+
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationServiceCreationParamsTags]))]
10099
[System.Collections.Hashtable]
101100
# The tags that will be assigned to the attestation provider.
102101
${Tag},
103102

103+
[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
104+
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Category('Body')]
105+
[System.String]
106+
# Path of Json file supplied to the Create operation
107+
${JsonFilePath},
108+
109+
[Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
110+
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Category('Body')]
111+
[System.String]
112+
# Json string supplied to the Create operation
113+
${JsonString},
114+
104115
[Parameter()]
105116
[Alias('AzureRMContext', 'AzureCredential')]
106117
[ValidateNotNull()]
107118
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Category('Azure')]
108119
[System.Management.Automation.PSObject]
109-
# The credentials, account, tenant, and subscription used for communication with Azure.
120+
# The DefaultProfile parameter is not functional.
121+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
110122
${DefaultProfile},
111123

112124
[Parameter(DontShow)]
@@ -152,7 +164,7 @@ param(
152164
process {
153165
if($PSBoundParameters.ContainsKey("PolicySigningCertificateKeyPath")){
154166
$PolicySigningCertificateKeyPath = (Resolve-Path -Path $PolicySigningCertificateKeyPath).Path
155-
$PolicySigningCertificateKey = [Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api10.JsonWebKeyHelper]::GetJsonWebKeys($PolicySigningCertificateKeyPath)
167+
$PolicySigningCertificateKey = [Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.JsonWebKeyHelper]::GetJsonWebKeys($PolicySigningCertificateKeyPath)
156168
$null = $PSBoundParameters.Add("PolicySigningCertificateKey", $PolicySigningCertificateKey)
157169
$null = $PSBoundParameters.Remove("PolicySigningCertificateKeyPath")
158170
}

src/Attestation/Attestation.Autorest/docs/Az.Attestation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.Attestation
3-
Module Guid: 9938f620-cd87-4a11-9ff9-3e33101974cc
3+
Module Guid: e07de710-5aae-4bcb-b36e-e98c15f64045
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.attestation
55
Help Version: 1.0.0.0
66
Locale: en-US
@@ -24,5 +24,5 @@ Creates a new Attestation Provider.
2424
Delete Attestation Service.
2525

2626
### [Update-AzAttestationProvider](Update-AzAttestationProvider.md)
27-
Updates the Attestation Provider.
27+
Update the Attestation Provider.
2828

src/Attestation/Attestation.Autorest/docs/Get-AzAttestationDefaultProvider.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ Accept wildcard characters: False
127127
128128
### -InputObject
129129
Identity Parameter
130-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
131130
132131
```yaml
133132
Type: Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationIdentity
@@ -180,9 +179,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
180179
181180
## OUTPUTS
182181
183-
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationProvider
182+
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationProvider
184183
185-
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationProviderListResult
184+
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationProviderListResult
186185
187186
## NOTES
188187

src/Attestation/Attestation.Autorest/docs/Get-AzAttestationProvider.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ Accept wildcard characters: False
198198
199199
### -InputObject
200200
Identity Parameter
201-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
202201
203202
```yaml
204203
Type: Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationIdentity
@@ -267,9 +266,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
267266
268267
## OUTPUTS
269268
270-
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationProvider
269+
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationProvider
271270
272-
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationProviderListResult
271+
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationProviderListResult
273272
274273
## NOTES
275274

src/Attestation/Attestation.Autorest/docs/New-AzAttestationProvider.md

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,25 @@ Creates a new Attestation Provider.
1212

1313
## SYNTAX
1414

15+
### CreateExpanded (Default)
1516
```
1617
New-AzAttestationProvider -Name <String> -ResourceGroupName <String> -Location <String>
1718
[-SubscriptionId <String>] [-PolicySigningCertificateKeyPath <String>] [-Tag <Hashtable>]
1819
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
1920
```
2021

22+
### CreateViaJsonFilePath
23+
```
24+
New-AzAttestationProvider -Name <String> -ResourceGroupName <String> -JsonFilePath <String>
25+
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
26+
```
27+
28+
### CreateViaJsonString
29+
```
30+
New-AzAttestationProvider -Name <String> -ResourceGroupName <String> -JsonString <String>
31+
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
32+
```
33+
2134
## DESCRIPTION
2235
Creates a new Attestation Provider.
2336

@@ -52,7 +65,8 @@ This command creates a new Attestation Provider named `testprovider2` with trust
5265
## PARAMETERS
5366

5467
### -DefaultProfile
55-
The credentials, account, tenant, and subscription used for communication with Azure.
68+
The DefaultProfile parameter is not functional.
69+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
5670

5771
```yaml
5872
Type: System.Management.Automation.PSObject
@@ -66,12 +80,42 @@ Accept pipeline input: False
6680
Accept wildcard characters: False
6781
```
6882
83+
### -JsonFilePath
84+
Path of Json file supplied to the Create operation
85+
86+
```yaml
87+
Type: System.String
88+
Parameter Sets: CreateViaJsonFilePath
89+
Aliases:
90+
91+
Required: True
92+
Position: Named
93+
Default value: None
94+
Accept pipeline input: False
95+
Accept wildcard characters: False
96+
```
97+
98+
### -JsonString
99+
Json string supplied to the Create operation
100+
101+
```yaml
102+
Type: System.String
103+
Parameter Sets: CreateViaJsonString
104+
Aliases:
105+
106+
Required: True
107+
Position: Named
108+
Default value: None
109+
Accept pipeline input: False
110+
Accept wildcard characters: False
111+
```
112+
69113
### -Location
70114
The supported Azure location where the attestation provider should be created.
71115
72116
```yaml
73117
Type: System.String
74-
Parameter Sets: (All)
118+
Parameter Sets: CreateExpanded
75119
Aliases:
76120

77121
Required: True
@@ -104,7 +148,7 @@ To construct, see NOTES section for POLICYSIGNINGCERTIFICATEKEY properties and c
104148
105149
```yaml
106150
Type: System.String
107-
Parameter Sets: (All)
151+
Parameter Sets: CreateExpanded
108152
Aliases:
109153

110154
Required: False
@@ -150,7 +194,7 @@ The tags that will be assigned to the attestation provider.
150194
151195
```yaml
152196
Type: System.Collections.Hashtable
153-
Parameter Sets: (All)
197+
Parameter Sets: CreateExpanded
154198
Aliases:
155199

156200
Required: False
@@ -198,7 +242,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
198242
199243
## OUTPUTS
200244
201-
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationProvider
245+
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationProvider
202246
203247
## NOTES
204248

src/Attestation/Attestation.Autorest/docs/Remove-AzAttestationProvider.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ Accept wildcard characters: False
7272
7373
### -InputObject
7474
Identity Parameter
75-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
7675
7776
```yaml
7877
Type: Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationIdentity

0 commit comments

Comments
 (0)