Skip to content

Commit

Permalink
[ADDomainService]Changed the input method of certificate from base64 …
Browse files Browse the repository at this point in the history
…string to file path (#18282)

* Support taking certificate as file path

* Update SignatureIssues.csv
  • Loading branch information
BethanyZhou authored May 25, 2022
1 parent 923c52c commit ce72257
Show file tree
Hide file tree
Showing 26 changed files with 531 additions and 514 deletions.
1 change: 1 addition & 0 deletions src/ADDomainServices/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ internal
exports
tools
custom/*.psm1
custom/autogen-model-cmdlets
test/*-TestResults.xml
/*.ps1
/*.ps1xml
Expand Down
2 changes: 1 addition & 1 deletion src/ADDomainServices/Az.ADDomainServices.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.ADDomainServices.private.dll'
FormatsToProcess = './Az.ADDomainServices.format.ps1xml'
FunctionsToExport = 'Get-AzADDomainService', 'New-AzADDomainService', 'New-AzADDomainServiceForestTrust', 'New-AzADDomainServiceReplicaSet', 'Remove-AzADDomainService', 'Update-AzADDomainService', '*'
FunctionsToExport = 'Get-AzADDomainService', 'New-AzADDomainService', 'New-AzADDomainServiceForestTrustObject', 'New-AzADDomainServiceReplicaSetObject', 'Remove-AzADDomainService', 'Update-AzADDomainService', '*'
AliasesToExport = '*'
PrivateData = @{
PSData = @{
Expand Down
64 changes: 43 additions & 21 deletions src/ADDomainServices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This directory contains the PowerShell module for the AdDomainServices service.
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.

## Module Requirements
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater

## Authentication
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
Expand All @@ -30,7 +30,7 @@ For information on how to develop for `Az.ADDomainServices`, see [how-to.md](how
> see https://aka.ms/autorest
``` yaml
Branch: 394ab556cb4aed1196918856a24be9b02609cc93
branch: 394ab556cb4aed1196918856a24be9b02609cc93
require:
# readme.azure.noprofile.md is the common configuration file
- $(this-folder)/../readme.azure.noprofile.md
Expand All @@ -50,6 +50,7 @@ subject-prefix: ADDomainService
# 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-correction-for-post: true
resourcegroup-append: true

directive:
- from: swagger-document
Expand All @@ -58,6 +59,9 @@ directive:
- from: swagger-document
where: $.definitions..trustPassword
transform: $.format = "password"
- from: swagger-document
where: $.definitions..pfxCertificate
transform: $.format = "byte"
# 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
Expand All @@ -74,46 +78,64 @@ directive:
- where:
verb: Set
remove: true
# Hide Operation cmdlets
- where:
subject: DomainServiceOperation
hide: true
# Reset subject-prefix as AD as previous setting by subject-prefix tag converts AD to Ad
- where:
verb: New
subject: (^DomainService)(.*)
subject-prefix: Ad(.*)
set:
subject-prefix: ADDomainService
subject: $2
subject-prefix: AD$1
# Hide to customize, DomainName -> required, ReplicaSet -> required
- where:
verb: New
subject: DomainService
hide: true
# Set the default of Location same with first element in ReplicaSets so that it can keep as optional
- where:
verb: Update
subject: (^DomainService)(.*)
set:
subject-prefix: ADDomainService
subject: $2
verb: New
subject: DomainService
parameter-name: Location
set:
default:
name: Location Default
description: Gets the Location from the first element in ReplicaSets.
script: '$ReplicaSet[0].Location'
# Add validate set for DomainConfigurationType: "FullySynced", "ResourceTrusting"
- where:
verb: Get
subject: (^DomainService)(.*)
set:
subject-prefix: ADDomainService
subject: $2
parameter-name: DomainConfigurationType
set:
completer:
name: DomainConfigurationType Completer
description: Gets the list of DomainConfigurationTypes available for this resource.
script: "'FullySynced', 'ResourceTrusting'"
# Added validate set for Sku: "Standard", "Enterprise", "Premium"
- where:
verb: Remove
subject: (^DomainService)(.*)
set:
subject-prefix: ADDomainService
subject: $2
parameter-name: Sku
set:
completer:
name: Sku Completer
description: Gets the list of Skus available for this resource.
script: "'Standard', 'Enterprise', 'Premium'"
# Rename parameter LdapSettingLdap -> LdapSettingLdaps
- where:
parameter-name: LdapSettingLdap
set:
parameter-name: LdapSettingLdaps
# Rename parameter ResourceForestSetting -> ForestTrust
- where:
parameter-name: ResourceForestSetting
set:
parameter-name: ForestTrust
# Rename ResourceForestSettingResourceForest to ResourceForest
- where:
parameter-name: ResourceForestSettingResourceForest
set:
parameter-name: ResourceForest
- model-cmdlet:
- ForestTrust
- ReplicaSet
- where:
model-name: DomainService
set:
Expand Down
Loading

0 comments on commit ce72257

Please sign in to comment.