diff --git a/src/CustomLocation/CustomLocation.Autorest/README.md b/src/CustomLocation/CustomLocation.Autorest/README.md index c2c4402d8a31..a2e57b0a69ee 100644 --- a/src/CustomLocation/CustomLocation.Autorest/README.md +++ b/src/CustomLocation/CustomLocation.Autorest/README.md @@ -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 @@ -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 @@ -65,7 +60,6 @@ directive: } } } - - from: swagger-document where: $.definitions.customLocationProperties.properties.provisioningState transform: >- @@ -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).*(?", - "-ResourceGroupName ", - "[-SubscriptionId ]" - ] - }, - { - "parameters": [ - "-CustomLocationName ", - "-ResourceGroupName ", - "[-SubscriptionId ]" - ] - } - ] - }, - "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.", diff --git a/src/CustomLocation/CustomLocation.Autorest/custom/New-AzCustomLocation.ps1 b/src/CustomLocation/CustomLocation.Autorest/custom/New-AzCustomLocation.ps1 deleted file mode 100644 index ce05c9b26e3b..000000000000 --- a/src/CustomLocation/CustomLocation.Autorest/custom/New-AzCustomLocation.ps1 +++ /dev/null @@ -1,206 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -Create a Custom Location in the specified Subscription and Resource Group -.Description -Create a Custom Location in the specified Subscription and Resource Group -.Example -New-AzCustomLocation -ResourceGroupName azps_test_group -Name azps_test_cluster -Location eastus -ClusterExtensionId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/azps_test_group/providers/Microsoft.Kubernetes/connectedClusters/azps_test_cluster/providers/Microsoft.KubernetesConfiguration/extensions/azps_test_extension" -HostResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/azps_test_group/providers/Microsoft.Kubernetes/connectedClusters/azps_test_cluster" -Namespace arc - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocation -.Notes -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - -INPUTOBJECT : Identity Parameter - [ChildResourceName ]: Resource Sync Rule name. - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ResourceName ]: Custom Locations name. - [SubscriptionId ]: The ID of the target subscription. -.Link -https://learn.microsoft.com/powershell/module/az.customlocation/new-azcustomlocation -#> -function New-AzCustomLocation { - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocation])] - [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] - param( - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Path')] - [System.String] - # Custom Locations name. - ${Name}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # The type of the Custom Locations authentication - ${AuthenticationType}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # The kubeconfig value. - ${AuthenticationValue}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String[]] - # Contains the reference to the add-on that contains charts to deploy CRDs and operators. - ${ClusterExtensionId}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # Display name for the Custom Locations location. - ${DisplayName}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # Connected Cluster or AKS Cluster. - # The Custom Locations RP will perform a checkAccess API for listAdminCredentials permissions. - ${HostResourceId}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.PSArgumentCompleterAttribute("SystemAssigned", "None")] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # The identity type. - ${IdentityType}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # Kubernetes namespace that will be created on the specified cluster. - ${Namespace}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ITrackedResourceTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - - [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # Path of Json file supplied to the Create operation - ${JsonFilePath}, - - [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # Json string supplied to the Create operation - ${JsonString}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Azure')] - [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - ${DefaultProfile}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} - ) - - process { - try { - Az.CustomLocation.internal\New-AzCustomLocation @PSBoundParameters - } - catch { - throw - } - } -} diff --git a/src/CustomLocation/CustomLocation.Autorest/custom/Update-AzCustomLocation.ps1 b/src/CustomLocation/CustomLocation.Autorest/custom/Update-AzCustomLocation.ps1 deleted file mode 100644 index 82ca05cc9999..000000000000 --- a/src/CustomLocation/CustomLocation.Autorest/custom/Update-AzCustomLocation.ps1 +++ /dev/null @@ -1,211 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription. -.Description -Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription. -.Example -Update-AzCustomLocation -ResourceGroupName azps_test_group -Name azps_test_cluster_1 -ClusterExtensionId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/azps_test_group/providers/Microsoft.Kubernetes/connectedClusters/azps_test_cluster/providers/Microsoft.KubernetesConfiguration/extensions/azps_test_extension" -HostResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/azps_test_group/providers/Microsoft.Kubernetes/connectedClusters/azps_test_cluster" -Namespace arc -.Example -Get-AzCustomLocation -ResourceGroupName azps_test_group -Name azps_test_cluster | Update-AzCustomLocation - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocation -.Notes -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - -INPUTOBJECT : Identity Parameter - [ChildResourceName ]: Resource Sync Rule name. - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ResourceName ]: Custom Locations name. - [SubscriptionId ]: The ID of the target subscription. -.Link -https://learn.microsoft.com/powershell/module/az.customlocation/update-azcustomlocation -#> -function Update-AzCustomLocation { - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocation])] - [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] - param( - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Path')] - [System.String] - # Custom Locations name. - ${Name}, - - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaJsonFilePath')] - [Parameter(ParameterSetName='UpdateViaJsonString')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # The type of the Custom Locations authentication - ${AuthenticationType}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # The kubeconfig value. - ${AuthenticationValue}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String[]] - # Contains the reference to the add-on that contains charts to deploy CRDs and operators. - ${ClusterExtensionId}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # Display name for the Custom Locations location. - ${DisplayName}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # Connected Cluster or AKS Cluster. - # The Custom Locations RP will perform a checkAccess API for listAdminCredentials permissions. - ${HostResourceId}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.PSArgumentCompleterAttribute("SystemAssigned", "None")] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # The identity type. - ${IdentityType}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # Kubernetes namespace that will be created on the specified cluster. - ${Namespace}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.IPatchableCustomLocationsTags]))] - [System.Collections.Hashtable] - # Resource tags - ${Tag}, - - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # Path of Json file supplied to the Update operation - ${JsonFilePath}, - - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Body')] - [System.String] - # Json string supplied to the Update operation - ${JsonString}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Azure')] - [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - ${DefaultProfile}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} - ) - - process { - try { - Az.CustomLocation.internal\Update-AzCustomLocation @PSBoundParameters - } - catch { - throw - } - } -} diff --git a/src/CustomLocation/CustomLocation.Autorest/docs/Az.CustomLocation.md b/src/CustomLocation/CustomLocation.Autorest/docs/Az.CustomLocation.md index fc9074a6c882..3966d87eb751 100644 --- a/src/CustomLocation/CustomLocation.Autorest/docs/Az.CustomLocation.md +++ b/src/CustomLocation/CustomLocation.Autorest/docs/Az.CustomLocation.md @@ -39,8 +39,8 @@ Deletes the Custom Location with the specified Resource Name, Resource Group, an Deletes the Resource Sync Rule with the specified Resource Sync Rule Name, Custom Location Resource Name, Resource Group, and Subscription Id. ### [Update-AzCustomLocation](Update-AzCustomLocation.md) -Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription. +Update a Custom Location in the specified Subscription and Resource Group ### [Update-AzCustomLocationResourceSyncRule](Update-AzCustomLocationResourceSyncRule.md) -Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource Group, Subscription and Custom Location name. +Update a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource Group, Subscription and Custom Location name. diff --git a/src/CustomLocation/CustomLocation.Autorest/docs/Find-AzCustomLocationTargetResourceGroup.md b/src/CustomLocation/CustomLocation.Autorest/docs/Find-AzCustomLocationTargetResourceGroup.md index 1b0c7c8c06cf..8cccd0277b40 100644 --- a/src/CustomLocation/CustomLocation.Autorest/docs/Find-AzCustomLocationTargetResourceGroup.md +++ b/src/CustomLocation/CustomLocation.Autorest/docs/Find-AzCustomLocationTargetResourceGroup.md @@ -102,7 +102,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity diff --git a/src/CustomLocation/CustomLocation.Autorest/docs/Get-AzCustomLocation.md b/src/CustomLocation/CustomLocation.Autorest/docs/Get-AzCustomLocation.md index f39249f0ee09..a7799049faa4 100644 --- a/src/CustomLocation/CustomLocation.Autorest/docs/Get-AzCustomLocation.md +++ b/src/CustomLocation/CustomLocation.Autorest/docs/Get-AzCustomLocation.md @@ -98,7 +98,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity diff --git a/src/CustomLocation/CustomLocation.Autorest/docs/Get-AzCustomLocationResourceSyncRule.md b/src/CustomLocation/CustomLocation.Autorest/docs/Get-AzCustomLocationResourceSyncRule.md index 707d586c65f6..0163cb66d7b8 100644 --- a/src/CustomLocation/CustomLocation.Autorest/docs/Get-AzCustomLocationResourceSyncRule.md +++ b/src/CustomLocation/CustomLocation.Autorest/docs/Get-AzCustomLocationResourceSyncRule.md @@ -71,7 +71,6 @@ Get the detail of the resourceSyncRule with a specified resource group, subscrip ### -CustomlocationInputObject Identity Parameter -To construct, see NOTES section for CUSTOMLOCATIONINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity @@ -118,7 +117,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity diff --git a/src/CustomLocation/CustomLocation.Autorest/docs/New-AzCustomLocation.md b/src/CustomLocation/CustomLocation.Autorest/docs/New-AzCustomLocation.md index 2b827bf4e5a8..a8e75970c77f 100644 --- a/src/CustomLocation/CustomLocation.Autorest/docs/New-AzCustomLocation.md +++ b/src/CustomLocation/CustomLocation.Autorest/docs/New-AzCustomLocation.md @@ -17,7 +17,7 @@ Create a Custom Location in the specified Subscription and Resource Group New-AzCustomLocation -Name -ResourceGroupName -ClusterExtensionId -HostResourceId -Location -Namespace [-SubscriptionId ] [-AuthenticationType ] [-AuthenticationValue ] [-DisplayName ] - [-IdentityType ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-EnableSystemAssignedIdentity] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -55,6 +55,45 @@ eastus azps-customlocation azps-namespace azps_test_cluster Creates or updates a Custom Location in the specified Subscription and Resource Group. +### Example 2: Creates or updates a Custom Location that enable system assigned identity +```powershell +$HostResourceId = (Get-AzConnectedKubernetes -ClusterName azps-connect -ResourceGroupName group01).Id +$ClusterExtensionId = (Get-AzKubernetesExtension -ClusterName azps-connect -ClusterType ConnectedClusters -ResourceGroupName group01 -Name azps-extension).Id +New-AzCustomLocation -ResourceGroupName group01 -Name azps-customlocation -Location eastus -ClusterExtensionId $ClusterExtensionId -HostResourceId $HostResourceId -Namespace azps-namespace -EnableSystemAssignedIdentity +``` + +```output +AuthenticationType : +AuthenticationValue : +ClusterExtensionId : {/subscriptions/11111111-2222-3333-4444-123456789101/resourceGroups/group01/providers/Microsoft.Kubernetes/ConnectedClusters/azps- + connect/providers/Microsoft.KubernetesConfiguration/extensions/azps-extension} +DisplayName : +HostResourceId : /subscriptions/11111111-2222-3333-4444-123456789101/resourceGroups/group01/providers/Microsoft.Kubernetes/connectedClusters/azps-c + onnect +HostType : Kubernetes +Id : /subscriptions/11111111-2222-3333-4444-123456789101/resourcegroups/group01/providers/microsoft.extendedlocation/customlocations/az + ps-customlocation +IdentityPrincipalId : 11111111-2222-3333-4444-123456789123 +IdentityTenantId : 11111111-2222-3333-4444-123456789876 +IdentityType : SystemAssigned +Location : eastus +Name : azps-customlocation +Namespace : azps-namespace +ProvisioningState : Succeeded +ResourceGroupName : group01 +SystemDataCreatedAt : 4/30/2024 7:57:50 AM +SystemDataCreatedBy : user@example.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 4/30/2024 7:57:50 AM +SystemDataLastModifiedBy : user@example.com +SystemDataLastModifiedByType : User +Tag : { + } +Type : Microsoft.ExtendedLocation/customLocations +``` + +The third command creates or updates a Custom Location that enable system assigned identity. + ## PARAMETERS ### -AsJob @@ -148,31 +187,31 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HostResourceId -Connected Cluster or AKS Cluster. -The Custom Locations RP will perform a checkAccess API for listAdminCredentials permissions. +### -EnableSystemAssignedIdentity +Decides if enable a system assigned identity for the resource. ```yaml -Type: System.String +Type: System.Management.Automation.SwitchParameter Parameter Sets: CreateExpanded Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -IdentityType -The identity type. +### -HostResourceId +Connected Cluster or AKS Cluster. +The Custom Locations RP will perform a checkAccess API for listAdminCredentials permissions. ```yaml Type: System.String Parameter Sets: CreateExpanded Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -351,8 +390,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity - ## OUTPUTS ### Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocation diff --git a/src/CustomLocation/CustomLocation.Autorest/docs/New-AzCustomLocationResourceSyncRule.md b/src/CustomLocation/CustomLocation.Autorest/docs/New-AzCustomLocationResourceSyncRule.md index 98f6616f63f2..6b7b6815a654 100644 --- a/src/CustomLocation/CustomLocation.Autorest/docs/New-AzCustomLocationResourceSyncRule.md +++ b/src/CustomLocation/CustomLocation.Autorest/docs/New-AzCustomLocationResourceSyncRule.md @@ -89,7 +89,6 @@ Accept wildcard characters: False ### -CustomlocationInputObject Identity Parameter -To construct, see NOTES section for CUSTOMLOCATIONINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity @@ -136,7 +135,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity @@ -261,7 +259,6 @@ MatchExpressions is a list of resource selector requirements. Valid operators include In, NotIn, Exists, and DoesNotExist. The values set must be non-empty in the case of In and NotIn. The values set must be empty in the case of Exists and DoesNotExist. -To construct, see NOTES section for SELECTORMATCHEXPRESSION properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.IMatchExpressionsProperties[] diff --git a/src/CustomLocation/CustomLocation.Autorest/docs/Remove-AzCustomLocation.md b/src/CustomLocation/CustomLocation.Autorest/docs/Remove-AzCustomLocation.md index 6c807a774a10..93df95bf1bc7 100644 --- a/src/CustomLocation/CustomLocation.Autorest/docs/Remove-AzCustomLocation.md +++ b/src/CustomLocation/CustomLocation.Autorest/docs/Remove-AzCustomLocation.md @@ -79,7 +79,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity diff --git a/src/CustomLocation/CustomLocation.Autorest/docs/Remove-AzCustomLocationResourceSyncRule.md b/src/CustomLocation/CustomLocation.Autorest/docs/Remove-AzCustomLocationResourceSyncRule.md index 39af97e7aeca..a50a1cca586b 100644 --- a/src/CustomLocation/CustomLocation.Autorest/docs/Remove-AzCustomLocationResourceSyncRule.md +++ b/src/CustomLocation/CustomLocation.Autorest/docs/Remove-AzCustomLocationResourceSyncRule.md @@ -63,7 +63,6 @@ Deletes the Resource Sync Rule with the specified Resource Sync Rule Name, Custo ### -CustomlocationInputObject Identity Parameter -To construct, see NOTES section for CUSTOMLOCATIONINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity @@ -110,7 +109,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity diff --git a/src/CustomLocation/CustomLocation.Autorest/docs/Update-AzCustomLocation.md b/src/CustomLocation/CustomLocation.Autorest/docs/Update-AzCustomLocation.md index eb94675ffc87..bea668cf64a5 100644 --- a/src/CustomLocation/CustomLocation.Autorest/docs/Update-AzCustomLocation.md +++ b/src/CustomLocation/CustomLocation.Autorest/docs/Update-AzCustomLocation.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Update-AzCustomLocation ## SYNOPSIS -Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription. +Update a Custom Location in the specified Subscription and Resource Group ## SYNTAX @@ -16,32 +16,21 @@ Updates a Custom Location with the specified Resource Name in the specified Reso ``` Update-AzCustomLocation -Name -ResourceGroupName [-SubscriptionId ] [-AuthenticationType ] [-AuthenticationValue ] [-ClusterExtensionId ] - [-DisplayName ] [-HostResourceId ] [-IdentityType ] [-Namespace ] - [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-DisplayName ] [-EnableSystemAssignedIdentity ] [-HostResourceId ] + [-Namespace ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] ``` ### UpdateViaIdentityExpanded ``` Update-AzCustomLocation -InputObject [-AuthenticationType ] [-AuthenticationValue ] [-ClusterExtensionId ] [-DisplayName ] - [-HostResourceId ] [-IdentityType ] [-Namespace ] [-Tag ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] -``` - -### UpdateViaJsonFilePath -``` -Update-AzCustomLocation -Name -ResourceGroupName -JsonFilePath - [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] -``` - -### UpdateViaJsonString -``` -Update-AzCustomLocation -Name -ResourceGroupName -JsonString - [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-EnableSystemAssignedIdentity ] [-HostResourceId ] [-Namespace ] + [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION -Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription. +Update a Custom Location in the specified Subscription and Resource Group ## EXAMPLES @@ -74,14 +63,67 @@ eastus azps-customlocation azps-namespace azps_test_cluster Updates a Custom Location. +### Example 3: Updates a Custom Location with disable system assigned identity +```powershell +Update-AzCustomLocation -Name azps-customlocation -ResourceGroupName group01 -EnableSystemAssignedIdentity $false -Tag @{"aaa"= "111"} +``` + +```output +AuthenticationType : +AuthenticationValue : +ClusterExtensionId : {/subscriptions/11111111-2222-3333-4444-123456789101/resourceGroups/group01/providers/Microsoft.Kubernetes/ConnectedClusters/azps- + connect/providers/Microsoft.KubernetesConfiguration/extensions/azps-extension} +DisplayName : +HostResourceId : /subscriptions/11111111-2222-3333-4444-123456789101/resourceGroups/group01/providers/Microsoft.Kubernetes/connectedClusters/azps-c + onnect +HostType : Kubernetes +Id : /subscriptions/11111111-2222-3333-4444-123456789101/resourcegroups/group01/providers/microsoft.extendedlocation/customlocations/az + ps-customlocation +IdentityPrincipalId : +IdentityTenantId : +IdentityType : None +Location : eastus +Name : azps-customlocation +Namespace : azps-namespace +ProvisioningState : Succeeded +ResourceGroupName : group01 +SystemDataCreatedAt : 4/30/2024 7:57:50 AM +SystemDataCreatedBy : user@example.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 4/30/2024 8:08:55 AM +SystemDataLastModifiedBy : user@example.com +SystemDataLastModifiedByType : User +Tag : { + "aaa": "111" + } +Type : Microsoft.ExtendedLocation/customLocations +``` + +This command updates a Custom Location with disable system assigned identity. + ## PARAMETERS +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -AuthenticationType The type of the Custom Locations authentication ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: (All) Aliases: Required: False @@ -96,7 +138,7 @@ The kubeconfig value. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: (All) Aliases: Required: False @@ -111,7 +153,7 @@ Contains the reference to the add-on that contains charts to deploy CRDs and ope ```yaml Type: System.String[] -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: (All) Aliases: Required: False @@ -142,7 +184,7 @@ Display name for the Custom Locations location. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: (All) Aliases: Required: False @@ -152,13 +194,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HostResourceId -Connected Cluster or AKS Cluster. -The Custom Locations RP will perform a checkAccess API for listAdminCredentials permissions. +### -EnableSystemAssignedIdentity +Decides if enable a system assigned identity for the resource. ```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) Aliases: Required: False @@ -168,12 +209,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -IdentityType -The identity type. +### -HostResourceId +Connected Cluster or AKS Cluster. +The Custom Locations RP will perform a checkAccess API for listAdminCredentials permissions. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: (All) Aliases: Required: False @@ -185,7 +227,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.CustomLocation.Models.ICustomLocationIdentity @@ -199,27 +240,12 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` -### -JsonFilePath -Path of Json file supplied to the Update operation - -```yaml -Type: System.String -Parameter Sets: UpdateViaJsonFilePath -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -JsonString -Json string supplied to the Update operation +### -Name +Custom Locations name. ```yaml Type: System.String -Parameter Sets: UpdateViaJsonString +Parameter Sets: UpdateExpanded Aliases: Required: True @@ -229,27 +255,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Name -Custom Locations name. +### -Namespace +Kubernetes namespace that will be created on the specified cluster. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Parameter Sets: (All) Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Namespace -Kubernetes namespace that will be created on the specified cluster. +### -NoWait +Run the command asynchronously ```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) Aliases: Required: False @@ -265,7 +291,7 @@ The name is case insensitive. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Parameter Sets: UpdateExpanded Aliases: Required: True @@ -280,7 +306,7 @@ The ID of the target subscription. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -291,11 +317,11 @@ Accept wildcard characters: False ``` ### -Tag -Resource tags +Resource tags. ```yaml Type: System.Collections.Hashtable -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: (All) Aliases: Required: False diff --git a/src/CustomLocation/CustomLocation.Autorest/docs/Update-AzCustomLocationResourceSyncRule.md b/src/CustomLocation/CustomLocation.Autorest/docs/Update-AzCustomLocationResourceSyncRule.md index 83128589036c..dff5eca0250a 100644 --- a/src/CustomLocation/CustomLocation.Autorest/docs/Update-AzCustomLocationResourceSyncRule.md +++ b/src/CustomLocation/CustomLocation.Autorest/docs/Update-AzCustomLocationResourceSyncRule.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Update-AzCustomLocationResourceSyncRule ## SYNOPSIS -Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource Group, Subscription and Custom Location name. +Update a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource Group, Subscription and Custom Location name. ## SYNTAX @@ -52,7 +52,7 @@ Update-AzCustomLocationResourceSyncRule -CustomLocationName -Name