Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Attestation")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.1.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.1.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.1.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.1.1")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
44 changes: 4 additions & 40 deletions src/Attestation/Attestation.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,20 @@ module-version: 0.1.0
# Normally, title is the service name
title: Attestation
subject-prefix: $(service-name)
identity-correction-for-post: true
nested-object-to-string: true
resourcegroup-append: true

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

# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"

directive:
# Following is two common directive which are normally required in all the RPs
# 1. Remove the unexpanded parameter set
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^Install$|^InstallViaIdentity$
variant: ^(Create|Update|Install)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
remove: true
# Remove the set-* cmdlet
- where:
Expand All @@ -86,36 +82,4 @@ directive:
subject: AttestationProvider
verb: New
hide: true

- where:
verb: Get
subject: AttestationDefaultProvider
set:
breaking-change:
deprecated-output-properties:
- PrivateEndpointConnection
- Value
new-output-properties:
- PrivateEndpointConnection
- Value
change-description: The types of the properties 'PrivateEndpointConnection' and 'Value' will be changed from single object to 'List'.
deprecated-by-version: 9.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03

- where:
verb: Get|Update
subject: AttestationProvider
set:
breaking-change:
deprecated-output-properties:
- PrivateEndpointConnection
- Value
new-output-properties:
- PrivateEndpointConnection
- Value
change-description: The types of the properties 'PrivateEndpointConnection' and 'Value' will be changed from single object to 'List'.
deprecated-by-version: 9.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography.X509Certificates;
using Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api10;
using Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api10
namespace Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models
{
public class JsonWebKeyHelper
{
Expand Down Expand Up @@ -82,7 +82,7 @@ private static JsonWebKey[] GetJsonWebKeysFromX509Certificate(X509Certificate2Co
foreach (var certificate in certificateCollection)
{
var jwk = new JsonWebKey() { Kty = "RSA" };
jwk.X5C = new List<string>() { System.Convert.ToBase64String(certificate.Export(X509ContentType.Cert)) }.ToArray();
jwk.X5C = new List<string> { System.Convert.ToBase64String(certificate.Export(X509ContentType.Cert)) };
jsonWebKeys.Add(jwk);
}
return jsonWebKeys.ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ POLICYSIGNINGCERTIFICATEKEY <IJsonWebKey[]>: The value of the "keys" parameter i
https://learn.microsoft.com/powershell/module/az.attestation/new-azattestationprovider
#>
function New-AzAttestationProvider {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationProvider])]
[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]"))]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationProvider])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
Expand All @@ -78,13 +77,13 @@ param(
# The ID of the target subscription.
${SubscriptionId},

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

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

[Parameter()]
[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationServiceCreationParamsTags]))]
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationServiceCreationParamsTags]))]
[System.Collections.Hashtable]
# The tags that will be assigned to the attestation provider.
${Tag},

[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Category('Body')]
[System.String]
# Path of Json file supplied to the Create operation
${JsonFilePath},

[Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Category('Body')]
[System.String]
# Json string supplied to the Create operation
${JsonString},

[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.Attestation.Category('Azure')]
[System.Management.Automation.PSObject]
# The credentials, account, tenant, and subscription used for communication with Azure.
# The DefaultProfile parameter is not functional.
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},

[Parameter(DontShow)]
Expand Down Expand Up @@ -152,7 +164,7 @@ param(
process {
if($PSBoundParameters.ContainsKey("PolicySigningCertificateKeyPath")){
$PolicySigningCertificateKeyPath = (Resolve-Path -Path $PolicySigningCertificateKeyPath).Path
$PolicySigningCertificateKey = [Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api10.JsonWebKeyHelper]::GetJsonWebKeys($PolicySigningCertificateKeyPath)
$PolicySigningCertificateKey = [Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.JsonWebKeyHelper]::GetJsonWebKeys($PolicySigningCertificateKeyPath)
$null = $PSBoundParameters.Add("PolicySigningCertificateKey", $PolicySigningCertificateKey)
$null = $PSBoundParameters.Remove("PolicySigningCertificateKeyPath")
}
Expand Down
4 changes: 2 additions & 2 deletions src/Attestation/Attestation.Autorest/docs/Az.Attestation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.Attestation
Module Guid: 9938f620-cd87-4a11-9ff9-3e33101974cc
Module Guid: 6c93856d-5326-410b-9138-922a62215196
Download Help Link: https://learn.microsoft.com/powershell/module/az.attestation
Help Version: 1.0.0.0
Locale: en-US
Expand All @@ -24,5 +24,5 @@ Creates a new Attestation Provider.
Delete Attestation Service.

### [Update-AzAttestationProvider](Update-AzAttestationProvider.md)
Updates the Attestation Provider.
Update the Attestation Provider.

Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationIdentity
Expand Down Expand Up @@ -180,9 +179,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationProvider
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationProvider

### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationProviderListResult
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationProviderListResult

## NOTES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationIdentity
Expand Down Expand Up @@ -267,9 +266,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationProvider
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationProvider

### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationProviderListResult
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationProviderListResult

## NOTES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,25 @@ Creates a new Attestation Provider.

## SYNTAX

### CreateExpanded (Default)
```
New-AzAttestationProvider -Name <String> -ResourceGroupName <String> -Location <String>
[-SubscriptionId <String>] [-PolicySigningCertificateKeyPath <String>] [-Tag <Hashtable>]
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### CreateViaJsonFilePath
```
New-AzAttestationProvider -Name <String> -ResourceGroupName <String> -JsonFilePath <String>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### CreateViaJsonString
```
New-AzAttestationProvider -Name <String> -ResourceGroupName <String> -JsonString <String>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
```

## DESCRIPTION
Creates a new Attestation Provider.

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

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

```yaml
Type: System.Management.Automation.PSObject
Expand All @@ -66,12 +80,42 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -JsonFilePath
Path of Json file supplied to the Create operation

```yaml
Type: System.String
Parameter Sets: CreateViaJsonFilePath
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -JsonString
Json string supplied to the Create operation

```yaml
Type: System.String
Parameter Sets: CreateViaJsonString
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Location
The supported Azure location where the attestation provider should be created.

```yaml
Type: System.String
Parameter Sets: (All)
Parameter Sets: CreateExpanded
Aliases:

Required: True
Expand Down Expand Up @@ -104,7 +148,7 @@ To construct, see NOTES section for POLICYSIGNINGCERTIFICATEKEY properties and c

```yaml
Type: System.String
Parameter Sets: (All)
Parameter Sets: CreateExpanded
Aliases:

Required: False
Expand Down Expand Up @@ -150,7 +194,7 @@ The tags that will be assigned to the attestation provider.

```yaml
Type: System.Collections.Hashtable
Parameter Sets: (All)
Parameter Sets: CreateExpanded
Aliases:

Required: False
Expand Down Expand Up @@ -198,7 +242,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.Api20201001.IAttestationProvider
### Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationProvider

## NOTES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Attestation.Models.IAttestationIdentity
Expand Down
Loading