Skip to content

Commit 549a00f

Browse files
authored
[custom location] Upgrade managed identity (#24770)
* Upgrade managed identity for Custom Location module * Fix and remove custom cmdlets * Add New custom location example exception * Update CustomLocation examples
1 parent ef83b1a commit 549a00f

23 files changed

+1120
-1160
lines changed

src/CustomLocation/CustomLocation.Autorest/README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
This directory contains the PowerShell module for the CustomLocation service.
44

55
---
6-
## Status
7-
[![Az.CustomLocation](https://img.shields.io/powershellgallery/v/Az.CustomLocation.svg?style=flat-square&label=Az.CustomLocation "Az.CustomLocation")](https://www.powershellgallery.com/packages/Az.CustomLocation/)
8-
96
## Info
107
- Modifiable: yes
118
- Generated: all
@@ -39,8 +36,6 @@ input-file:
3936
module-version: 0.1.0
4037
title: CustomLocation
4138
subject-prefix: $(service-name)
42-
disable-transform-identity-type: true
43-
flatten-userassignedidentity: false
4439

4540
identity-correction-for-post: true
4641

@@ -65,7 +60,6 @@ directive:
6560
}
6661
}
6762
}
68-
6963
- from: swagger-document
7064
where: $.definitions.customLocationProperties.properties.provisioningState
7165
transform: >-
@@ -91,8 +85,16 @@ directive:
9185
where: $
9286
transform: return $.replace(/\{resourceName\}\/enabledResourceTypes/g, "{resourceName}/enabledresourcetypes")
9387

88+
- from: swagger-document
89+
where: $.definitions.customLocation
90+
transform: $['required'] = ['properties']
91+
92+
- from: swagger-document
93+
where: $.definitions.customLocationProperties
94+
transform: $['required'] = ['clusterExtensionIds', 'hostResourceId', 'namespace']
95+
9496
- where:
95-
variant: ^(Create|Update).*(?<!Expanded|JsonFilePath|JsonString)$
97+
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
9698
remove: true
9799
- where:
98100
subject: CustomLocation
@@ -118,11 +120,6 @@ directive:
118120
subject: CustomLocationOperation
119121
hide: true
120122

121-
- where:
122-
verb: New|Update
123-
subject: CustomLocation
124-
hide: true
125-
126123
- where:
127124
subject: ^CustomLocation$|^CustomLocationEnabledResourceType$
128125
parameter-name: ResourceName

src/CustomLocation/CustomLocation.Autorest/UX/microsoft.extendedlocation/customlocations.json

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -5,68 +5,6 @@
55
"url": "https://learn.microsoft.com/powershell/module/az.customlocation"
66
},
77
"commands": [
8-
{
9-
"name": "Find-AzCustomLocationTargetResourceGroup",
10-
"description": "Returns the target resource group associated with the resource sync rules of the Custom Location that match the rules passed in with the Find Target Resource Group Request.",
11-
"path": "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{resourceName}/findTargetResourceGroup",
12-
"help": {
13-
"learnMore": {
14-
"url": "https://learn.microsoft.com/powershell/module/az.customlocation/find-azcustomlocationtargetresourcegroup"
15-
},
16-
"parameterSets": [
17-
{
18-
"parameters": [
19-
"-CustomLocationName <String>",
20-
"-ResourceGroupName <String>",
21-
"[-SubscriptionId <String>]"
22-
]
23-
},
24-
{
25-
"parameters": [
26-
"-CustomLocationName <String>",
27-
"-ResourceGroupName <String>",
28-
"[-SubscriptionId <String>]"
29-
]
30-
}
31-
]
32-
},
33-
"examples": [
34-
{
35-
"description": "Returns the target resource group associated with the resource sync rules of the Custom Location that match the rules passed in with the Find Target Resource Group Request.",
36-
"parameters": [
37-
{
38-
"name": "-CustomLocationName",
39-
"value": "[Path.resourceName]"
40-
},
41-
{
42-
"name": "-ResourceGroupName",
43-
"value": "[Path.resourceGroupName]"
44-
},
45-
{
46-
"name": "-SubscriptionId",
47-
"value": "[Path.subscriptionId]"
48-
}
49-
]
50-
},
51-
{
52-
"description": "Returns the target resource group associated with the resource sync rules of the Custom Location that match the rules passed in with the Find Target Resource Group Request.",
53-
"parameters": [
54-
{
55-
"name": "-CustomLocationName",
56-
"value": "[Path.resourceName]"
57-
},
58-
{
59-
"name": "-ResourceGroupName",
60-
"value": "[Path.resourceGroupName]"
61-
},
62-
{
63-
"name": "-SubscriptionId",
64-
"value": "[Path.subscriptionId]"
65-
}
66-
]
67-
}
68-
]
69-
},
708
{
719
"name": "Get-AzCustomLocation",
7210
"description": "Gets the details of the customLocation with a specified resource group and name.",

src/CustomLocation/CustomLocation.Autorest/custom/New-AzCustomLocation.ps1

Lines changed: 0 additions & 206 deletions
This file was deleted.

0 commit comments

Comments
 (0)