Skip to content

Commit

Permalink
[custom location] Upgrade managed identity (Azure#24770)
Browse files Browse the repository at this point in the history
* Upgrade managed identity for Custom Location module

* Fix and remove custom cmdlets

* Add New custom location example exception

* Update CustomLocation examples
  • Loading branch information
JoyerJin authored and qinzhouxu committed Jun 5, 2024
1 parent 3bb742c commit 7efc07b
Show file tree
Hide file tree
Showing 23 changed files with 1,120 additions and 1,160 deletions.
21 changes: 9 additions & 12 deletions src/CustomLocation/CustomLocation.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
This directory contains the PowerShell module for the CustomLocation service.

---
## Status
[![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/)

## Info
- Modifiable: yes
- Generated: all
Expand Down Expand Up @@ -39,8 +36,6 @@ input-file:
module-version: 0.1.0
title: CustomLocation
subject-prefix: $(service-name)
disable-transform-identity-type: true
flatten-userassignedidentity: false

identity-correction-for-post: true

Expand All @@ -65,7 +60,6 @@ directive:
}
}
}
- from: swagger-document
where: $.definitions.customLocationProperties.properties.provisioningState
transform: >-
Expand All @@ -91,8 +85,16 @@ directive:
where: $
transform: return $.replace(/\{resourceName\}\/enabledResourceTypes/g, "{resourceName}/enabledresourcetypes")

- from: swagger-document
where: $.definitions.customLocation
transform: $['required'] = ['properties']

- from: swagger-document
where: $.definitions.customLocationProperties
transform: $['required'] = ['clusterExtensionIds', 'hostResourceId', 'namespace']

- where:
variant: ^(Create|Update).*(?<!Expanded|JsonFilePath|JsonString)$
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
subject: CustomLocation
Expand All @@ -118,11 +120,6 @@ directive:
subject: CustomLocationOperation
hide: true

- where:
verb: New|Update
subject: CustomLocation
hide: true

- where:
subject: ^CustomLocation$|^CustomLocationEnabledResourceType$
parameter-name: ResourceName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,68 +5,6 @@
"url": "https://learn.microsoft.com/powershell/module/az.customlocation"
},
"commands": [
{
"name": "Find-AzCustomLocationTargetResourceGroup",
"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.",
"path": "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{resourceName}/findTargetResourceGroup",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.customlocation/find-azcustomlocationtargetresourcegroup"
},
"parameterSets": [
{
"parameters": [
"-CustomLocationName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
},
{
"parameters": [
"-CustomLocationName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"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.",
"parameters": [
{
"name": "-CustomLocationName",
"value": "[Path.resourceName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
},
{
"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.",
"parameters": [
{
"name": "-CustomLocationName",
"value": "[Path.resourceName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Get-AzCustomLocation",
"description": "Gets the details of the customLocation with a specified resource group and name.",
Expand Down

This file was deleted.

Loading

0 comments on commit 7efc07b

Please sign in to comment.