Skip to content

Commit

Permalink
Move Subscription to main
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-powershell-bot committed Nov 6, 2023
1 parent 217be38 commit ec107bc
Show file tree
Hide file tree
Showing 88 changed files with 4,178 additions and 931 deletions.
40 changes: 28 additions & 12 deletions src/Subscription/Az.Subscription.format.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<TableColumnHeader>
<Label>BillingAccountId</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>OperationId</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>SubscriptionId</Label>
</TableColumnHeader>
Expand All @@ -27,6 +30,9 @@
<TableColumnItem>
<PropertyName>BillingAccountId</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>OperationId</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>SubscriptionId</PropertyName>
</TableColumnItem>
Expand Down Expand Up @@ -150,9 +156,6 @@
<TableColumnHeader>
<Label>BillingOwner</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>DisplayName</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>ProvisioningState</Label>
</TableColumnHeader>
Expand All @@ -172,9 +175,6 @@
<TableColumnItem>
<PropertyName>BillingOwner</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>DisplayName</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>ProvisioningState</PropertyName>
</TableColumnItem>
Expand Down Expand Up @@ -725,9 +725,6 @@
<TableColumnHeader>
<Label>AliasName</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>DisplayName</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>SubscriptionId</Label>
</TableColumnHeader>
Expand All @@ -741,9 +738,6 @@
<TableColumnItem>
<PropertyName>AliasName</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>DisplayName</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>SubscriptionId</PropertyName>
</TableColumnItem>
Expand Down Expand Up @@ -859,6 +853,28 @@
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.Api20211001.SubscriptionCreationResult</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.Api20211001.SubscriptionCreationResult</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>SubscriptionLink</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>SubscriptionLink</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.Api20211001.SubscriptionName</Name>
<ViewSelectedBy>
Expand Down
9 changes: 3 additions & 6 deletions src/Subscription/Az.Subscription.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 8/30/2023
# Generated on: 11/6/2023
#

