From 3591733b77766476dfec625df044c1bfa552bafc Mon Sep 17 00:00:00 2001
From: azure-powershell-bot
<65331932+azure-powershell-bot@users.noreply.github.com>
Date: Mon, 21 Apr 2025 05:57:15 +0000
Subject: [PATCH] [skip ci] Archive c149b23af4fc94ba787193b0d94daa1692c17ab0
---
.../Dashboard.Autorest/Az.Dashboard.csproj | 2 +-
.../Az.Dashboard.format.ps1xml | 494 ++-
.../Dashboard.Autorest/Az.Dashboard.psd1 | 3 +-
.../Properties/AssemblyInfo.cs | 29 +-
.../Dashboard.Autorest/check-dependencies.ps1 | 6 +-
.../exports/Get-AzGrafana.ps1 | 21 +-
.../exports/New-AzGrafana.ps1 | 104 +-
...afanaMonitorWorkspaceIntegrationObject.ps1 | 12 +-
.../exports/ProxyCmdletDefinitions.ps1 | 255 +-
.../exports/Remove-AzGrafana.ps1 | 17 +-
.../exports/Update-AzGrafana.ps1 | 101 +-
.../Dashboard.Autorest/generate-info.json | 2 +-
.../Dashboard.Autorest/generated/Module.cs | 27 +-
.../generated/api/Dashboard.cs | 3343 +++++++++++++----
.../generated/api/Models/Any.PowerShell.cs | 4 +-
.../generated/api/Models/Any.cs | 6 +-
.../generated/api/Models/Any.json.cs | 2 +-
.../Api20220801/ManagedGrafana.PowerShell.cs | 412 --
.../ManagedGrafanaProperties.PowerShell.cs | 252 --
...nagedGrafanaUpdateParameters.PowerShell.cs | 262 --
.../PrivateEndpointConnection.PowerShell.cs | 310 --
...eMonitorWorkspaceIntegration.PowerShell.cs | 26 +-
...nitorWorkspaceIntegration.TypeConverter.cs | 6 +-
.../AzureMonitorWorkspaceIntegration.cs | 9 +-
.../AzureMonitorWorkspaceIntegration.json.cs | 10 +-
.../generated/api/Models/DashboardIdentity.cs | 18 +
.../api/Models/DashboardIdentity.json.cs | 12 +-
.../ErrorAdditionalInfo.PowerShell.cs | 28 +-
.../ErrorAdditionalInfo.TypeConverter.cs | 6 +-
.../Models/{Api30 => }/ErrorAdditionalInfo.cs | 16 +-
.../{Api30 => }/ErrorAdditionalInfo.json.cs | 16 +-
.../{Api30 => }/ErrorDetail.PowerShell.cs | 40 +-
.../{Api30 => }/ErrorDetail.TypeConverter.cs | 6 +-
.../api/Models/{Api30 => }/ErrorDetail.cs | 51 +-
.../Models/{Api30 => }/ErrorDetail.json.cs | 28 +-
.../{Api30 => }/ErrorResponse.PowerShell.cs | 44 +-
.../ErrorResponse.TypeConverter.cs | 6 +-
.../api/Models/{Api30 => }/ErrorResponse.cs | 61 +-
.../Models/{Api30 => }/ErrorResponse.json.cs | 10 +-
.../GrafanaIntegrations.PowerShell.cs | 24 +-
.../GrafanaIntegrations.TypeConverter.cs | 6 +-
.../{Api20220801 => }/GrafanaIntegrations.cs | 19 +-
.../GrafanaIntegrations.json.cs | 10 +-
.../api/Models/ManagedGrafana.PowerShell.cs | 412 ++
.../ManagedGrafana.TypeConverter.cs | 6 +-
.../{Api20220801 => }/ManagedGrafana.cs | 329 +-
.../{Api20220801 => }/ManagedGrafana.json.cs | 39 +-
.../ManagedGrafanaListResponse.PowerShell.cs | 30 +-
...anagedGrafanaListResponse.TypeConverter.cs | 6 +-
.../ManagedGrafanaListResponse.cs | 22 +-
.../ManagedGrafanaListResponse.json.cs | 12 +-
.../ManagedGrafanaProperties.PowerShell.cs | 252 ++
.../ManagedGrafanaProperties.TypeConverter.cs | 6 +-
.../ManagedGrafanaProperties.cs | 155 +-
.../ManagedGrafanaProperties.json.cs | 40 +-
...naPropertiesUpdateParameters.PowerShell.cs | 44 +-
...ropertiesUpdateParameters.TypeConverter.cs | 6 +-
...anagedGrafanaPropertiesUpdateParameters.cs | 85 +-
...dGrafanaPropertiesUpdateParameters.json.cs | 18 +-
.../ManagedGrafanaTags.PowerShell.cs | 20 +-
.../ManagedGrafanaTags.TypeConverter.cs | 6 +-
.../{Api20220801 => }/ManagedGrafanaTags.cs | 6 +-
.../ManagedGrafanaTags.dictionary.cs | 4 +-
.../ManagedGrafanaTags.json.cs | 8 +-
...nagedGrafanaUpdateParameters.PowerShell.cs | 260 ++
...edGrafanaUpdateParameters.TypeConverter.cs | 6 +-
.../ManagedGrafanaUpdateParameters.cs | 140 +-
.../ManagedGrafanaUpdateParameters.json.cs | 14 +-
...dGrafanaUpdateParametersTags.PowerShell.cs | 22 +-
...afanaUpdateParametersTags.TypeConverter.cs | 6 +-
.../ManagedGrafanaUpdateParametersTags.cs | 6 +-
...dGrafanaUpdateParametersTags.dictionary.cs | 4 +-
...ManagedGrafanaUpdateParametersTags.json.cs | 8 +-
.../ManagedServiceIdentity.PowerShell.cs | 36 +-
.../ManagedServiceIdentity.TypeConverter.cs | 6 +-
.../{Api30 => }/ManagedServiceIdentity.cs | 44 +-
.../ManagedServiceIdentity.json.cs | 20 +-
.../{Api30 => }/Operation.PowerShell.cs | 56 +-
.../{Api30 => }/Operation.TypeConverter.cs | 6 +-
.../api/Models/{Api30 => }/Operation.cs | 86 +-
.../api/Models/{Api30 => }/Operation.json.cs | 28 +-
.../OperationDisplay.PowerShell.cs | 36 +-
.../OperationDisplay.TypeConverter.cs | 6 +-
.../Models/{Api30 => }/OperationDisplay.cs | 26 +-
.../{Api30 => }/OperationDisplay.json.cs | 24 +-
.../OperationListResult.PowerShell.cs | 28 +-
.../OperationListResult.TypeConverter.cs | 6 +-
.../Models/{Api30 => }/OperationListResult.cs | 26 +-
.../{Api30 => }/OperationListResult.json.cs | 16 +-
.../{Api30 => }/PrivateEndpoint.PowerShell.cs | 24 +-
.../PrivateEndpoint.TypeConverter.cs | 6 +-
.../api/Models/{Api30 => }/PrivateEndpoint.cs | 11 +-
.../{Api30 => }/PrivateEndpoint.json.cs | 12 +-
.../PrivateEndpointConnection.PowerShell.cs | 308 ++
...PrivateEndpointConnection.TypeConverter.cs | 6 +-
.../PrivateEndpointConnection.cs | 130 +-
.../PrivateEndpointConnection.json.cs | 12 +-
...EndpointConnectionListResult.PowerShell.cs | 30 +-
...pointConnectionListResult.TypeConverter.cs | 6 +-
.../PrivateEndpointConnectionListResult.cs | 24 +-
...rivateEndpointConnectionListResult.json.cs | 14 +-
...EndpointConnectionProperties.PowerShell.cs | 54 +-
...pointConnectionProperties.TypeConverter.cs | 6 +-
.../PrivateEndpointConnectionProperties.cs | 80 +-
...rivateEndpointConnectionProperties.json.cs | 18 +-
.../PrivateLinkResource.PowerShell.cs | 80 +-
.../PrivateLinkResource.TypeConverter.cs | 6 +-
.../{Api20220801 => }/PrivateLinkResource.cs | 110 +-
.../PrivateLinkResource.json.cs | 12 +-
...rivateLinkResourceListResult.PowerShell.cs | 30 +-
...ateLinkResourceListResult.TypeConverter.cs | 6 +-
.../PrivateLinkResourceListResult.cs | 24 +-
.../PrivateLinkResourceListResult.json.cs | 14 +-
...rivateLinkResourceProperties.PowerShell.cs | 38 +-
...ateLinkResourceProperties.TypeConverter.cs | 6 +-
.../PrivateLinkResourceProperties.cs | 52 +-
.../PrivateLinkResourceProperties.json.cs | 22 +-
...teLinkServiceConnectionState.PowerShell.cs | 34 +-
...inkServiceConnectionState.TypeConverter.cs | 6 +-
.../PrivateLinkServiceConnectionState.cs | 27 +-
.../PrivateLinkServiceConnectionState.json.cs | 14 +-
.../Models/{Api30 => }/Resource.PowerShell.cs | 60 +-
.../{Api30 => }/Resource.TypeConverter.cs | 6 +-
.../api/Models/{Api30 => }/Resource.cs | 113 +-
.../api/Models/{Api30 => }/Resource.json.cs | 26 +-
.../ResourceSku.PowerShell.cs | 24 +-
.../ResourceSku.TypeConverter.cs | 6 +-
.../Models/{Api20220801 => }/ResourceSku.cs | 9 +-
.../{Api20220801 => }/ResourceSku.json.cs | 10 +-
.../{Api30 => }/SystemData.PowerShell.cs | 44 +-
.../{Api30 => }/SystemData.TypeConverter.cs | 6 +-
.../api/Models/{Api30 => }/SystemData.cs | 48 +-
.../api/Models/{Api30 => }/SystemData.json.cs | 22 +-
.../UserAssignedIdentities.PowerShell.cs | 20 +-
.../UserAssignedIdentities.TypeConverter.cs | 6 +-
.../{Api30 => }/UserAssignedIdentities.cs | 8 +-
.../UserAssignedIdentities.dictionary.cs | 26 +-
.../UserAssignedIdentities.json.cs | 12 +-
.../UserAssignedIdentity.PowerShell.cs | 28 +-
.../UserAssignedIdentity.TypeConverter.cs | 6 +-
.../{Api30 => }/UserAssignedIdentity.cs | 16 +-
.../{Api30 => }/UserAssignedIdentity.json.cs | 16 +-
.../api/Support/ActionType.Completer.cs | 37 -
.../api/Support/ActionType.TypeConverter.cs | 61 -
.../generated/api/Support/ActionType.cs | 98 -
.../generated/api/Support/ApiKey.Completer.cs | 39 -
.../api/Support/ApiKey.TypeConverter.cs | 59 -
.../generated/api/Support/ApiKey.cs | 97 -
...GeneratedDomainNameLabelScope.Completer.cs | 35 -
...ratedDomainNameLabelScope.TypeConverter.cs | 59 -
.../AutoGeneratedDomainNameLabelScope.cs | 102 -
.../api/Support/CreatedByType.Completer.cs | 47 -
.../Support/CreatedByType.TypeConverter.cs | 59 -
.../generated/api/Support/CreatedByType.cs | 102 -
.../DeterministicOutboundIP.Completer.cs | 39 -
.../DeterministicOutboundIP.TypeConverter.cs | 59 -
.../api/Support/DeterministicOutboundIP.cs | 97 -
.../ManagedServiceIdentityType.Completer.cs | 49 -
...anagedServiceIdentityType.TypeConverter.cs | 61 -
.../api/Support/ManagedServiceIdentityType.cs | 106 -
.../generated/api/Support/Origin.Completer.cs | 46 -
.../api/Support/Origin.TypeConverter.cs | 62 -
.../generated/api/Support/Origin.cs | 103 -
...ntConnectionProvisioningState.Completer.cs | 47 -
...nnectionProvisioningState.TypeConverter.cs | 59 -
...vateEndpointConnectionProvisioningState.cs | 112 -
...dpointServiceConnectionStatus.Completer.cs | 43 -
...ntServiceConnectionStatus.TypeConverter.cs | 59 -
.../PrivateEndpointServiceConnectionStatus.cs | 106 -
.../Support/ProvisioningState.Completer.cs | 67 -
.../ProvisioningState.TypeConverter.cs | 59 -
.../api/Support/ProvisioningState.cs | 111 -
.../Support/PublicNetworkAccess.Completer.cs | 39 -
.../PublicNetworkAccess.TypeConverter.cs | 59 -
.../api/Support/PublicNetworkAccess.cs | 98 -
.../api/Support/ZoneRedundancy.Completer.cs | 39 -
.../Support/ZoneRedundancy.TypeConverter.cs | 59 -
.../generated/api/Support/ZoneRedundancy.cs | 97 -
.../cmdlets/GetAzGrafanaOperation_List.cs | 112 +-
.../generated/cmdlets/GetAzGrafana_Get.cs | 112 +-
.../cmdlets/GetAzGrafana_GetViaIdentity.cs | 105 +-
.../generated/cmdlets/GetAzGrafana_List.cs | 121 +-
.../generated/cmdlets/GetAzGrafana_List1.cs | 119 +-
.../cmdlets/NewAzGrafana_CreateExpanded.cs | 246 +-
.../NewAzGrafana_CreateViaJsonFilePath.cs | 611 +++
.../NewAzGrafana_CreateViaJsonString.cs | 609 +++
.../cmdlets/RemoveAzGrafana_Delete.cs | 98 +-
.../RemoveAzGrafana_DeleteViaIdentity.cs | 91 +-
.../cmdlets/UpdateAzGrafana_UpdateExpanded.cs | 438 ++-
...dateAzGrafana_UpdateViaIdentityExpanded.cs | 437 ++-
.../Attributes/ExternalDocsAttribute.cs | 30 +
.../PSArgumentCompleterAttribute.cs | 52 +
.../BuildTime/Cmdlets/ExportFormatPs1xml.cs | 6 +-
.../BuildTime/Cmdlets/ExportModelSurface.cs | 2 +-
.../BuildTime/Cmdlets/ExportProxyCmdlet.cs | 4 +-
.../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 8 +-
.../BuildTime/Cmdlets/ExportTestStub.cs | 211 +-
.../runtime/BuildTime/MarkdownRenderer.cs | 2 +-
.../BuildTime/Models/PsMarkdownTypes.cs | 43 +-
.../BuildTime/Models/PsProxyOutputs.cs | 60 +-
.../runtime/BuildTime/Models/PsProxyTypes.cs | 56 +-
.../runtime/BuildTime/PsAttributes.cs | 15 +
.../runtime/BuildTime/PsExtensions.cs | 7 +
.../generated/runtime/BuildTime/PsHelpers.cs | 4 +-
.../generated/runtime/Context.cs | 33 +
.../generated/runtime/Events.cs | 4 +-
.../generated/runtime/ISendAsync.cs | 113 +
.../generated/runtime/InfoAttribute.cs | 4 +
.../generated/runtime/InputHandler.cs | 22 +
.../runtime/Nodes/Collections/XNodeArray.cs | 5 +
.../generated/runtime/SerializationMode.cs | 8 +-
.../runtime/TypeConverterExtensions.cs | 50 +
.../internal/Get-AzGrafanaOperation.ps1 | 10 +-
.../internal/New-AzGrafana.ps1 | 107 +-
.../internal/ProxyCmdletDefinitions.ps1 | 117 +-
.../Dashboard.Autorest/resources/README.md | 11 +
.../Dashboard.Autorest/test-module.ps1 | 10 +-
217 files changed, 9862 insertions(+), 6974 deletions(-)
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Models/Api20220801/ManagedGrafana.PowerShell.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Models/Api20220801/ManagedGrafanaProperties.PowerShell.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Models/Api20220801/ManagedGrafanaUpdateParameters.PowerShell.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Models/Api20220801/PrivateEndpointConnection.PowerShell.cs
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/AzureMonitorWorkspaceIntegration.PowerShell.cs (82%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/AzureMonitorWorkspaceIntegration.TypeConverter.cs (96%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/AzureMonitorWorkspaceIntegration.cs (87%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/AzureMonitorWorkspaceIntegration.json.cs (94%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ErrorAdditionalInfo.PowerShell.cs (80%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ErrorAdditionalInfo.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ErrorAdditionalInfo.cs (82%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ErrorAdditionalInfo.json.cs (93%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ErrorDetail.PowerShell.cs (68%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ErrorDetail.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ErrorDetail.cs (66%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ErrorDetail.json.cs (85%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ErrorResponse.PowerShell.cs (66%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ErrorResponse.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ErrorResponse.cs (57%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ErrorResponse.json.cs (95%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/GrafanaIntegrations.PowerShell.cs (78%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/GrafanaIntegrations.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/GrafanaIntegrations.cs (66%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/GrafanaIntegrations.json.cs (89%)
create mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Models/ManagedGrafana.PowerShell.cs
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafana.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafana.cs (56%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafana.json.cs (85%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaListResponse.PowerShell.cs (75%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaListResponse.TypeConverter.cs (96%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaListResponse.cs (66%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaListResponse.json.cs (89%)
create mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Models/ManagedGrafanaProperties.PowerShell.cs
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaProperties.TypeConverter.cs (96%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaProperties.cs (57%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaProperties.json.cs (86%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaPropertiesUpdateParameters.PowerShell.cs (58%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaPropertiesUpdateParameters.TypeConverter.cs (96%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaPropertiesUpdateParameters.cs (55%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaPropertiesUpdateParameters.json.cs (91%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaTags.PowerShell.cs (89%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaTags.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaTags.cs (79%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaTags.dictionary.cs (95%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaTags.json.cs (95%)
create mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Models/ManagedGrafanaUpdateParameters.PowerShell.cs
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaUpdateParameters.TypeConverter.cs (96%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaUpdateParameters.cs (55%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaUpdateParameters.json.cs (92%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaUpdateParametersTags.PowerShell.cs (88%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaUpdateParametersTags.TypeConverter.cs (96%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaUpdateParametersTags.cs (79%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaUpdateParametersTags.dictionary.cs (95%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ManagedGrafanaUpdateParametersTags.json.cs (94%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ManagedServiceIdentity.PowerShell.cs (71%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ManagedServiceIdentity.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ManagedServiceIdentity.cs (79%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/ManagedServiceIdentity.json.cs (91%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/Operation.PowerShell.cs (64%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/Operation.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/Operation.cs (75%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/Operation.json.cs (90%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/OperationDisplay.PowerShell.cs (75%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/OperationDisplay.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/OperationDisplay.cs (88%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/OperationDisplay.json.cs (91%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/OperationListResult.PowerShell.cs (79%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/OperationListResult.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/OperationListResult.cs (71%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/OperationListResult.json.cs (89%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/PrivateEndpoint.PowerShell.cs (86%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/PrivateEndpoint.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/PrivateEndpoint.cs (83%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/PrivateEndpoint.json.cs (94%)
create mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Models/PrivateEndpointConnection.PowerShell.cs
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateEndpointConnection.TypeConverter.cs (96%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateEndpointConnection.cs (52%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateEndpointConnection.json.cs (93%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateEndpointConnectionListResult.PowerShell.cs (74%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateEndpointConnectionListResult.TypeConverter.cs (96%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateEndpointConnectionListResult.cs (71%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateEndpointConnectionListResult.json.cs (88%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateEndpointConnectionProperties.PowerShell.cs (56%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateEndpointConnectionProperties.TypeConverter.cs (96%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateEndpointConnectionProperties.cs (59%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateEndpointConnectionProperties.json.cs (89%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateLinkResource.PowerShell.cs (53%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateLinkResource.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateLinkResource.cs (51%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateLinkResource.json.cs (93%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateLinkResourceListResult.PowerShell.cs (75%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateLinkResourceListResult.TypeConverter.cs (96%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateLinkResourceListResult.cs (71%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateLinkResourceListResult.json.cs (88%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateLinkResourceProperties.PowerShell.cs (70%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateLinkResourceProperties.TypeConverter.cs (96%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateLinkResourceProperties.cs (64%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/PrivateLinkResourceProperties.json.cs (87%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/PrivateLinkServiceConnectionState.PowerShell.cs (74%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/PrivateLinkServiceConnectionState.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/PrivateLinkServiceConnectionState.cs (82%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/PrivateLinkServiceConnectionState.json.cs (94%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/Resource.PowerShell.cs (60%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/Resource.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/Resource.cs (62%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/Resource.json.cs (90%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ResourceSku.PowerShell.cs (85%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ResourceSku.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ResourceSku.cs (85%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api20220801 => }/ResourceSku.json.cs (94%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/SystemData.PowerShell.cs (66%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/SystemData.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/SystemData.cs (78%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/SystemData.json.cs (93%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/UserAssignedIdentities.PowerShell.cs (90%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/UserAssignedIdentities.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/UserAssignedIdentities.cs (88%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/UserAssignedIdentities.dictionary.cs (68%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/UserAssignedIdentities.json.cs (92%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/UserAssignedIdentity.PowerShell.cs (81%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/UserAssignedIdentity.TypeConverter.cs (97%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/UserAssignedIdentity.cs (83%)
rename generated/Dashboard/Dashboard.Autorest/generated/api/Models/{Api30 => }/UserAssignedIdentity.json.cs (93%)
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ActionType.Completer.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ActionType.TypeConverter.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ActionType.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ApiKey.Completer.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ApiKey.TypeConverter.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ApiKey.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/AutoGeneratedDomainNameLabelScope.Completer.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/AutoGeneratedDomainNameLabelScope.TypeConverter.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/AutoGeneratedDomainNameLabelScope.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/CreatedByType.Completer.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/CreatedByType.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/DeterministicOutboundIP.Completer.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/DeterministicOutboundIP.TypeConverter.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/DeterministicOutboundIP.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ManagedServiceIdentityType.Completer.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ManagedServiceIdentityType.TypeConverter.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ManagedServiceIdentityType.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/Origin.Completer.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/Origin.TypeConverter.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/Origin.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.Completer.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.TypeConverter.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/PrivateEndpointServiceConnectionStatus.Completer.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/PrivateEndpointServiceConnectionStatus.TypeConverter.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/PrivateEndpointServiceConnectionStatus.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ProvisioningState.Completer.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ProvisioningState.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/PublicNetworkAccess.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ZoneRedundancy.Completer.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ZoneRedundancy.TypeConverter.cs
delete mode 100644 generated/Dashboard/Dashboard.Autorest/generated/api/Support/ZoneRedundancy.cs
create mode 100644 generated/Dashboard/Dashboard.Autorest/generated/cmdlets/NewAzGrafana_CreateViaJsonFilePath.cs
create mode 100644 generated/Dashboard/Dashboard.Autorest/generated/cmdlets/NewAzGrafana_CreateViaJsonString.cs
create mode 100644 generated/Dashboard/Dashboard.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs
create mode 100644 generated/Dashboard/Dashboard.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs
create mode 100644 generated/Dashboard/Dashboard.Autorest/generated/runtime/Context.cs
create mode 100644 generated/Dashboard/Dashboard.Autorest/generated/runtime/InputHandler.cs
create mode 100644 generated/Dashboard/Dashboard.Autorest/resources/README.md
diff --git a/generated/Dashboard/Dashboard.Autorest/Az.Dashboard.csproj b/generated/Dashboard/Dashboard.Autorest/Az.Dashboard.csproj
index d6be735ea7ae..360c7760c00a 100644
--- a/generated/Dashboard/Dashboard.Autorest/Az.Dashboard.csproj
+++ b/generated/Dashboard/Dashboard.Autorest/Az.Dashboard.csproj
@@ -2,9 +2,9 @@
Dashboard
Dashboard
+ Dashboard.Autorest
-
diff --git a/generated/Dashboard/Dashboard.Autorest/Az.Dashboard.format.ps1xml b/generated/Dashboard/Dashboard.Autorest/Az.Dashboard.format.ps1xml
index 826c7a9d623b..85a4ca0b2411 100644
--- a/generated/Dashboard/Dashboard.Autorest/Az.Dashboard.format.ps1xml
+++ b/generated/Dashboard/Dashboard.Autorest/Az.Dashboard.format.ps1xml
@@ -1,10 +1,32 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.AzureMonitorWorkspaceIntegration
+
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.AzureMonitorWorkspaceIntegration#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ AzureMonitorWorkspaceResourceId
+
+
+
+
+
+
Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.DashboardIdentity
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.DashboardIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.DashboardIdentity#Multiple
@@ -48,9 +70,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ErrorDetail
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorDetail
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ErrorDetail
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorDetail#Multiple
@@ -82,27 +104,33 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ManagedServiceIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafana
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ManagedServiceIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafana#Multiple
-
+
-
+
+
+
+
- PrincipalId
+ Location
- TenantId
+ Name
+
+
+ ResourceGroupName
@@ -110,39 +138,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaListResponse
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaListResponse#Multiple
-
-
-
-
-
-
-
-
-
-
+
- ActionType
-
-
- IsDataAction
-
-
- Name
-
-
- Origin
+ NextLink
@@ -150,61 +160,63 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaProperties
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaProperties#Multiple
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
- Description
+ ApiKey
- Operation
+ AutoGeneratedDomainNameLabelScope
- Provider
+ DeterministicOutboundIP
- Resource
+ Endpoint
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.OperationListResult
-
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.OperationListResult
-
-
-
-
-
-
-
-
-
-
- NextLink
+ GrafanaVersion
+
+
+ ProvisioningState
+
+
+ PublicNetworkAccess
+
+
+ ZoneRedundancy
@@ -212,33 +224,39 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.PrivateLinkServiceConnectionState
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaPropertiesUpdateParameters
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.PrivateLinkServiceConnectionState
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaPropertiesUpdateParameters#Multiple
-
+
-
+
-
+
+
+
+
- ActionsRequired
+ ApiKey
- Description
+ DeterministicOutboundIP
- Status
+ PublicNetworkAccess
+
+
+ ZoneRedundancy
@@ -246,21 +264,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaTags
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaTags#Multiple
-
+
- Name
+ Item
@@ -268,51 +286,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaUpdateParametersTags
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaUpdateParametersTags#Multiple
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- CreatedAt
-
-
- CreatedBy
-
-
- CreatedByType
-
-
- LastModifiedAt
-
-
- LastModifiedBy
-
-
- LastModifiedByType
+ Item
@@ -320,27 +308,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.UserAssignedIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedServiceIdentity
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.UserAssignedIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedServiceIdentity#Multiple
-
+
-
+
- ClientId
+ PrincipalId
- PrincipalId
+ TenantId
@@ -348,21 +336,39 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.AzureMonitorWorkspaceIntegration
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Operation
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.AzureMonitorWorkspaceIntegration
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Operation#Multiple
-
+
+
+
+
+
+
+
+
+
+
- AzureMonitorWorkspaceResourceId
+ ActionType
+
+
+ IsDataAction
+
+
+ Name
+
+
+ Origin
@@ -370,33 +376,39 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafana
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.OperationDisplay
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafana
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.OperationDisplay#Multiple
-
+
-
+
-
+
+
+
+
- Location
+ Description
- Name
+ Operation
- ResourceGroupName
+ Provider
+
+
+ Resource
@@ -404,9 +416,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafanaListResponse
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.OperationListResult
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafanaListResponse
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.OperationListResult#Multiple
@@ -426,109 +438,63 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafanaProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateEndpointConnection
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafanaProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateEndpointConnection#Multiple
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- ApiKey
-
-
- AutoGeneratedDomainNameLabelScope
-
-
- DeterministicOutboundIP
-
-
- Endpoint
-
-
- GrafanaVersion
+ Name
- OutboundIP
+ SystemDataCreatedAt
- ProvisioningState
+ SystemDataCreatedBy
- PublicNetworkAccess
+ SystemDataCreatedByType
- ZoneRedundancy
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafanaPropertiesUpdateParameters
-
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafanaPropertiesUpdateParameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ApiKey
+ SystemDataLastModifiedAt
- DeterministicOutboundIP
+ SystemDataLastModifiedBy
- PublicNetworkAccess
+ SystemDataLastModifiedByType
- ZoneRedundancy
+ ResourceGroupName
@@ -536,21 +502,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafanaTags
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateEndpointConnectionListResult
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafanaTags
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateEndpointConnectionListResult#Multiple
-
+
- Item
+ NextLink
@@ -558,21 +524,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafanaUpdateParametersTags
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateEndpointConnectionProperties
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafanaUpdateParametersTags
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateEndpointConnectionProperties#Multiple
-
+
- Item
+ ProvisioningState
@@ -580,9 +546,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateEndpointConnection
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateLinkResource
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateEndpointConnection
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateLinkResource#Multiple
@@ -644,9 +610,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateEndpointConnectionListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateLinkResourceListResult
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateEndpointConnectionListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateLinkResourceListResult#Multiple
@@ -666,9 +632,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateEndpointConnectionProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateLinkResourceProperties
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateEndpointConnectionProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateLinkResourceProperties#Multiple
@@ -694,63 +660,55 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateLinkResource
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateLinkServiceConnectionState
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateLinkResource
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateLinkServiceConnectionState#Multiple
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
- Name
-
-
- SystemDataCreatedAt
-
-
- SystemDataCreatedBy
-
-
- SystemDataCreatedByType
-
-
- SystemDataLastModifiedAt
+ ActionsRequired
- SystemDataLastModifiedBy
+ Description
- SystemDataLastModifiedByType
+ Status
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Resource
+
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Resource#Multiple
+
+
+
+
+
+
+
+
+
+
- ResourceGroupName
+ Name
@@ -758,21 +716,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateLinkResourceListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ResourceSku
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateLinkResourceListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ResourceSku#Multiple
-
+
- NextLink
+ Name
@@ -780,39 +738,51 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateLinkResourceProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.SystemData
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateLinkResourceProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.SystemData#Multiple
-
+
-
+
-
+
+
+
+
-
+
+
+
+
- GroupId
+ CreatedAt
- ProvisioningState
+ CreatedBy
+
+
+ CreatedByType
+
+
+ LastModifiedAt
- RequiredMember
+ LastModifiedBy
- RequiredZoneName
+ LastModifiedByType
@@ -820,21 +790,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ResourceSku
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.UserAssignedIdentity
- Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ResourceSku
+ Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.UserAssignedIdentity#Multiple
-
+
+
+
+
- Name
+ ClientId
+
+
+ PrincipalId
diff --git a/generated/Dashboard/Dashboard.Autorest/Az.Dashboard.psd1 b/generated/Dashboard/Dashboard.Autorest/Az.Dashboard.psd1
index 728987e9e984..2225f24fb777 100644
--- a/generated/Dashboard/Dashboard.Autorest/Az.Dashboard.psd1
+++ b/generated/Dashboard/Dashboard.Autorest/Az.Dashboard.psd1
@@ -11,8 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.Dashboard.private.dll'
FormatsToProcess = './Az.Dashboard.format.ps1xml'
- FunctionsToExport = 'Get-AzGrafana', 'New-AzGrafana', 'New-AzGrafanaMonitorWorkspaceIntegrationObject', 'Remove-AzGrafana', 'Update-AzGrafana', '*'
- AliasesToExport = '*'
+ FunctionsToExport = 'Get-AzGrafana', 'New-AzGrafana', 'New-AzGrafanaMonitorWorkspaceIntegrationObject', 'Remove-AzGrafana', 'Update-AzGrafana'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Dashboard'
diff --git a/generated/Dashboard/Dashboard.Autorest/Properties/AssemblyInfo.cs b/generated/Dashboard/Dashboard.Autorest/Properties/AssemblyInfo.cs
index 55e92af30f35..8c6e9745886c 100644
--- a/generated/Dashboard/Dashboard.Autorest/Properties/AssemblyInfo.cs
+++ b/generated/Dashboard/Dashboard.Autorest/Properties/AssemblyInfo.cs
@@ -1,28 +1,27 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
+// 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,
+// 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.
using System;
using System.Reflection;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-[assembly: AssemblyTitle("Microsoft Azure Powershell - Dashboard")]
-[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
-[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
-[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
+[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
+[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
+[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
+[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Dashboard")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.3")]
+[assembly: System.Reflection.AssemblyVersionAttribute("0.1.3")]
+[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
+[assembly: System.CLSCompliantAttribute(false)]
-[assembly: ComVisible(false)]
-[assembly: CLSCompliant(false)]
-[assembly: Guid("72e8fcb1-db16-49af-b9a0-fc2f51188d21")]
-[assembly: AssemblyVersion("0.1.3")]
-[assembly: AssemblyFileVersion("0.1.3")]
diff --git a/generated/Dashboard/Dashboard.Autorest/check-dependencies.ps1 b/generated/Dashboard/Dashboard.Autorest/check-dependencies.ps1
index c29591c7bfe1..90ca9867ae40 100644
--- a/generated/Dashboard/Dashboard.Autorest/check-dependencies.ps1
+++ b/generated/Dashboard/Dashboard.Autorest/check-dependencies.ps1
@@ -12,13 +12,13 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
-param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
$ErrorActionPreference = 'Stop'
-if(-not $Isolated) {
+if(-not $NotIsolated) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
- & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
return
}
diff --git a/generated/Dashboard/Dashboard.Autorest/exports/Get-AzGrafana.ps1 b/generated/Dashboard/Dashboard.Autorest/exports/Get-AzGrafana.ps1
index 35a7624479a1..03310746dfc3 100644
--- a/generated/Dashboard/Dashboard.Autorest/exports/Get-AzGrafana.ps1
+++ b/generated/Dashboard/Dashboard.Autorest/exports/Get-AzGrafana.ps1
@@ -29,7 +29,7 @@ Get-AzGrafana -ResourceGroupName azpstest-gp -GrafanaName azpstest-grafana
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IDashboardIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana
+Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -46,7 +46,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dashboard/get-azgrafana
#>
function Get-AzGrafana {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -77,7 +77,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IDashboardIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -136,6 +135,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -160,9 +168,7 @@ begin {
List = 'Az.Dashboard.private\Get-AzGrafana_List';
List1 = 'Az.Dashboard.private\Get-AzGrafana_List1';
}
- if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -176,6 +182,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Dashboard/Dashboard.Autorest/exports/New-AzGrafana.ps1 b/generated/Dashboard/Dashboard.Autorest/exports/New-AzGrafana.ps1
index 7ba93fd9a3d1..2705a66b2f72 100644
--- a/generated/Dashboard/Dashboard.Autorest/exports/New-AzGrafana.ps1
+++ b/generated/Dashboard/Dashboard.Autorest/exports/New-AzGrafana.ps1
@@ -22,10 +22,10 @@ This API is idempotent, so user can either create a new grafana or update an exi
Create or update a workspace for Grafana resource.
This API is idempotent, so user can either create a new grafana or update an existing grafana.
.Example
-New-AzGrafana -Name azpstest-grafana -ResourceGroupName azpstest-gp -ApiKey Enabled -AutoGeneratedDomainNameLabelScope 'TenantReuse' -DeterministicOutboundIP 'Enabled' -IdentityType 'SystemAssigned' -Location eastus -PublicNetworkAccess 'Enabled' -SkuName Standard -ZoneRedundancy 'Enabled' -Tag @{"Environment"="Dev"}
+New-AzGrafana -Name azpstest-grafana -ResourceGroupName azpstest-gp -ApiKey Enabled -AutoGeneratedDomainNameLabelScope 'TenantReuse' -DeterministicOutboundIP 'Enabled' -EnableSystemAssignedIdentity:$true -Location eastus -PublicNetworkAccess 'Enabled' -SkuName Standard -ZoneRedundancy 'Enabled' -Tag @{"Environment"="Dev"}
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana
+Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -37,7 +37,7 @@ MONITORWORKSPACEINTEGRATION : The MonitorWo
https://learn.microsoft.com/powershell/module/az.dashboard/new-azgrafana
#>
function New-AzGrafana {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -61,90 +61,100 @@ param(
# The ID of the target subscription.
${SubscriptionId},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ApiKey])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Disabled", "Enabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ApiKey]
+ [System.String]
# The api key setting of the Grafana instance.
${ApiKey},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.AutoGeneratedDomainNameLabelScope])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("TenantReuse")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.AutoGeneratedDomainNameLabelScope]
+ [System.String]
# Scope for dns deterministic name hash calculation.
${AutoGeneratedDomainNameLabelScope},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.DeterministicOutboundIP])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Disabled", "Enabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.DeterministicOutboundIP]
+ [System.String]
# Whether a Grafana instance uses deterministic outbound IPs.
${DeterministicOutboundIP},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ManagedServiceIdentityType])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ManagedServiceIdentityType]
- # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
- ${IdentityType},
+ [System.Management.Automation.SwitchParameter]
+ # Determines whether to enable a system-assigned identity for the resource.
+ ${EnableSystemAssignedIdentity},
- [Parameter(Mandatory)]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
[System.String]
# The geo-location where the grafana resource lives
${Location},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.PublicNetworkAccess])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Enabled", "Disabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.PublicNetworkAccess]
+ [System.String]
# Indicate the state for enable or disable traffic over the public interface.
${PublicNetworkAccess},
- [Parameter(Mandatory)]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
[System.String]
# The Sku of the grafana resource.
${SkuName},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ZoneRedundancy])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Disabled", "Enabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ZoneRedundancy]
+ [System.String]
# The zone redundancy setting of the Grafana instance.
${ZoneRedundancy},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.IUserAssignedIdentities]))]
- [System.Collections.Hashtable]
- # The set of user assigned identities associated with the resource.
- # The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
- # The dictionary values can be empty objects ({}) in requests.
- ${IdentityUserAssignedIdentity},
+ [System.String[]]
+ # The array of user assigned identities associated with the resource.
+ # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
+ ${UserAssignedIdentity},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IAzureMonitorWorkspaceIntegration[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IAzureMonitorWorkspaceIntegration[]]
# The MonitorWorkspaceIntegration of Azure Managed Grafana.
- # To construct, see NOTES section for MONITORWORKSPACEINTEGRATION properties and create a hash table.
${MonitorWorkspaceIntegration},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafanaTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafanaTags]))]
[System.Collections.Hashtable]
# The tags for grafana resource.
${Tag},
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Azure')]
[System.Management.Automation.PSObject]
- # The credentials, account, tenant, and subscription used for communication with Azure.
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
[Parameter()]
@@ -206,6 +216,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -226,10 +245,10 @@ begin {
$mapping = @{
CreateExpanded = 'Az.Dashboard.custom\New-AzGrafana';
+ CreateViaJsonFilePath = 'Az.Dashboard.custom\New-AzGrafana';
+ CreateViaJsonString = 'Az.Dashboard.custom\New-AzGrafana';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -243,6 +262,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Dashboard/Dashboard.Autorest/exports/New-AzGrafanaMonitorWorkspaceIntegrationObject.ps1 b/generated/Dashboard/Dashboard.Autorest/exports/New-AzGrafanaMonitorWorkspaceIntegrationObject.ps1
index 3d26bceec68d..67980ef52b51 100644
--- a/generated/Dashboard/Dashboard.Autorest/exports/New-AzGrafanaMonitorWorkspaceIntegrationObject.ps1
+++ b/generated/Dashboard/Dashboard.Autorest/exports/New-AzGrafanaMonitorWorkspaceIntegrationObject.ps1
@@ -23,12 +23,12 @@ Create an in-memory object for AzureMonitorWorkspaceIntegration.
New-AzGrafanaMonitorWorkspaceIntegrationObject -AzureMonitorWorkspaceResourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.AzureMonitorWorkspaceIntegration
+Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.AzureMonitorWorkspaceIntegration
.Link
-https://learn.microsoft.com/powershell/module/az.dashboard/new-azgrafanamonitorworkspaceintegrationobject
+https://learn.microsoft.com/powershell/module/Az.Dashboard/new-azgrafanamonitorworkspaceintegrationobject
#>
function New-AzGrafanaMonitorWorkspaceIntegrationObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.AzureMonitorWorkspaceIntegration])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.AzureMonitorWorkspaceIntegration])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter()]
@@ -45,6 +45,9 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -73,6 +76,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Dashboard/Dashboard.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/Dashboard/Dashboard.Autorest/exports/ProxyCmdletDefinitions.ps1
index 187d6844380f..71db21a77a9e 100644
--- a/generated/Dashboard/Dashboard.Autorest/exports/ProxyCmdletDefinitions.ps1
+++ b/generated/Dashboard/Dashboard.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -29,7 +29,7 @@ Get-AzGrafana -ResourceGroupName azpstest-gp -GrafanaName azpstest-grafana
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IDashboardIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana
+Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -46,7 +46,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dashboard/get-azgrafana
#>
function Get-AzGrafana {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -77,7 +77,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IDashboardIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -136,6 +135,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -160,9 +168,7 @@ begin {
List = 'Az.Dashboard.private\Get-AzGrafana_List';
List1 = 'Az.Dashboard.private\Get-AzGrafana_List1';
}
- if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -176,6 +182,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -277,7 +286,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IDashboardIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -354,6 +362,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -376,9 +393,7 @@ begin {
Delete = 'Az.Dashboard.private\Remove-AzGrafana_Delete';
DeleteViaIdentity = 'Az.Dashboard.private\Remove-AzGrafana_DeleteViaIdentity';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -392,6 +407,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -437,18 +455,20 @@ end {
<#
.Synopsis
-Update a workspace for Grafana resource.
+update a workspace for Grafana resource.
+This API is idempotent, so user can either update a new grafana or update an existing grafana.
.Description
-Update a workspace for Grafana resource.
+update a workspace for Grafana resource.
+This API is idempotent, so user can either update a new grafana or update an existing grafana.
.Example
-Update-AzGrafana -GrafanaName azpstest-grafana -ResourceGroupName azpstest-gp -ApiKey Enabled -DeterministicOutboundIP 'Enabled' -IdentityType 'SystemAssigned' -PublicNetworkAccess 'Enabled' -ZoneRedundancy 'Enabled' -Tag @{"Environment"="Dev"}
+Update-AzGrafana -GrafanaName azpstest-grafana -ResourceGroupName azpstest-gp -ApiKey Enabled -DeterministicOutboundIP 'Enabled' -EnableSystemAssignedIdentity $true -PublicNetworkAccess 'Enabled' -ZoneRedundancy 'Enabled' -Tag @{"Environment"="Dev"}
.Example
-Get-AzGrafana -ResourceGroupName azpstest-gp -GrafanaName azpstest-grafana | Update-AzGrafana -ApiKey Enabled -DeterministicOutboundIP 'Enabled' -IdentityType 'SystemAssigned' -PublicNetworkAccess 'Enabled' -ZoneRedundancy 'Enabled' -Tag @{"Environment"="Dev"}
+Get-AzGrafana -ResourceGroupName azpstest-gp -GrafanaName azpstest-grafana | Update-AzGrafana -ApiKey Enabled -DeterministicOutboundIP 'Enabled' -EnableSystemAssignedIdentity $true -PublicNetworkAccess 'Enabled' -ZoneRedundancy 'Enabled' -Tag @{"Environment"="Dev"}
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IDashboardIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana
+Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -468,7 +488,7 @@ MONITORWORKSPACEINTEGRATION : The MonitorWo
https://learn.microsoft.com/powershell/module/az.dashboard/update-azgrafana
#>
function Update-AzGrafana {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
@@ -496,65 +516,74 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IDashboardIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ApiKey])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Disabled", "Enabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ApiKey]
+ [System.String]
# The api key setting of the Grafana instance.
${ApiKey},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.DeterministicOutboundIP])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("TenantReuse")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.DeterministicOutboundIP]
- # Whether a Grafana instance uses deterministic outbound IPs.
- ${DeterministicOutboundIP},
+ [System.String]
+ # Scope for dns deterministic name hash calculation.
+ ${AutoGeneratedDomainNameLabelScope},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ManagedServiceIdentityType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Disabled", "Enabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ManagedServiceIdentityType]
- # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
- ${IdentityType},
+ [System.String]
+ # Whether a Grafana instance uses deterministic outbound IPs.
+ ${DeterministicOutboundIP},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.IUserAssignedIdentities]))]
- [System.Collections.Hashtable]
- # The set of user assigned identities associated with the resource.
- # The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
- # The dictionary values can be empty objects ({}) in requests.
- ${IdentityUserAssignedIdentity},
+ [System.Nullable[System.Boolean]]
+ # Determines whether to enable a system-assigned identity for the resource.
+ ${EnableSystemAssignedIdentity},
[Parameter()]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IAzureMonitorWorkspaceIntegration[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IAzureMonitorWorkspaceIntegration[]]
# The MonitorWorkspaceIntegration of Azure Managed Grafana.
- # To construct, see NOTES section for MONITORWORKSPACEINTEGRATION properties and create a hash table.
${MonitorWorkspaceIntegration},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.PublicNetworkAccess])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Enabled", "Disabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.PublicNetworkAccess]
+ [System.String]
# Indicate the state for enable or disable traffic over the public interface.
${PublicNetworkAccess},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafanaUpdateParametersTags]))]
+ [System.String]
+ # The Sku of the grafana resource.
+ ${SkuName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafanaTags]))]
[System.Collections.Hashtable]
- # The new tags of the grafana resource.
+ # The tags for grafana resource.
${Tag},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ZoneRedundancy])]
+ [AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ZoneRedundancy]
+ [System.String[]]
+ # The array of user assigned identities associated with the resource.
+ # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
+ ${UserAssignedIdentity},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Disabled", "Enabled")]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
+ [System.String]
# The zone redundancy setting of the Grafana instance.
${ZoneRedundancy},
@@ -567,6 +596,12 @@ param(
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
@@ -587,6 +622,12 @@ param(
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
${HttpPipelinePrepend},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Runtime')]
[System.Uri]
@@ -614,6 +655,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -636,9 +686,7 @@ begin {
UpdateExpanded = 'Az.Dashboard.private\Update-AzGrafana_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.Dashboard.private\Update-AzGrafana_UpdateViaIdentityExpanded';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -652,6 +700,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -703,10 +754,10 @@ This API is idempotent, so user can either create a new grafana or update an exi
Create or update a workspace for Grafana resource.
This API is idempotent, so user can either create a new grafana or update an existing grafana.
.Example
-New-AzGrafana -Name azpstest-grafana -ResourceGroupName azpstest-gp -ApiKey Enabled -AutoGeneratedDomainNameLabelScope 'TenantReuse' -DeterministicOutboundIP 'Enabled' -IdentityType 'SystemAssigned' -Location eastus -PublicNetworkAccess 'Enabled' -SkuName Standard -ZoneRedundancy 'Enabled' -Tag @{"Environment"="Dev"}
+New-AzGrafana -Name azpstest-grafana -ResourceGroupName azpstest-gp -ApiKey Enabled -AutoGeneratedDomainNameLabelScope 'TenantReuse' -DeterministicOutboundIP 'Enabled' -EnableSystemAssignedIdentity:$true -Location eastus -PublicNetworkAccess 'Enabled' -SkuName Standard -ZoneRedundancy 'Enabled' -Tag @{"Environment"="Dev"}
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana
+Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -718,7 +769,7 @@ MONITORWORKSPACEINTEGRATION : The MonitorWo
https://learn.microsoft.com/powershell/module/az.dashboard/new-azgrafana
#>
function New-AzGrafana {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -742,90 +793,100 @@ param(
# The ID of the target subscription.
${SubscriptionId},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ApiKey])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Disabled", "Enabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ApiKey]
+ [System.String]
# The api key setting of the Grafana instance.
${ApiKey},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.AutoGeneratedDomainNameLabelScope])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("TenantReuse")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.AutoGeneratedDomainNameLabelScope]
+ [System.String]
# Scope for dns deterministic name hash calculation.
${AutoGeneratedDomainNameLabelScope},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.DeterministicOutboundIP])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Disabled", "Enabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.DeterministicOutboundIP]
+ [System.String]
# Whether a Grafana instance uses deterministic outbound IPs.
${DeterministicOutboundIP},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ManagedServiceIdentityType])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ManagedServiceIdentityType]
- # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
- ${IdentityType},
+ [System.Management.Automation.SwitchParameter]
+ # Determines whether to enable a system-assigned identity for the resource.
+ ${EnableSystemAssignedIdentity},
- [Parameter(Mandatory)]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
[System.String]
# The geo-location where the grafana resource lives
${Location},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.PublicNetworkAccess])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Enabled", "Disabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.PublicNetworkAccess]
+ [System.String]
# Indicate the state for enable or disable traffic over the public interface.
${PublicNetworkAccess},
- [Parameter(Mandatory)]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
[System.String]
# The Sku of the grafana resource.
${SkuName},
- [Parameter(Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ZoneRedundancy])]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Disabled", "Enabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ZoneRedundancy]
+ [System.String]
# The zone redundancy setting of the Grafana instance.
${ZoneRedundancy},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.IUserAssignedIdentities]))]
- [System.Collections.Hashtable]
- # The set of user assigned identities associated with the resource.
- # The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
- # The dictionary values can be empty objects ({}) in requests.
- ${IdentityUserAssignedIdentity},
+ [System.String[]]
+ # The array of user assigned identities associated with the resource.
+ # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
+ ${UserAssignedIdentity},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IAzureMonitorWorkspaceIntegration[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IAzureMonitorWorkspaceIntegration[]]
# The MonitorWorkspaceIntegration of Azure Managed Grafana.
- # To construct, see NOTES section for MONITORWORKSPACEINTEGRATION properties and create a hash table.
${MonitorWorkspaceIntegration},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafanaTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafanaTags]))]
[System.Collections.Hashtable]
# The tags for grafana resource.
${Tag},
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Azure')]
[System.Management.Automation.PSObject]
- # The credentials, account, tenant, and subscription used for communication with Azure.
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
[Parameter()]
@@ -887,6 +948,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -907,10 +977,10 @@ begin {
$mapping = @{
CreateExpanded = 'Az.Dashboard.custom\New-AzGrafana';
+ CreateViaJsonFilePath = 'Az.Dashboard.custom\New-AzGrafana';
+ CreateViaJsonString = 'Az.Dashboard.custom\New-AzGrafana';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -924,6 +994,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -976,12 +1049,12 @@ Create an in-memory object for AzureMonitorWorkspaceIntegration.
New-AzGrafanaMonitorWorkspaceIntegrationObject -AzureMonitorWorkspaceResourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.AzureMonitorWorkspaceIntegration
+Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.AzureMonitorWorkspaceIntegration
.Link
-https://learn.microsoft.com/powershell/module/az.dashboard/new-azgrafanamonitorworkspaceintegrationobject
+https://learn.microsoft.com/powershell/module/Az.Dashboard/new-azgrafanamonitorworkspaceintegrationobject
#>
function New-AzGrafanaMonitorWorkspaceIntegrationObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.AzureMonitorWorkspaceIntegration])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.AzureMonitorWorkspaceIntegration])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter()]
@@ -998,6 +1071,9 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1026,6 +1102,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Dashboard/Dashboard.Autorest/exports/Remove-AzGrafana.ps1 b/generated/Dashboard/Dashboard.Autorest/exports/Remove-AzGrafana.ps1
index 7598775656e9..6f037df1675d 100644
--- a/generated/Dashboard/Dashboard.Autorest/exports/Remove-AzGrafana.ps1
+++ b/generated/Dashboard/Dashboard.Autorest/exports/Remove-AzGrafana.ps1
@@ -72,7 +72,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IDashboardIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
@@ -149,6 +148,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -171,9 +179,7 @@ begin {
Delete = 'Az.Dashboard.private\Remove-AzGrafana_Delete';
DeleteViaIdentity = 'Az.Dashboard.private\Remove-AzGrafana_DeleteViaIdentity';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -187,6 +193,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Dashboard/Dashboard.Autorest/exports/Update-AzGrafana.ps1 b/generated/Dashboard/Dashboard.Autorest/exports/Update-AzGrafana.ps1
index 2e29b4b1bf6d..148d9438a907 100644
--- a/generated/Dashboard/Dashboard.Autorest/exports/Update-AzGrafana.ps1
+++ b/generated/Dashboard/Dashboard.Autorest/exports/Update-AzGrafana.ps1
@@ -16,18 +16,20 @@
<#
.Synopsis
-Update a workspace for Grafana resource.
+update a workspace for Grafana resource.
+This API is idempotent, so user can either update a new grafana or update an existing grafana.
.Description
-Update a workspace for Grafana resource.
+update a workspace for Grafana resource.
+This API is idempotent, so user can either update a new grafana or update an existing grafana.
.Example
-Update-AzGrafana -GrafanaName azpstest-grafana -ResourceGroupName azpstest-gp -ApiKey Enabled -DeterministicOutboundIP 'Enabled' -IdentityType 'SystemAssigned' -PublicNetworkAccess 'Enabled' -ZoneRedundancy 'Enabled' -Tag @{"Environment"="Dev"}
+Update-AzGrafana -GrafanaName azpstest-grafana -ResourceGroupName azpstest-gp -ApiKey Enabled -DeterministicOutboundIP 'Enabled' -EnableSystemAssignedIdentity $true -PublicNetworkAccess 'Enabled' -ZoneRedundancy 'Enabled' -Tag @{"Environment"="Dev"}
.Example
-Get-AzGrafana -ResourceGroupName azpstest-gp -GrafanaName azpstest-grafana | Update-AzGrafana -ApiKey Enabled -DeterministicOutboundIP 'Enabled' -IdentityType 'SystemAssigned' -PublicNetworkAccess 'Enabled' -ZoneRedundancy 'Enabled' -Tag @{"Environment"="Dev"}
+Get-AzGrafana -ResourceGroupName azpstest-gp -GrafanaName azpstest-grafana | Update-AzGrafana -ApiKey Enabled -DeterministicOutboundIP 'Enabled' -EnableSystemAssignedIdentity $true -PublicNetworkAccess 'Enabled' -ZoneRedundancy 'Enabled' -Tag @{"Environment"="Dev"}
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IDashboardIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana
+Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -47,7 +49,7 @@ MONITORWORKSPACEINTEGRATION : The MonitorWo
https://learn.microsoft.com/powershell/module/az.dashboard/update-azgrafana
#>
function Update-AzGrafana {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
@@ -75,65 +77,74 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IDashboardIdentity]
# Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ApiKey])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Disabled", "Enabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ApiKey]
+ [System.String]
# The api key setting of the Grafana instance.
${ApiKey},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.DeterministicOutboundIP])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("TenantReuse")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.DeterministicOutboundIP]
- # Whether a Grafana instance uses deterministic outbound IPs.
- ${DeterministicOutboundIP},
+ [System.String]
+ # Scope for dns deterministic name hash calculation.
+ ${AutoGeneratedDomainNameLabelScope},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ManagedServiceIdentityType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Disabled", "Enabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ManagedServiceIdentityType]
- # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
- ${IdentityType},
+ [System.String]
+ # Whether a Grafana instance uses deterministic outbound IPs.
+ ${DeterministicOutboundIP},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.IUserAssignedIdentities]))]
- [System.Collections.Hashtable]
- # The set of user assigned identities associated with the resource.
- # The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
- # The dictionary values can be empty objects ({}) in requests.
- ${IdentityUserAssignedIdentity},
+ [System.Nullable[System.Boolean]]
+ # Determines whether to enable a system-assigned identity for the resource.
+ ${EnableSystemAssignedIdentity},
[Parameter()]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IAzureMonitorWorkspaceIntegration[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IAzureMonitorWorkspaceIntegration[]]
# The MonitorWorkspaceIntegration of Azure Managed Grafana.
- # To construct, see NOTES section for MONITORWORKSPACEINTEGRATION properties and create a hash table.
${MonitorWorkspaceIntegration},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.PublicNetworkAccess])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Enabled", "Disabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.PublicNetworkAccess]
+ [System.String]
# Indicate the state for enable or disable traffic over the public interface.
${PublicNetworkAccess},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafanaUpdateParametersTags]))]
+ [System.String]
+ # The Sku of the grafana resource.
+ ${SkuName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafanaTags]))]
[System.Collections.Hashtable]
- # The new tags of the grafana resource.
+ # The tags for grafana resource.
${Tag},
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ZoneRedundancy])]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
+ [System.String[]]
+ # The array of user assigned identities associated with the resource.
+ # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
+ ${UserAssignedIdentity},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.PSArgumentCompleterAttribute("Disabled", "Enabled")]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Support.ZoneRedundancy]
+ [System.String]
# The zone redundancy setting of the Grafana instance.
${ZoneRedundancy},
@@ -146,6 +157,12 @@ param(
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
@@ -166,6 +183,12 @@ param(
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
${HttpPipelinePrepend},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Category('Runtime')]
[System.Uri]
@@ -193,6 +216,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -215,9 +247,7 @@ begin {
UpdateExpanded = 'Az.Dashboard.private\Update-AzGrafana_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.Dashboard.private\Update-AzGrafana_UpdateViaIdentityExpanded';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -231,6 +261,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Dashboard/Dashboard.Autorest/generate-info.json b/generated/Dashboard/Dashboard.Autorest/generate-info.json
index 37dac720cf08..d5cd231c1526 100644
--- a/generated/Dashboard/Dashboard.Autorest/generate-info.json
+++ b/generated/Dashboard/Dashboard.Autorest/generate-info.json
@@ -1,3 +1,3 @@
{
- "generate_Id": "8d83caaf-d616-4e76-b97b-a3cf94a5ad0f"
+ "generate_Id": "a86f196a-f87d-4c9d-9e3e-1e25924ae554"
}
diff --git a/generated/Dashboard/Dashboard.Autorest/generated/Module.cs b/generated/Dashboard/Dashboard.Autorest/generated/Module.cs
index 61520869161f..5652a8d540c8 100644
--- a/generated/Dashboard/Dashboard.Autorest/generated/Module.cs
+++ b/generated/Dashboard/Dashboard.Autorest/generated/Module.cs
@@ -28,12 +28,20 @@ public partial class Module
public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler();
+ private static bool _init = false;
+
+ private static readonly global::System.Object _initLock = new global::System.Object();
+
+ private static Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Module _instance;
+
/// the ISendAsync pipeline instance
private Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.HttpPipeline _pipeline;
/// the ISendAsync pipeline instance (when proxy is enabled)
private Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.HttpPipeline _pipelineWithProxy;
+ private static readonly global::System.Object _singletonLock = new global::System.Object();
+
public bool _useProxy = false;
public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy();
@@ -56,11 +64,8 @@ public partial class Module
/// The delegate to get the telemetry info.
public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; }
- /// Backing field for property.
- private static Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Module _instance;
-
/// the singleton of this module class
- public static Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Module());
+ public static Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } }
/// The Name of this module
public string Name => @"Az.Dashboard";
@@ -125,9 +130,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.HttpPipeline CreateP
/// Initialization steps performed after the module is loaded.
public void Init()
{
- OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } );
- OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } );
- CustomInit();
+ if (_init == false)
+ {
+ lock (_initLock) {
+ if (_init == false) {
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } );
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } );
+ CustomInit();
+ _init = true;
+ }
+ }
+ }
}
/// Creates the module instance.
diff --git a/generated/Dashboard/Dashboard.Autorest/generated/api/Dashboard.cs b/generated/Dashboard/Dashboard.Autorest/generated/api/Dashboard.cs
index cdb799768472..efbb4a25a89b 100644
--- a/generated/Dashboard/Dashboard.Autorest/generated/api/Dashboard.cs
+++ b/generated/Dashboard/Dashboard.Autorest/generated/api/Dashboard.cs
@@ -15,8 +15,8 @@ public partial class Dashboard
{
///
- /// Create or update a workspace for Grafana resource. This API is idempotent, so user can either create a new grafana or
- /// update an existing grafana.
+ /// update a workspace for Grafana resource. This API is idempotent, so user can either update a new grafana or update an
+ /// existing grafana.
///
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
@@ -27,10 +27,11 @@ public partial class Dashboard
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task GrafanaCreate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task GrafanaCreate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -57,17 +58,17 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.GrafanaCreate_Call(request,onOk,onDefault,eventListener,sender);
+ await this.GrafanaCreate_Call (request, onOk,onDefault,eventListener,sender);
}
}
///
- /// Create or update a workspace for Grafana resource. This API is idempotent, so user can either create a new grafana or
- /// update an existing grafana.
+ /// update a workspace for Grafana resource. This API is idempotent, so user can either update a new grafana or update an
+ /// existing grafana.
///
///
/// The grafana resource type.
@@ -76,10 +77,11 @@ public partial class Dashboard
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task GrafanaCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task GrafanaCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -118,200 +120,140 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.GrafanaCreate_Call(request,onOk,onDefault,eventListener,sender);
+ await this.GrafanaCreate_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
- /// the prepared HttpRequestMessage to send.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ ///
+ /// update a workspace for Grafana resource. This API is idempotent, so user can either update a new grafana or update an
+ /// existing grafana.
+ ///
+ ///
+ /// The grafana resource type.
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task GrafanaCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task GrafanaCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana body, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeUpdate)
{
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- global::System.Net.Http.HttpResponseMessage _response = null;
- try
- {
- var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- // this operation supports x-ms-long-running-operation
- var _originalUri = request.RequestUri.AbsoluteUri;
- // declared final-state-via: azure-async-operation
- var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
- var location = _response.GetFirstHeader(@"Location");
- while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
- {
-
- // get the delay before polling. (default to 30 seconds if not present)
- int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // start the delay timer (we'll await later...)
- var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
-
- // while we wait, let's grab the headers and get ready to poll.
- if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
- asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
- }
- if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
- location = _response.GetFirstHeader(@"Location");
- }
- var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
- request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get);
-
- // and let's look at the current response body and see if we have some information we can give back to the listener
- var content = await _response.Content.ReadAsStringAsync();
- await waiting;
-
- // check for cancellation
- if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // drop the old response
- _response?.Dispose();
-
- // make the polling call
- _response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // verify that Identity format is an exact match for uri
- // if we got back an OK, take a peek inside and see if it's done
- if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
- {
- var error = false;
- try {
- if( Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonObject json)
- {
- var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
- if( state is null )
- {
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
- }
-
- switch( state?.ToString()?.ToLower() )
- {
- case "failed":
- error = true;
- break;
- case "succeeded":
- case "canceled":
- // we're done polling.
- break;
-
- default:
- // need to keep polling!
- _response.StatusCode = global::System.Net.HttpStatusCode.Created;
- continue;
- }
- }
- } catch {
- // if we run into a problem peeking into the result,
- // we really don't want to do anything special.
- }
- if (error) {
- throw new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.UndeclaredResponseException(_response);
- }
- }
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Dashboard/grafana/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}'");
+ }
- // check for terminal status code
- if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
- {
- continue;
- }
- // we are done polling, do a request on final target?
- // create a new request with the final uri
- request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get);
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var workspaceName = _match.Groups["workspaceName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + workspaceName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- // drop the old response
- _response?.Dispose();
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- // make the final call
- _response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- break;
- }
- var _contentType = _response.Content.Headers.ContentType?.MediaType;
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- switch ( _response.StatusCode )
- {
- case global::System.Net.HttpStatusCode.OK:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafana.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- default:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- }
- }
- finally
- {
- // finally statements
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
- _response?.Dispose();
- request?.Dispose();
- }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.GrafanaCreateWithResult_Call (request, eventListener,sender);
}
}
///
- /// Validation method for method. Call this like the actual call, but you will get validation
- /// events back.
+ /// update a workspace for Grafana resource. This API is idempotent, so user can either update a new grafana or update an
+ /// existing grafana.
///
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
/// The workspace name of Azure Managed Grafana.
- /// The grafana resource type.
+ /// Json string supplied to the GrafanaCreate operation
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
/// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task GrafanaCreate_Validate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafana body, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
+ public async global::System.Threading.Tasks.Task GrafanaCreateViaJsonString(string subscriptionId, string resourceGroupName, string workspaceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
- await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
- await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
- await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
- await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
- await eventListener.AssertNotNull(nameof(workspaceName),workspaceName);
- await eventListener.AssertNotNull(nameof(body), body);
- await eventListener.AssertObjectIsValid(nameof(body), body);
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + global::System.Uri.EscapeDataString(workspaceName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.GrafanaCreate_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Delete a workspace for Grafana resource.
+ ///
+ /// update a workspace for Grafana resource. This API is idempotent, so user can either update a new grafana or update an
+ /// existing grafana.
+ ///
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
/// The workspace name of Azure Managed Grafana.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 204 (NoContent).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// Json string supplied to the GrafanaCreate operation
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task GrafanaDelete(string subscriptionId, string resourceGroupName, string workspaceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task GrafanaCreateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string workspaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -329,110 +271,103 @@ public partial class Dashboard
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.GrafanaDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ return await this.GrafanaCreateWithResult_Call (request, eventListener,sender);
}
}
- /// Delete a workspace for Grafana resource.
- ///
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 204 (NoContent).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ ///
+ /// update a workspace for Grafana resource. This API is idempotent, so user can either update a new grafana or update an
+ /// existing grafana.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// The grafana resource type.
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task GrafanaDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task GrafanaCreateWithResult(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana body, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
using( NoSynchronizationContext )
{
- // verify that Identity format is an exact match for uri
-
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Dashboard/grafana/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
- if (!_match.Success)
- {
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}'");
- }
-
- // replace URI parameters with values from identity
- var subscriptionId = _match.Groups["subscriptionId"].Value;
- var resourceGroupName = _match.Groups["resourceGroupName"].Value;
- var workspaceName = _match.Groups["workspaceName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + subscriptionId
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
- + resourceGroupName
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ "/providers/Microsoft.Dashboard/grafana/"
- + workspaceName
+ + global::System.Uri.EscapeDataString(workspaceName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.GrafanaDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ return await this.GrafanaCreateWithResult_Call (request, eventListener,sender);
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 204 (NoContent).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task GrafanaDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task GrafanaCreateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
- var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
// declared final-state-via: azure-async-operation
- var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
+ var operationLocation = _response.GetFirstHeader(@"Operation-Location");
while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
-
- // get the delay before polling. (default to 30 seconds if not present)
- int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // start the delay timer (we'll await later...)
- var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
// while we wait, let's grab the headers and get ready to poll.
if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
@@ -441,62 +376,61 @@ public partial class Dashboard
if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
location = _response.GetFirstHeader(@"Location");
}
- var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) {
+ operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation;
request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get);
// and let's look at the current response body and see if we have some information we can give back to the listener
var content = await _response.Content.ReadAsStringAsync();
- await waiting;
-
- // check for cancellation
- if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // if we got back an OK, take a peek inside and see if it's done
- if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
- {
- var error = false;
- try {
- if( Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonObject json)
- {
- var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
- if( state is null )
- {
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
- }
-
- switch( state?.ToString()?.ToLower() )
- {
- case "failed":
- error = true;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
break;
- case "succeeded":
- case "canceled":
- // we're done polling.
- break;
-
- default:
- // need to keep polling!
- _response.StatusCode = global::System.Net.HttpStatusCode.Created;
- continue;
- }
- }
- } catch {
- // if we run into a problem peeking into the result,
- // we really don't want to do anything special.
- }
- if (error) {
- throw new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.UndeclaredResponseException(_response);
- }
- }
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.UndeclaredResponseException(_response);
+ }
+ }
// check for terminal status code
if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
@@ -505,37 +439,44 @@ public partial class Dashboard
}
// we are done polling, do a request on final target?
// create a new request with the final uri
- request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get);
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get);
// drop the old response
_response?.Dispose();
// make the final call
_response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
break;
}
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
{
case global::System.Net.HttpStatusCode.OK:
{
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response);
- break;
- }
- case global::System.Net.HttpStatusCode.NoContent:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onNoContent(_response);
- break;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafana.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
}
default:
{
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
}
}
}
@@ -549,18 +490,161 @@ public partial class Dashboard
}
}
- ///
- /// Validation method for method. Call this like the actual call, but you will get validation
- /// events back.
- ///
- /// The ID of the target subscription.
- /// The name of the resource group. The name is case insensitive.
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task GrafanaCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // declared final-state-via: azure-async-operation
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ var operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) {
+ operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafana.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get validation
+ /// events back.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
/// The workspace name of Azure Managed Grafana.
+ /// The grafana resource type.
/// an instance that will receive events.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task GrafanaDelete_Validate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task GrafanaCreate_Validate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafana body, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
@@ -570,14 +654,17 @@ public partial class Dashboard
await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
await eventListener.AssertNotNull(nameof(workspaceName),workspaceName);
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
}
}
- /// Get the properties of a specific workspace for Grafana resource.
+ /// Delete a workspace for Grafana resource.
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
/// The workspace name of Azure Managed Grafana.
/// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -585,7 +672,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task GrafanaGet(string subscriptionId, string resourceGroupName, string workspaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task GrafanaDelete(string subscriptionId, string resourceGroupName, string workspaceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -607,18 +694,19 @@ public partial class Dashboard
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Delete, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.GrafanaGet_Call(request,onOk,onDefault,eventListener,sender);
+ await this.GrafanaDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender);
}
}
- /// Get the properties of a specific workspace for Grafana resource.
+ /// Delete a workspace for Grafana resource.
///
/// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -626,7 +714,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task GrafanaGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task GrafanaDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -637,39 +725,1085 @@ public partial class Dashboard
var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Dashboard/grafana/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
if (!_match.Success)
{
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}'");
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var workspaceName = _match.Groups["workspaceName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + workspaceName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Delete, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.GrafanaDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task GrafanaDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // declared final-state-via: azure-async-operation
+ var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ var operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) {
+ operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response);
+ break;
+ }
+ case global::System.Net.HttpStatusCode.NoContent:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onNoContent(_response);
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get validation
+ /// events back.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task GrafanaDelete_Validate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertNotNull(nameof(workspaceName),workspaceName);
+ }
+ }
+
+ /// Get the properties of a specific workspace for Grafana resource.
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task GrafanaGet(string subscriptionId, string resourceGroupName, string workspaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + global::System.Uri.EscapeDataString(workspaceName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.GrafanaGet_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Get the properties of a specific workspace for Grafana resource.
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task GrafanaGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Dashboard/grafana/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var workspaceName = _match.Groups["workspaceName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + workspaceName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.GrafanaGet_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Get the properties of a specific workspace for Grafana resource.
+ ///
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task GrafanaGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Dashboard/grafana/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var workspaceName = _match.Groups["workspaceName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + workspaceName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.GrafanaGetWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Get the properties of a specific workspace for Grafana resource.
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task GrafanaGetWithResult(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + global::System.Uri.EscapeDataString(workspaceName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.GrafanaGetWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task GrafanaGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafana.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task GrafanaGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafana.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get validation events
+ /// back.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task GrafanaGet_Validate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertNotNull(nameof(workspaceName),workspaceName);
+ }
+ }
+
+ /// List all resources of workspaces for Grafana under the specified subscription.
+ /// The ID of the target subscription.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task GrafanaList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.Dashboard/grafana"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.GrafanaList_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// List all resources of workspaces for Grafana under the specified resource group.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task GrafanaListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Dashboard/grafana"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.GrafanaListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// List all resources of workspaces for Grafana under the specified resource group.
+ ///
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task GrafanaListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Dashboard/grafana$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Dashboard/grafana"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.GrafanaListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// List all resources of workspaces for Grafana under the specified resource group.
+ ///
+ ///
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task GrafanaListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Dashboard/grafana$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Dashboard/grafana"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.GrafanaListByResourceGroupWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// List all resources of workspaces for Grafana under the specified resource group.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task GrafanaListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Dashboard/grafana"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.GrafanaListByResourceGroupWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// Actual wire call for method.
+ ///
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task GrafanaListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaListResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task GrafanaListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaListResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get
+ /// validation events back.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task GrafanaListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ }
+ }
+
+ /// List all resources of workspaces for Grafana under the specified subscription.
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task GrafanaListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Dashboard/grafana$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/grafana'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/providers/Microsoft.Dashboard/grafana"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.GrafanaList_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// List all resources of workspaces for Grafana under the specified subscription.
+ ///
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task GrafanaListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Dashboard/grafana$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/grafana'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/providers/Microsoft.Dashboard/grafana"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.GrafanaListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// List all resources of workspaces for Grafana under the specified subscription.
+ /// The ID of the target subscription.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task GrafanaListWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.Dashboard/grafana"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.GrafanaListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task GrafanaListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaListResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
}
-
- // replace URI parameters with values from identity
- var subscriptionId = _match.Groups["subscriptionId"].Value;
- var resourceGroupName = _match.Groups["resourceGroupName"].Value;
- var workspaceName = _match.Groups["workspaceName"].Value;
- // construct URL
- var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
- "/subscriptions/"
- + subscriptionId
- + "/resourceGroups/"
- + resourceGroupName
- + "/providers/Microsoft.Dashboard/grafana/"
- + workspaceName
- + "?"
- + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
- ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
-
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // generate request object
- var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
- // make the call
- await this.GrafanaGet_Call(request,onOk,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -679,7 +1813,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task GrafanaGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task GrafanaList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -690,6 +1824,7 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -697,13 +1832,13 @@ public partial class Dashboard
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafana.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafanaListResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -719,40 +1854,39 @@ public partial class Dashboard
}
///
- /// Validation method for method. Call this like the actual call, but you will get validation events
+ /// Validation method for method. Call this like the actual call, but you will get validation events
/// back.
///
/// The ID of the target subscription.
- /// The name of the resource group. The name is case insensitive.
- /// The workspace name of Azure Managed Grafana.
/// an instance that will receive events.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task GrafanaGet_Validate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task GrafanaList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
- await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
- await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
- await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
- await eventListener.AssertNotNull(nameof(workspaceName),workspaceName);
}
}
- /// List all resources of workspaces for Grafana under the specified subscription.
+ /// Update a workspace for Grafana resource.
/// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// The parameters for a PATCH request to a grafana resource.
/// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 202 (Accepted).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task GrafanaList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task GrafanaUpdate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafanaUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -762,7 +1896,10 @@ public partial class Dashboard
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
+ global::System.Uri.EscapeDataString(subscriptionId)
- + "/providers/Microsoft.Dashboard/grafana"
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + global::System.Uri.EscapeDataString(workspaceName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -771,41 +1908,58 @@ public partial class Dashboard
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Patch, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.GrafanaList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.GrafanaUpdate_Call (request, onOk,onAccepted,onDefault,eventListener,sender);
}
}
- ///
- /// List all resources of workspaces for Grafana under the specified resource group.
- ///
- /// The ID of the target subscription.
- /// The name of the resource group. The name is case insensitive.
+ /// Update a workspace for Grafana resource.
+ ///
+ /// The parameters for a PATCH request to a grafana resource.
/// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 202 (Accepted).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task GrafanaListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task GrafanaUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafanaUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
using( NoSynchronizationContext )
{
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Dashboard/grafana/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var workspaceName = _match.Groups["workspaceName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + global::System.Uri.EscapeDataString(subscriptionId)
+ + subscriptionId
+ "/resourceGroups/"
- + global::System.Uri.EscapeDataString(resourceGroupName)
- + "/providers/Microsoft.Dashboard/grafana"
+ + resourceGroupName
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + workspaceName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -814,28 +1968,30 @@ public partial class Dashboard
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Patch, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.GrafanaListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ await this.GrafanaUpdate_Call (request, onOk,onAccepted,onDefault,eventListener,sender);
}
}
- ///
- /// List all resources of workspaces for Grafana under the specified resource group.
- ///
+ /// Update a workspace for Grafana resource.
///
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// The parameters for a PATCH request to a grafana resource.
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task GrafanaListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task GrafanaUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafanaUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -843,113 +1999,52 @@ public partial class Dashboard
{
// verify that Identity format is an exact match for uri
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Dashboard/grafana$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Dashboard/grafana/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
if (!_match.Success)
{
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana'");
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}'");
}
// replace URI parameters with values from identity
var subscriptionId = _match.Groups["subscriptionId"].Value;
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var workspaceName = _match.Groups["workspaceName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
+ subscriptionId
+ "/resourceGroups/"
+ resourceGroupName
- + "/providers/Microsoft.Dashboard/grafana"
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + workspaceName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.GrafanaListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
- }
- }
-
- /// Actual wire call for method.
- /// the prepared HttpRequestMessage to send.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
- /// an instance that will receive events.
- /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
- ///
- /// A that will be complete when handling of the response is completed.
- ///
- internal async global::System.Threading.Tasks.Task GrafanaListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
- {
- using( NoSynchronizationContext )
- {
- global::System.Net.Http.HttpResponseMessage _response = null;
- try
- {
- var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- var _contentType = _response.Content.Headers.ContentType?.MediaType;
-
- switch ( _response.StatusCode )
- {
- case global::System.Net.HttpStatusCode.OK:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafanaListResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- default:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- }
- }
- finally
- {
- // finally statements
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
- _response?.Dispose();
- request?.Dispose();
- }
+ return await this.GrafanaUpdateWithResult_Call (request, eventListener,sender);
}
}
- ///
- /// Validation method for method. Call this like the actual call, but you will get
- /// validation events back.
- ///
+ /// Update a workspace for Grafana resource.
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
- /// an instance that will receive events.
- ///
- /// A that will be complete when handling of the response is completed.
- ///
- internal async global::System.Threading.Tasks.Task GrafanaListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
- {
- using( NoSynchronizationContext )
- {
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
- await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
- await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
- await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
- await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
- }
- }
-
- /// List all resources of workspaces for Grafana under the specified subscription.
- ///
+ /// The workspace name of Azure Managed Grafana.
+ /// Json string supplied to the GrafanaUpdate operation
/// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 202 (Accepted).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -957,27 +2052,20 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task GrafanaListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task GrafanaUpdateViaJsonString(string subscriptionId, string resourceGroupName, string workspaceName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
using( NoSynchronizationContext )
{
- // verify that Identity format is an exact match for uri
-
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Dashboard/grafana$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
- if (!_match.Success)
- {
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/grafana'");
- }
-
- // replace URI parameters with values from identity
- var subscriptionId = _match.Groups["subscriptionId"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + subscriptionId
- + "/providers/Microsoft.Dashboard/grafana"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + global::System.Uri.EscapeDataString(workspaceName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -985,80 +2073,17 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
// generate request object
- var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
- // make the call
- await this.GrafanaList_Call(request,onOk,onDefault,eventListener,sender);
- }
- }
-
- /// Actual wire call for method.
- /// the prepared HttpRequestMessage to send.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
- /// an instance that will receive events.
- /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
- ///
- /// A that will be complete when handling of the response is completed.
- ///
- internal async global::System.Threading.Tasks.Task GrafanaList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
- {
- using( NoSynchronizationContext )
- {
- global::System.Net.Http.HttpResponseMessage _response = null;
- try
- {
- var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- var _contentType = _response.Content.Headers.ContentType?.MediaType;
-
- switch ( _response.StatusCode )
- {
- case global::System.Net.HttpStatusCode.OK:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafanaListResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- default:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- }
- }
- finally
- {
- // finally statements
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
- _response?.Dispose();
- request?.Dispose();
- }
- }
- }
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
- ///
- /// Validation method for method. Call this like the actual call, but you will get validation events
- /// back.
- ///
- /// The ID of the target subscription.
- /// an instance that will receive events.
- ///
- /// A that will be complete when handling of the response is completed.
- ///
- internal async global::System.Threading.Tasks.Task GrafanaList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
- {
- using( NoSynchronizationContext )
- {
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
- await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.GrafanaUpdate_Call (request, onOk,onAccepted,onDefault,eventListener,sender);
}
}
@@ -1066,17 +2091,14 @@ public partial class Dashboard
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
/// The workspace name of Azure Managed Grafana.
- /// The parameters for a PATCH request to a grafana resource.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 202 (Accepted).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// Json string supplied to the GrafanaUpdate operation
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task GrafanaUpdate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafanaUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task GrafanaUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string workspaceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -1094,83 +2116,137 @@ public partial class Dashboard
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.GrafanaUpdate_Call(request,onOk,onAccepted,onDefault,eventListener,sender);
+ return await this.GrafanaUpdateWithResult_Call (request, eventListener,sender);
}
}
/// Update a workspace for Grafana resource.
- ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
/// The parameters for a PATCH request to a grafana resource.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 202 (Accepted).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
- /// A that will be complete when handling of the response is completed.
+ /// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task GrafanaUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafanaUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task GrafanaUpdateWithResult(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafanaUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
using( NoSynchronizationContext )
{
- // verify that Identity format is an exact match for uri
-
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Dashboard/grafana/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
- if (!_match.Success)
- {
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}'");
- }
-
- // replace URI parameters with values from identity
- var subscriptionId = _match.Groups["subscriptionId"].Value;
- var resourceGroupName = _match.Groups["resourceGroupName"].Value;
- var workspaceName = _match.Groups["workspaceName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + subscriptionId
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
- + resourceGroupName
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ "/providers/Microsoft.Dashboard/grafana/"
- + workspaceName
+ + global::System.Uri.EscapeDataString(workspaceName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.GrafanaUpdate_Call(request,onOk,onAccepted,onDefault,eventListener,sender);
+ return await this.GrafanaUpdateWithResult_Call (request, eventListener,sender);
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task GrafanaUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafana.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ case global::System.Net.HttpStatusCode.Accepted:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafana.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns 202 (Accepted).
@@ -1181,7 +2257,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task GrafanaUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task GrafanaUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -1192,6 +2268,7 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -1199,19 +2276,19 @@ public partial class Dashboard
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafana.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafana.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
case global::System.Net.HttpStatusCode.Accepted:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onAccepted(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.ManagedGrafana.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onAccepted(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ManagedGrafana.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -1238,7 +2315,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task GrafanaUpdate_Validate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IManagedGrafanaUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task GrafanaUpdate_Validate(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IManagedGrafanaUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
@@ -1262,7 +2339,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -1284,7 +2361,7 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender);
}
}
@@ -1298,7 +2375,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -1329,11 +2406,147 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// List all available API operations provided by Microsoft.Dashboard.
+ ///
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Dashboard/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Dashboard/operations'");
+ }
+
+ // replace URI parameters with values from identity
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.Dashboard/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.OperationsListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// List all available API operations provided by Microsoft.Dashboard.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.Dashboard/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.OperationsListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -1343,7 +2556,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -1354,6 +2567,7 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -1361,13 +2575,13 @@ public partial class Dashboard
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -1408,10 +2622,11 @@ public partial class Dashboard
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsApprove(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsApprove(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -1440,11 +2655,11 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.PrivateEndpointConnectionsApprove_Call(request,onDefault,eventListener,sender);
+ await this.PrivateEndpointConnectionsApprove_Call (request, onDefault,eventListener,sender);
}
}
@@ -1455,10 +2670,11 @@ public partial class Dashboard
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsApproveViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsApproveViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.SerializationMode.IncludeUpdate)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -1500,15 +2716,65 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.PrivateEndpointConnectionsApprove_Call (request, onDefault,eventListener,sender);
+ }
+ }
+
+ /// Manual approve private endpoint connection
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// The private endpoint connection name of Azure Managed Grafana.
+ /// Json string supplied to the PrivateEndpointConnectionsApprove operation
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsApproveViaJsonString(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + global::System.Uri.EscapeDataString(workspaceName)
+ + "/privateEndpointConnections/"
+ + global::System.Uri.EscapeDataString(privateEndpointConnectionName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.PrivateEndpointConnectionsApprove_Call(request,onDefault,eventListener,sender);
+ await this.PrivateEndpointConnectionsApprove_Call (request, onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
@@ -1517,31 +2783,28 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsApprove_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsApprove_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- // this operation supports x-ms-long-running-operation
- var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: azure-async-operation
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
+ var operationLocation = _response.GetFirstHeader(@"Operation-Location");
while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
- {
-
- // get the delay before polling. (default to 30 seconds if not present)
- int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // start the delay timer (we'll await later...)
- var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
+ {
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// while we wait, let's grab the headers and get ready to poll.
if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
@@ -1550,15 +2813,14 @@ public partial class Dashboard
if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
location = _response.GetFirstHeader(@"Location");
}
- var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) {
+ operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation;
request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get);
// and let's look at the current response body and see if we have some information we can give back to the listener
var content = await _response.Content.ReadAsStringAsync();
- await waiting;
-
- // check for cancellation
- if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
@@ -1567,45 +2829,45 @@ public partial class Dashboard
_response = await sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- // if we got back an OK, take a peek inside and see if it's done
- if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
- {
- var error = false;
- try {
- if( Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonObject json)
- {
- var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
- if( state is null )
- {
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
- }
-
- switch( state?.ToString()?.ToLower() )
- {
- case "failed":
- error = true;
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
break;
- case "succeeded":
- case "canceled":
- // we're done polling.
- break;
-
- default:
- // need to keep polling!
- _response.StatusCode = global::System.Net.HttpStatusCode.Created;
- continue;
- }
- }
- } catch {
- // if we run into a problem peeking into the result,
- // we really don't want to do anything special.
- }
- if (error) {
- throw new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.UndeclaredResponseException(_response);
- }
- }
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.UndeclaredResponseException(_response);
+ }
+ }
// check for terminal status code
if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
@@ -1624,6 +2886,7 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
break;
}
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -1631,7 +2894,7 @@ public partial class Dashboard
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -1659,7 +2922,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsApprove_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsApprove_Validate(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
@@ -1681,6 +2944,7 @@ public partial class Dashboard
/// The workspace name of Azure Managed Grafana.
/// The private endpoint connection name of Azure Managed Grafana.
/// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -1688,7 +2952,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -1717,13 +2981,14 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.PrivateEndpointConnectionsDelete_Call(request,onNoContent,onDefault,eventListener,sender);
+ await this.PrivateEndpointConnectionsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender);
}
}
/// Delete private endpoint connection
///
/// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -1731,7 +2996,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -1773,13 +3038,14 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.PrivateEndpointConnectionsDelete_Call(request,onNoContent,onDefault,eventListener,sender);
+ await this.PrivateEndpointConnectionsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -1787,32 +3053,29 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
global::System.Net.Http.HttpResponseMessage _response = null;
try
{
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- // this operation supports x-ms-long-running-operation
- var _originalUri = request.RequestUri.AbsoluteUri;
// declared final-state-via: azure-async-operation
var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation");
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
+ var operationLocation = _response.GetFirstHeader(@"Operation-Location");
while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
-
- // get the delay before polling. (default to 30 seconds if not present)
- int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // start the delay timer (we'll await later...)
- var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
// while we wait, let's grab the headers and get ready to poll.
if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
@@ -1821,15 +3084,14 @@ public partial class Dashboard
if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
location = _response.GetFirstHeader(@"Location");
}
- var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) {
+ operationLocation = _response.GetFirstHeader(@"Operation-Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation;
request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get);
// and let's look at the current response body and see if we have some information we can give back to the listener
var content = await _response.Content.ReadAsStringAsync();
- await waiting;
-
- // check for cancellation
- if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
@@ -1838,45 +3100,45 @@ public partial class Dashboard
_response = await sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- // if we got back an OK, take a peek inside and see if it's done
- if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
- {
- var error = false;
- try {
- if( Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonObject json)
- {
- var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
- if( state is null )
- {
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
- }
-
- switch( state?.ToString()?.ToLower() )
- {
- case "failed":
- error = true;
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
break;
- case "succeeded":
- case "canceled":
- // we're done polling.
- break;
-
- default:
- // need to keep polling!
- _response.StatusCode = global::System.Net.HttpStatusCode.Created;
- continue;
- }
- }
- } catch {
- // if we run into a problem peeking into the result,
- // we really don't want to do anything special.
- }
- if (error) {
- throw new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.UndeclaredResponseException(_response);
- }
- }
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.UndeclaredResponseException(_response);
+ }
+ }
// check for terminal status code
if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
@@ -1895,10 +3157,17 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
break;
}
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
{
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response);
+ break;
+ }
case global::System.Net.HttpStatusCode.NoContent:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
@@ -1908,7 +3177,7 @@ public partial class Dashboard
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -1962,7 +3231,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -1991,7 +3260,7 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.PrivateEndpointConnectionsGet_Call(request,onOk,onDefault,eventListener,sender);
+ await this.PrivateEndpointConnectionsGet_Call (request, onOk,onDefault,eventListener,sender);
}
}
@@ -2005,7 +3274,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -2047,11 +3316,171 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.PrivateEndpointConnectionsGet_Call(request,onOk,onDefault,eventListener,sender);
+ await this.PrivateEndpointConnectionsGet_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Get private endpoint connections.
+ ///
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Dashboard/grafana/(?[^/]+)/privateEndpointConnections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var workspaceName = _match.Groups["workspaceName"].Value;
+ var privateEndpointConnectionName = _match.Groups["privateEndpointConnectionName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + workspaceName
+ + "/privateEndpointConnections/"
+ + privateEndpointConnectionName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.PrivateEndpointConnectionsGetWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Get private endpoint connections.
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// The private endpoint connection name of Azure Managed Grafana.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetWithResult(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + global::System.Uri.EscapeDataString(workspaceName)
+ + "/privateEndpointConnections/"
+ + global::System.Uri.EscapeDataString(privateEndpointConnectionName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.PrivateEndpointConnectionsGetWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// Actual wire call for method.
+ ///
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -2061,7 +3490,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -2072,6 +3501,7 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -2079,13 +3509,13 @@ public partial class Dashboard
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateEndpointConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -2138,7 +3568,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList(string subscriptionId, string resourceGroupName, string workspaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList(string subscriptionId, string resourceGroupName, string workspaceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -2166,7 +3596,7 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.PrivateEndpointConnectionsList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.PrivateEndpointConnectionsList_Call (request, onOk,onDefault,eventListener,sender);
}
}
@@ -2180,7 +3610,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -2220,11 +3650,167 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.PrivateEndpointConnectionsList_Call(request,onOk,onDefault,eventListener,sender);
+ await this.PrivateEndpointConnectionsList_Call (request, onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Get private endpoint connection
+ ///
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Dashboard/grafana/(?[^/]+)/privateEndpointConnections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/privateEndpointConnections'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var workspaceName = _match.Groups["workspaceName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + workspaceName
+ + "/privateEndpointConnections"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.PrivateEndpointConnectionsListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ /// Get private endpoint connection
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The workspace name of Azure Managed Grafana.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListWithResult(string subscriptionId, string resourceGroupName, string workspaceName, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2022-08-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Dashboard/grafana/"
+ + global::System.Uri.EscapeDataString(workspaceName)
+ + "/privateEndpointConnections"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.PrivateEndpointConnectionsListWithResult_Call (request, eventListener,sender);
+ }
+ }
+
+ ///
+ /// Actual wire call for method.
+ ///
+ /// the prepared HttpRequestMessage to send.
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -2234,7 +3820,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -2245,6 +3831,7 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -2252,13 +3839,13 @@ public partial class Dashboard
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api20220801.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.PrivateEndpointConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -2310,7 +3897,7 @@ public partial class Dashboard
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task PrivateLinkResourcesGet(string subscriptionId, string resourceGroupName, string workspaceName, string privateLinkResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task PrivateLinkResourcesGet(string subscriptionId, string resourceGroupName, string workspaceName, string privateLinkResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.ISendAsync sender)
{
var apiVersion = @"2022-08-01";
// Constant Parameters
@@ -2339,7 +3926,7 @@ public partial class Dashboard
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Dashboard.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.PrivateLinkResourcesGet_Call(request,onOk,onDefault,eventListener,sender);
+ await this.PrivateLinkResourcesGet_Call (request, onOk,onDefault,eventListener,sender);
}
}
@@ -2353,7 +3940,7 @@ public partial class Dashboard
///