-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] Kubernetes Fleet manager generated by autorest (#23631)
* generate Fleet by autorest, code design, example, test * update examples * update doc * Update README.md * fix typo
- Loading branch information
Showing
85 changed files
with
12,636 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
bin | ||
obj | ||
.vs | ||
generated | ||
internal | ||
exports | ||
tools | ||
custom/*.psm1 | ||
custom/autogen-model-cmdlets | ||
test/*-TestResults.xml | ||
/*.ps1 | ||
/*.ps1xml | ||
/*.psm1 | ||
/*.snk | ||
/*.csproj | ||
/*.nuspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@{ | ||
GUID = '8d7b53b3-f39f-4f40-a64f-cb07e29ede3a' | ||
RootModule = './Az.Fleet.psm1' | ||
ModuleVersion = '0.1.0' | ||
CompatiblePSEditions = 'Core', 'Desktop' | ||
Author = 'Microsoft Corporation' | ||
CompanyName = 'Microsoft Corporation' | ||
Copyright = 'Microsoft Corporation. All rights reserved.' | ||
Description = 'Microsoft Azure PowerShell: Fleet cmdlets' | ||
PowerShellVersion = '5.1' | ||
DotNetFrameworkVersion = '4.7.2' | ||
RequiredAssemblies = './bin/Az.Fleet.private.dll' | ||
FormatsToProcess = './Az.Fleet.format.ps1xml' | ||
FunctionsToExport = 'Get-AzFleet', 'Get-AzFleetCredentials', 'Get-AzFleetMember', 'Get-AzFleetUpdateRun', 'Get-AzFleetUpdateStrategy', 'New-AzFleet', 'New-AzFleetMember', 'New-AzFleetUpdateGroupObject', 'New-AzFleetUpdateRun', 'New-AzFleetUpdateStageObject', 'New-AzFleetUpdateStrategy', 'Remove-AzFleet', 'Remove-AzFleetMember', 'Remove-AzFleetUpdateRun', 'Remove-AzFleetUpdateStrategy', 'Start-AzFleetUpdateRun', 'Stop-AzFleetUpdateRun', 'Update-AzFleet', 'Update-AzFleetMember', 'Update-AzFleetUpdateRun', 'Update-AzFleetUpdateStrategy' | ||
PrivateData = @{ | ||
PSData = @{ | ||
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Fleet' | ||
LicenseUri = 'https://aka.ms/azps-license' | ||
ProjectUri = 'https://github.com/Azure/azure-powershell' | ||
ReleaseNotes = '' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<!-- region Generated --> | ||
# Az.Fleet | ||
This directory contains the PowerShell module for the Fleet service. | ||
|
||
--- | ||
## Status | ||
[![Az.Fleet](https://img.shields.io/powershellgallery/v/Az.Fleet.svg?style=flat-square&label=Az.Fleet "Az.Fleet")](https://www.powershellgallery.com/packages/Az.Fleet/) | ||
|
||
## Info | ||
- Modifiable: yes | ||
- Generated: all | ||
- Committed: yes | ||
- Packaged: yes | ||
|
||
--- | ||
## Detail | ||
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.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. | ||
|
||
## Development | ||
For information on how to develop for `Az.Fleet`, see [how-to.md](how-to.md). | ||
<!-- endregion --> | ||
|
||
### AutoRest Configuration | ||
> see https://aka.ms/autorest | ||
```yaml | ||
# pin the swagger version by using the commit id instead of branch name | ||
commit: 8f889f0967e411fc1042aed0a097868b360f525a | ||
require: | ||
# readme.azure.noprofile.md is the common configuration file | ||
- $(this-folder)/../../readme.azure.noprofile.md | ||
- $(repo)/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md | ||
|
||
title: Fleet | ||
module-version: 0.1.0 | ||
subject-prefix: $(service-name) | ||
|
||
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|Update)(?!.*?(Expanded|JsonFilePath|JsonString)) | ||
remove: true | ||
# Fix required parameter missing | ||
- from: swagger-document | ||
where: $.definitions.FleetMember | ||
transform: $['required'] = ['properties'] | ||
- from: swagger-document | ||
where: $.definitions.FleetUpdateStrategy | ||
transform: $['required'] = ['properties'] | ||
- from: swagger-document | ||
where: $.definitions.UpdateRun | ||
transform: $['required'] = ['properties'] | ||
# Hide set cmdlet | ||
- where: | ||
verb: Set | ||
remove: true | ||
# Rename IdentityUserAssignedIdentity, UpdateStrategyName | ||
- where: | ||
parameter-name: IdentityUserAssignedIdentity | ||
set: | ||
parameter-name: UserAssignedIdentity | ||
- where: | ||
parameter-name: UpdateStrategyName | ||
subject: FleetUpdateStrategy | ||
set: | ||
parameter-name: Name | ||
# Add required model cmdlet | ||
- model-cmdlet: | ||
- model-name: UpdateStage | ||
- model-name: UpdateGroup |
95 changes: 95 additions & 0 deletions
95
src/Fleet/Fleet.Autorest/UX/Microsoft.ContainerService/fleets-members.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"resourceType": "fleets/members", | ||
"apiVersion": "2023-10-15", | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.fleet" | ||
}, | ||
"commands": [ | ||
{ | ||
"name": "Get-AzFleetMember", | ||
"description": "Get a FleetMember", | ||
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}", | ||
"help": { | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.fleet/get-azfleetmember" | ||
}, | ||
"parameterSets": [ | ||
{ | ||
"parameters": [ | ||
"-FleetName <String>", | ||
"-Name <String>", | ||
"-ResourceGroupName <String>", | ||
"[-SubscriptionId <String[]>]" | ||
] | ||
} | ||
] | ||
}, | ||
"examples": [ | ||
{ | ||
"description": "Get a FleetMember", | ||
"parameters": [ | ||
{ | ||
"name": "-FleetName", | ||
"value": "[Path.fleetName]" | ||
}, | ||
{ | ||
"name": "-Name", | ||
"value": "[Path.fleetMemberName]" | ||
}, | ||
{ | ||
"name": "-ResourceGroupName", | ||
"value": "[Path.resourceGroupName]" | ||
}, | ||
{ | ||
"name": "-SubscriptionId", | ||
"value": "[Path.subscriptionId]" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Remove-AzFleetMember", | ||
"description": "Delete a FleetMember", | ||
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}", | ||
"help": { | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.fleet/remove-azfleetmember" | ||
}, | ||
"parameterSets": [ | ||
{ | ||
"parameters": [ | ||
"-FleetName <String>", | ||
"-Name <String>", | ||
"-ResourceGroupName <String>", | ||
"[-SubscriptionId <String>]" | ||
] | ||
} | ||
] | ||
}, | ||
"examples": [ | ||
{ | ||
"description": "Delete a FleetMember", | ||
"parameters": [ | ||
{ | ||
"name": "-FleetName", | ||
"value": "[Path.fleetName]" | ||
}, | ||
{ | ||
"name": "-Name", | ||
"value": "[Path.fleetMemberName]" | ||
}, | ||
{ | ||
"name": "-ResourceGroupName", | ||
"value": "[Path.resourceGroupName]" | ||
}, | ||
{ | ||
"name": "-SubscriptionId", | ||
"value": "[Path.subscriptionId]" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.