@{
Expand Down Expand Up @@ -73,8 +73,7 @@ FunctionsToExport = 'Disable-AzSubscription', 'Enable-AzSubscription',
'Get-AzSubscriptionAcceptOwnershipStatus',
'Get-AzSubscriptionAlias', 'Get-AzSubscriptionPolicy',
'Invoke-AzSubscriptionAcceptOwnership', 'New-AzSubscriptionAlias',
'Remove-AzSubscriptionAlias', 'Rename-AzSubscription',
'Update-AzSubscriptionPolicy'
'Remove-AzSubscriptionAlias', 'Rename-AzSubscription'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()
Expand Down Expand Up @@ -112,9 +111,7 @@ PrivateData = @{
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '* Removed the default value for the ''New-AzSubscriptionAlias'' cmdlet parameter ''SubscriptionId''.
* Removed the default value for the ''Get-AzSubscriptionAcceptOwnershipStatus'' cmdlet parameter ''SubscriptionId'' and mark the parameter as mandatory.
* Removed the default value for the ''Invoke-AzSubscriptionAcceptOwnership'' cmdlet parameter ''SubscriptionId'' and mark the parameter as mandatory.'
# ReleaseNotes = ''

# Prerelease string of this module
# Prerelease = ''
Expand Down
46 changes: 44 additions & 2 deletions src/Subscription/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ In this directory, run AutoRest:
> see https://aka.ms/autorest
``` yaml
branch: be90a71f6a482c5b01155b3c9990887529cc6893
branch: 0f39a2d56070d2bc4251494525cb8af88583a938
require:
- $(this-folder)/../readme.azure.noprofile.md
input-file:
Expand Down Expand Up @@ -126,6 +126,16 @@ directive:
variant: ^Get$
remove: true

# operation cmdlet must be removed
- where:
subject: SubscriptionOperation
hide: true
# Service feedback: As only global admins to run this, we don't want to have cmdlets for these as 1st class experience
- where:
verb: Update
subject: SubscriptionPolicy
hide: true

- where:
subject: AcceptSubscriptionOwnership
set:
Expand Down Expand Up @@ -161,6 +171,12 @@ directive:
parameter-name: AdditionalPropertyTag
set:
parameter-name: Tag
# All cmdlets parameter SubscriptionName has the alias DisplayName. ReName-AzSubscription needs to be customized to add an alias.
- where:
parameter-name: DisplayName
set:
parameter-name: SubscriptionName
alias: DisplayName
- where:
subject: Alias
parameter-name: Name
Expand All @@ -173,6 +189,17 @@ directive:
set:
property-name: AliasName

# Need to divided the command into two different ones based on the mutual exclusion parameter:
- where:
verb: New
subject: Alias
hide: true
# SubscriptionName must be required
- where:
verb: Rename
subject: Subscription
hide: true

- from: NewAzSubscriptionAlias_CreateExpanded.cs
where: $
transform: $ = $.replace('[Microsoft.Azure.PowerShell.Cmdlets.Subscription.Runtime.DefaultInfo(', '');
Expand Down Expand Up @@ -222,13 +249,18 @@ directive:
parameter-name: SubscriptionId
required: true

# Updated Parameter type of SubscriptionId from string[] to string.
- where:
verb: Get
subject: AcceptOwnershipStatus
hide: true

- where:
model-name: SubscriptionAliasResponse
set:
format-table:
properties:
- AliasName
- DisplayName
- SubscriptionId
- ProvisioningState
- where:
Expand All @@ -240,4 +272,14 @@ directive:
- PolicyId
- BlockSubscriptionsIntoTenant
- BlockSubscriptionsLeavingTenant
- where:
model-name: AcceptOwnershipStatusResponse
set:
format-table:
properties:
- AcceptOwnershipState
- BillingOwner
- ProvisioningState
- SubscriptionId
- SubscriptionTenantId
```
70 changes: 35 additions & 35 deletions src/Subscription/Subscription.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{3CF7EAC8-FBCC-4F2C-BE7F-19AA306D43FA}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{458C8187-D0E8-40D2-99FC-8514A6F123B0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{3E5029BA-AB3D-473B-A73D-14AF26951107}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{6B56A7F5-CBCA-4D69-9954-8A8E76A8E197}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{4E479E72-AE5C-4657-8A85-5D7EB740D9EE}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{C7781DED-4FB6-4968-B660-42CBC675C661}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{2852F1E5-9C0E-4238-BF57-135B3A24E69D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{979CC131-8847-422F-B9FB-5036375988A8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{23E6E6DB-A9EA-4007-9521-EC37A0C866B0}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{067A7683-FBB4-4A59-8505-978FD4EB3FF9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{035C5B60-9416-4808-9365-5BDBE37EEBBD}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{E65013A8-821B-43D2-874B-A69EC02B99F1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Subscription", "Az.Subscription.csproj", "{980C0C20-CAC8-48D0-9D16-7A0CC0BD2D5F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Subscription", "Az.Subscription.csproj", "{8C9DDF82-2656-4F5E-8039-67314F5D26B3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -26,33 +26,33 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3CF7EAC8-FBCC-4F2C-BE7F-19AA306D43FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3CF7EAC8-FBCC-4F2C-BE7F-19AA306D43FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3CF7EAC8-FBCC-4F2C-BE7F-19AA306D43FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3CF7EAC8-FBCC-4F2C-BE7F-19AA306D43FA}.Release|Any CPU.Build.0 = Release|Any CPU
{3E5029BA-AB3D-473B-A73D-14AF26951107}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E5029BA-AB3D-473B-A73D-14AF26951107}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E5029BA-AB3D-473B-A73D-14AF26951107}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E5029BA-AB3D-473B-A73D-14AF26951107}.Release|Any CPU.Build.0 = Release|Any CPU
{4E479E72-AE5C-4657-8A85-5D7EB740D9EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E479E72-AE5C-4657-8A85-5D7EB740D9EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E479E72-AE5C-4657-8A85-5D7EB740D9EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E479E72-AE5C-4657-8A85-5D7EB740D9EE}.Release|Any CPU.Build.0 = Release|Any CPU
{2852F1E5-9C0E-4238-BF57-135B3A24E69D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2852F1E5-9C0E-4238-BF57-135B3A24E69D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2852F1E5-9C0E-4238-BF57-135B3A24E69D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2852F1E5-9C0E-4238-BF57-135B3A24E69D}.Release|Any CPU.Build.0 = Release|Any CPU
{23E6E6DB-A9EA-4007-9521-EC37A0C866B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23E6E6DB-A9EA-4007-9521-EC37A0C866B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23E6E6DB-A9EA-4007-9521-EC37A0C866B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23E6E6DB-A9EA-4007-9521-EC37A0C866B0}.Release|Any CPU.Build.0 = Release|Any CPU
{035C5B60-9416-4808-9365-5BDBE37EEBBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{035C5B60-9416-4808-9365-5BDBE37EEBBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{035C5B60-9416-4808-9365-5BDBE37EEBBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{035C5B60-9416-4808-9365-5BDBE37EEBBD}.Release|Any CPU.Build.0 = Release|Any CPU
{980C0C20-CAC8-48D0-9D16-7A0CC0BD2D5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{980C0C20-CAC8-48D0-9D16-7A0CC0BD2D5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{980C0C20-CAC8-48D0-9D16-7A0CC0BD2D5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{980C0C20-CAC8-48D0-9D16-7A0CC0BD2D5F}.Release|Any CPU.Build.0 = Release|Any CPU
{458C8187-D0E8-40D2-99FC-8514A6F123B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{458C8187-D0E8-40D2-99FC-8514A6F123B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{458C8187-D0E8-40D2-99FC-8514A6F123B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{458C8187-D0E8-40D2-99FC-8514A6F123B0}.Release|Any CPU.Build.0 = Release|Any CPU
{6B56A7F5-CBCA-4D69-9954-8A8E76A8E197}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B56A7F5-CBCA-4D69-9954-8A8E76A8E197}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B56A7F5-CBCA-4D69-9954-8A8E76A8E197}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B56A7F5-CBCA-4D69-9954-8A8E76A8E197}.Release|Any CPU.Build.0 = Release|Any CPU
{C7781DED-4FB6-4968-B660-42CBC675C661}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C7781DED-4FB6-4968-B660-42CBC675C661}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7781DED-4FB6-4968-B660-42CBC675C661}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7781DED-4FB6-4968-B660-42CBC675C661}.Release|Any CPU.Build.0 = Release|Any CPU
{979CC131-8847-422F-B9FB-5036375988A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{979CC131-8847-422F-B9FB-5036375988A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{979CC131-8847-422F-B9FB-5036375988A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{979CC131-8847-422F-B9FB-5036375988A8}.Release|Any CPU.Build.0 = Release|Any CPU
{067A7683-FBB4-4A59-8505-978FD4EB3FF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{067A7683-FBB4-4A59-8505-978FD4EB3FF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{067A7683-FBB4-4A59-8505-978FD4EB3FF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{067A7683-FBB4-4A59-8505-978FD4EB3FF9}.Release|Any CPU.Build.0 = Release|Any CPU
{E65013A8-821B-43D2-874B-A69EC02B99F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E65013A8-821B-43D2-874B-A69EC02B99F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E65013A8-821B-43D2-874B-A69EC02B99F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E65013A8-821B-43D2-874B-A69EC02B99F1}.Release|Any CPU.Build.0 = Release|Any CPU
{8C9DDF82-2656-4F5E-8039-67314F5D26B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C9DDF82-2656-4F5E-8039-67314F5D26B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C9DDF82-2656-4F5E-8039-67314F5D26B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C9DDF82-2656-4F5E-8039-67314F5D26B3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
37 changes: 0 additions & 37 deletions src/Subscription/UX/Microsoft.Subscription/subscriptions.json

This file was deleted.

9 changes: 8 additions & 1 deletion src/Subscription/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ if($NoDocs) {
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
}
$null = New-Item -ItemType Directory -Force -Path $docsFolder
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
$addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
}

Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
Expand All @@ -162,4 +163,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol
Write-Host -ForegroundColor Green 'Creating example stubs...'
Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder

if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
{
Write-Host -ForegroundColor Green 'Creating ux metadata...'
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
}

Write-Host -ForegroundColor Green '-------------Done-------------'
Loading

0 comments on commit ec107bc

Please sign in to comment.